instruction
stringlengths
32
27.2k
If I have a SHA512 hash of my plaintext, does it weaken or break the encryption of my ciphertext?
I need a proof of work/memory that takes about 100ms to complete, and as short time as possible to validate. Hashing random values and a nounce to get enough leading zeroes is my current approach, and my plan was to use blake2 for the hash function, but I couldn't get it to work. I did however get scrypt to work, but i...
Without regards to any specific implementation of asymmetric cryptography, I am wondering if it is feasible to come up with a value of private key I want to use, and calculate the corresponding public key from it. The use case would be the creation of multiple private/public key pairs where the private keys are merely ...
I want to make sure that I understand AES-GCM correctly: If I have: key1, plaintext1, iv1, adata1 and requset tag size of 96 bits, and tag size of 128 bits, will the first 12 bytes of the 128 bits tag equal 96 bits tag?
Wikipedia reports the following information about the ChaCha20 algorithm: An implementation reference for ChaCha20 has been published in RFC 7539. The IETF's implementation modified Bernstein's published algorithm by changing 64-bit nonce and 64-bit block counter to 96-bit nonce and 32-bit block counter[34]. The n...
I'm interested in learning how to use AES-256 encryption in C/C++. I'm still a beginner in Cryptography but I'm confident in my abilities to program. There is still a lot for me to learn about this topic so please don't respond telling me that I shouldn't be implementing the algorithm or that I should be in college. I'...
What should be broken to break a cipher with perfect forward secrecy as a passive observer? RSA/EC analog, (EC)DHE or both?
Communication complexity is generally discussed among many papers on secure multi-party computation (MPC). However, I do not still understand the importance of it. What communication complexity affects is total computation time in a protocol depending on available bandwidth rate (10Mbps, 1Gbps, etc). Is the communicat...
okay so here is the original question: Alice Bob and Carl are generating public keys for RSA, but they are lazy and decide to share some of the work of generating prime numbers. They find 3 large prime numbers p,q and r, then Alice uses the modulus $n_A = pq$, Bob uses the modulus $n_B = pr$ and Carl uses the modulus $...
Recently I have found out that Ukraine has its own symmetric encryption algorithm "Kalyna". Developers of this algorithm said that their algorithm is more secure than AES because of longer key length and lack of any vulnerabilities by hardware acceleration (like AES-NI in modern processors). Is it the truth, or is AES ...
I know the definitions of both of the securities (against message recovery and semantic), but I don't know how to actually build a cipher that meets these conditions, I mean, I don't know how to define "let $\mathcal{E} = (E,D)$ where $E(k,m) = \;...$ and you can see that it is secury against MR because of ..., but is ...
I was reading the ZK proof of knowledge of Schnorr and fiat shamir transformation, and I figured out that replay attacks are possible. Why these protocols don't take into account this attack? That seems very strange. Thank you.
I have this algorithm and Im searching p and q: $n=p^2 * q $ $l=(p-1)*(q-1) / \gcd (p-1,q-1)$ $d\equiv l^{-1} \pmod n$ And the values are: For $n$: 1043247381320041410146374847683905608886067988802815759655490071506964811427733496668055364700822779908166748193534341903285387332658081562041534228961538451830025041762537...
Is it possible to determine public key if we know private key? Employees has RFID card and RFID is a private key for employee. I want to encrypt some user's (employee's) data with employee's public key, but I don't want to anybody read encrypted data without employee's RFID card. My idea is that If we can use some func...
Disclaimer: I do NOT believe AES-ECB to be at all useful for encryption. That said, due to time and bureaucratic issues that I'm not in control of, I need to use AES-ECB. I get packets of data that are Reed Solomon encoded. Each reed solomon encoded packet has length 255 bytes. On decoding, I get the message which is 2...
If I generate an MD5 hash from 2 pieces of information – i.e. by concatenating two strings – how easy is it to guess what that hash is, assuming an attacker has knowledge of only 1 piece of those info?
I have a server using TLS1.2 with an ECDSA certificate using secp256r1. The algorithms being used to connect to my browser are TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 as I expect from my server configuration and browser. The ECDHE key exchange group is secp256r1 as reported both by Firefox and Wireshark. The problem is...
I want an algorithm design that works with galois theory and rings of polynomials on finite fields. Can someone suggest me a design that works with these concepts?
Assuming this setup: A prime $p$, a generator $\alpha$ in $\mathbb{Z}_p^\ast$. Alice chooses her private exponent $d$ from $[2, p-2]$ and calculates her public key $\beta$ = $\alpha^d$. Bob then chooses his private key $i$. The resulting masking key $k_M$ used to encrypt the message is then calculated as $k_M = \beta^î...
Say I would like to justify whether $10^{28} \equiv 1 \pmod{29}$. I know according to Fermat's little theorem that $a^{p-1} \equiv 1 \pmod{p}$ when $a$ is a primitive root modulo $p$. What about situations such as $7^{48} \bmod{35}$?
Can a quantum money system exist in which bank (who possesses a secret key $k$) can create quantum states $S$ that anyone (in possession of public key $P$) can verify was issued by the bank without interacting with the bank, but nobody can spend twice?
Let $E$ be a semantically secure cipher. Let $E'(k,m) = E(k,E(k,m))$. How would one prove that $E'$ is not necessarily secure even if $E$ is? It doesn't make sense to me. If you consider the advantage of an attacker $\mathcal{A}$ over a semantically secure cipher $E$, you have $SSadv[\mathcal{A},E] = \epsilon$, where ...
Assume $M_1$ is $\operatorname{OAEP}$ padded and encrypted and the ciphertext is 1024 bytes as an example. If an adversary somehow gets around the encryption and manages to get half of the bits of $\operatorname{OAEP}(M_1)$, and although infeasible, assume that it was somehow possible to loop through all combinations o...
I'm trying to read through a paper on ring signatures - "How to Leak a Secret" by Rivest, Shamir, Tauman (link: https://link.springer.com/content/pdf/10.1007%2F3-540-45682-1_32.pdf ) In section 3.2 it is said We assume the existence of a publicly defined symmetric encryption algorithm $E$ such that for any key $k$ ...
If I have a cryptosystem in which I require both signing and deriving a shared secret key for encryption, what is the recommended way of achieving that? Is there any vulnerability in generating a private key and having the other private key as the sha256 hash of the first private key? Or should I use the same keys for ...
I'm running the below Nmap command to test the strength of the cipher suites I have used in my host nmap -sV --script ssl-enum-ciphers -p 443 <host> The Nmap doc says that Each ciphersuite is shown with a letter grade (A through F) indicating the strength of the connection and the output line beginning with Least stre...
Given following ElGamal encryption scheme: $\delta = M(\alpha^a)^k \mod{p}$. Assume that an attacker knows the random value $k$. How can he recover the private key $a$? I know that it's possible to recover the message M by computing $\frac{m}{\alpha^a} \mod{p}$. But how can we now derive $a$ from this information and n...
How the decryption process of AES is the reverse process of Encryption process of AES? Mean Reverse in what sense mean final round would be conducted first or steps in each round would be conducted first? Please Guide me...
I need to analyse a binary code and check if Keccak is used in this code. I can identify AES, by using Rijndael S-box. Is there a similiar box for Keccak?
Suppose the F function of a 16 round Feistel cipher mapped every 16-bit input R, regardless of the value of the subkey K[r], to 0xFFFF What is the result of running an encryption with this cipher?
I want two embedded devices (call them master and slave) to communicate with each other. For intellectual property protection, the master must reject fake slave devices (the other way around is a pre but not a requirement). I'm having no luck finding a scheme that satisfies the following requirements: Authenticated: F...
A private-key encryption scheme Π = (Gen, Enc, Dec) has perfectly indistinguishable encryptions under a chosen-plaintext attack, if for all probabilistic polynomial-time adversaries A it holds that Pr[PrivK_cpa(n) = 1] = 1/2. I need to show that there is no encryption scheme that can satisfy this definition. The perfec...
Let $m_1 = \underbrace{ \{0,1\}^n \times \cdots \times \{0,1\}^n }_{L\text{ times}}$ be a message of space $\mathcal{M}^L$, where $\mathcal{M} = \{0,1\}^n$. Let $c_1$ be the encryption of $m_1$ using CBC mode. Let $x \in \mathcal{K}$ be some binary string. Finally, let $m_2$ be another message such that: $m_2[1] = m...
I saw a post here which I think states that for P256, a is equal to -3. Why is elliptic curve parameter $a=-3$ somehow special I am not sure if this is correct, or maybe I am misunderstanding something about elliptic curves? I thought that a=0 for secp256r1 and some big number for secp256k1? If we change the value to a...
If $\mathcal{H}=\left(\text{Gen},H\right)$ is a collision resistant hash family does $\mathcal{W}=\left(\text{Gen},W\right)$ where $W_{s}\left(x\right)$ denote the $n-1$ left most bits of $H_{s}\left(x\right)$ is also collision resistant hash family? Im thinking that $\mathcal{H}$ would not be collision resistant hash ...
I've just started studying MACs and I faced the following challenge: Let $F$ be a PRF over $(\mathcal{K,R,X})$ where $\mathcal{X} = \{0,1\}^{32}$ Let $\mathrm{CRC32}(m)$ be a function that takes inputs $m \in \{0,1\}^{\le \ell}$ and output a 32-bit string and $\mathrm{CRC32}(m_1) \oplus \mathrm{CRC32}(m_2) = \mathrm{C...
Let $\mathcal{E} = (E,D)$ be a CPA secure cipher. Let's define $\mathcal{E'} = (E', D')$, where $E'(k,m) = E(k, E(k,m))$. How can I prove that $\mathcal{E'}$ will be CPA secure if $\mathcal{E}$ is? My guess: Let $a$ be the CPA advantage of an attacker over $\mathcal{E}$, that is, $\mathrm{CPAadv}[\mathcal{A, E}] = a$....
When reading up on the Rijndael key schedule, I learned that the master key itself is used as a round key directly before the key schedule generates additional round keys. When a 256-bit key is used, the first half of the key goes to the first AddRoundKey and the second half goes to the second. This means that, if the ...
I have found interesting for me paper about constructing collisions in SHA 0. On page 60 the author determines M variable which is a concatenation of 32-bits vectors $M^{(i)}$, but I can't find any explanation about this $$\forall i,0\leq i\leq 79,M^{(i)}_{0,k}=0\text{ if }k\neq 1$$ $$\forall i,0\leq i\leq 79,M^{(i)}_{...
I would like to discuss the minimum input of hash function to consider strong (e.g Shack128 (SHA-3)). I have a mechanism based on SHA-3, but the input is just 40-bit, some friends told me 40-bit input consider too weak? please, anyone can help me to know what is the minimum input and what kind of attack I need to consi...
With the advent of IoT, crypto-less key establishment protocols exploiting intrinsic channel randomness of physical layer are gaining great interest. These crypto-less protocols are computationally inexpensive and thus suitable for low-power devices. Specifically, they require almost 61 times less energy than for ECDH....
I stumbled across a VPN website when looking up information about XTS, and came across their own explanation of different block modes (basically the ECB penguin, but with their company logo instead). What stood out to me was their XTS example, where their logo still shows through: It clearly is visible here. However, ...
My question is kinda simple. I want to use AES-256 encryption to encrypt my backup. Using a password like this: 7okufZ308@lB$^KTINX1NWbpdw6rkysxv@giMW5jgI#ZaX*#YwloT3Y$*c*2qVCW This has 64 chars and I wanted to know what is the possible cracking time for a password like this? The software I will be using has a custom i...
I know this is usually frowned upon, but supposing you were to roll your own encryption cipher (completely on your own or with a small group of friends, with no peer review possible), what could you do to make your custom algorithm as safe as possible (or rather, to keep the danger of using it to a minimum)? Similarly,...
I am developing a personal project and I have the following need: given a randomly generated seed (with enough entropy) I need to generate a number $x$ of Ed25519 key pairs. These key pairs are not stored. Therefore I need to generate with this seed the exact same key pairs anytime. To achieve that I have the followin...
This site suggests that Secure Remote Password protocol is secure when "Attackers can intercept, modify, and forge arbitrary messages between client and server." However, from a quick reading of the Wikipedia page on SRP [1], it seems that an obvious shortcoming of the method is that the server cannot, in general, be t...
Set generator $g \equiv 5 \pmod p$ where $p=647$ and $p$ is prime. With the same $g$, $p$ and secret signing key $x$, Alice sends two messages, $428$ and $129$, with signatures $(433, 239)$ and $(433, 100)$ respectively. She uses the same ephemeral key twice. The question says without using a discrete logarithm algorit...
My question essentially concerns how to prove if a function is negligible. As a matter of fact, though this question might seem very basic, it seems that most of the "proofs" of negligible concern comparing the the function with another negligible function and then asserting its status via laws of negligible functions....
Please forgive me, because I suspect I don't even know enough to ask this correctly: Can someone speak to the pro's and con's of the various asymmetric signatures? I have a use-case in which I put data and a signature of that data in a QR code, where storage size is limited. As such, I'm trying to understand the trade...
I am wanting to make deterministic (i.e. always the same for the same inputs) Ed25519 key from a master Ed25519 key and a target string (e.g. a website name, ala SQRL). My algorithm takes a 32-byte Argon2 hash using the password as the 32-byte master private key and the salt built from SHA-512 of the target string. It ...
Imagine if someone messing around with hashes accidentally came across two inputs to SHA-256 that produced the same output. Not a concerted effort, not Google/NSA or crypanalysis. No tin foil hats. Just random chance in say a high school. And they made the two inputs public knowledge. Whilst highly improbable, not m...
Simple answer (and I know this is a simple yes or no) is it possible to write an encryption that is 100% uncrackable, as long as I keep certain parts private? It's just for personal use. I'm a computer programmer and need my own encryption to encrypt things like my passwords. Is this possible so that its 100% uncrackab...
In .NET and other programming platforms all hash functions (such as MD5, SHA256, etc) can be used with streams of bytes, potentially forever - so it isn't necessary to read an entire multigigabyte file into an in-memory buffer to compute the hash of the file, the hash algorithm simply considers new data as it arrives a...
I am aiming to find out if this problem/puzzle can be solved with cryptography at all. Say there are these two parties: Subject S which has a master private/public key pair (MPriv, MPub) and a set of key pairs derived from MPriv. Each of the derived pairs has its own public ID, and the private keys are merely the conc...
What are practical methodologies to derive the following ciphertext: 1bd0d370b262d748b21c40cc7e5746642b4c06079a224c65e443e429289753c2
One of the attacks on plain RSA involves a sender who encrypts two related messages using the same public key. Formulate an appropriate definition of security ruling out such attacks.And show that any CPA-secure public-key encryption scheme satisfies your definition. What does formulating an appropriate definition of s...
Is there any group in which not only discrete logarithm and finding square root are believed to be hard, but also finding the inverse of a given element?
Keeping OAEP Cryptanalysis in mind, about the inability to get to $M_1$ or $M_2$ given $\operatorname{OAEP}(M_1) \oplus \operatorname{OAEP}(M_2)$. Would it be possible to get to $M_1$ or $M_2$, given $\operatorname{OAEP}(M_1) \oplus \operatorname{OAEP}(M_2)$, if the underlying hash function $\operatorname{H}$ or MGF $\...
I'm thinking up a scheme where a merkle tree is used to ensure integrity of a set of data items, and different parties are allowed to verify the integrity of different subsets of that data. Let's assume a process where an operator measures a physical property of items that pass his workstation on a conveyor belt. Let's...
RFC8032 Edwards-Curve Digital Signature Algorithm (EdDSA) 5.1.3 Decoding states the following: Decoding a point, given as a 32-octet string, is a little more complicated. First, interpret the string as an integer in little-endian representation. Bit 255 of this number is the least significant bit of the x-coordinate...
I'm using PBKDF2 in browser (can't use bcrypt, users are likely to have passwords > 72bytes, or whatever the number was). PBKDF2 is running in a webworker, something like so const key = PBKDF2_HMAC_SHA512.bytes(passphrase, salt, Math.pow(2,17), 64) This key is used to encrypt data to be stored in the user's localstor...
Why doesn't FHE scheme see a modulus space $\Bbb Z_p$ as $[0,p)$ ? Instead, it consider $\Bbb Z_p$ as $\left[-\frac{p}{2},\frac{p}{2}\right)$. What's the concrete reason? What happens if I use $[0,p)$?
When encrypting many short plaintexts with a single key, lets say about 2^64 total plaintexts at under 64 bytes each: (edit note - was 2^70 in the original question) Is there a way to use AES-GCM, as specified by NIST Special Publication 800-38D, safely in this scenario? Is is safe to use when there are no IV collisio...
I don't want to utilize RSaCryptoProvider available in .NET to encrypt data. I would like to encrypt data using the RSA keys, allowing me to send a message to Alice using his public-signature and allowing Alice decrypt it using its private one. My problem is focused in an application which people can select the symetr...
I am encrypting a file via AES-CBC and am using scrypt to extract a key from a user-provided password. The IV is public and is stored with the encrypted file. Is it safe to generate my IV (public) and key (private) together using scrypt (e.g. set dklen=64 then use scrypt[0...31] for key and scrypt[32...63] for IV), or ...
I am fiddling around with the JS Web Crypto API and creating a hybrid encryption system that uses a symmetric key to encrypt form data with AES256-CBC and and a public/private key-pair to wrap/encapsulate the symmetric key using RSA-OAEP. Currently I am simply generating a random 256bit key that will get padded and wra...
RFC 5869 describes HMAC-based Extract-and-Expand Key Derivation Function (HKDF). In section 4, entitled "Applications of HKDF", it states that one of the intended uses is: derivation of symmetric keys from a hybrid public-key encryption scheme However, it doesn't expand on the meaning of this. Can anyone explain how ...
We have a system that has several SecretKeys (for example, one for a user, and one for us). We want to encrypt data in a way that requires all of those keys to be available in order to decrypt. I think that the correct way to do this is to use a key derivation function of some sort to merge the source SecretKeys togeth...
Let Alice has private key $R_1$ and known to Bob public key $P_1$. She generates signature for some message $M$ and shows it to Bob. Could Bob generate signature for the same message $M$, but for different key-pair, exactly $R_2$ and $P_2$, such as $R_1+R_2=N$, where N is order. ($P_1=-P_2$)
For a login the user credentials are typically some form of "username" and a matching "password". The password is (hopefully) stored as a hash in the database. But what about the username? Is the username stored as a plaintext in the database? Would it be a good idea to hash both the username and the password?
Devices: In this system, users have one or more wearable devices (a smart watch), one of which they will most likely have on their person all the time. The devices are linked to their account by their serial number. Users must have a mobile device linked to their account too. In fact, the watch can only accesses the ne...
If we encrypt a message $m$ as $m || H(m)$ using textbook RSA encryption algorithm, $H$ is random oracle modeled. In this case the message can be recovered. Is this encryption CCA secure? If so how can we prove it or not?
I have a question about multiplication of two points belong to elliptic curve. I know every think about adding and scalar multiplication but not about multiplication of two points. Is there any method for this? The reason that I need this is that in paper "Attributed-based encryption for fine-grained access control of ...
Assume I assigned the letters A-Z to random numbers in the range of 0-100. The mapping of plaintext characters to ciphertext values constitutes my cipher alphabet(and key). I encrypt a message using a normal substitution cipher. I then create a sequence of random values the same length as my initial ciphertext using nu...
Let's say I was given a file from which I know that it is encrypted using a 5 bit LFSR with a given poly. I already know that it is possible to deduce the state of an LFSR and thus all future outputs if you're given a certain length of the LFSR's output. But if that output is xored with a file, I would assume you can't...
Are there cryptosystems that are homomorphic with respect to the concatenation operation? those. there are data q1 and q2, where q3 = q1q2. then the encrypted data f(q1) = c1 and f(q2) = c2 and f(q3) = g(c1, c2) ? And are there cryptosystems that are homomorphic with respect to data fetch, i.e. reverse operation, with...
I know that with ElGamal we can re-cipher and get a second ciphertext equal to the first. Is it possible with Paillier too? When saying "re-cipher", I mean "A sends me a message, that is encrypted with my public key, I somehow modify the ciphertext, so that it is now encrypted for C without actually having simply decr...
Suppose $R=\mathbb{Z}[X]/f(X)$ is a polynomial ring. Decisional Ring-LWE is hard if one cannot distinguish the following samples: $(a_i, b_i) \in R^2$ for $i\in [0,k-1]$ (completely random) $(a_i, b_i=a_is+e_i) \in R^2$ for $i\in [0,k-1]$ ($b_i$ is obtained by multiplication of $a_i$ and secret $s$ masked by some nois...
For a random permutation $P$ and $q$ distinct inputs $x_1,\ldots,x_q\in\{0,1\}^n$, what's the probability of the event that there exists at least one collision among $\{P(x_1)\oplus x_1,\ldots,P(x_q)\oplus x_q\}$? Note: I have tried to compute this probability, but it is quite hard for me to obtain the result, either f...
I would like to ask how to modify Pohlig Hellman algorithm if I need to work with polynomials $GF(2^{60})$ I know how this algorithm works with numbers, but I am not able to imagine how to do some operations with polynomials. E.g. if I need to do $g^{\frac{p-1}{q^e}}$. How can I do this with polynomial?
I want to roughly understand how the mechanism works of generating an encryption key from a passphrase, by which we encrypt a volume or file. I'm familiar with public key encryption, the concept of a salt and the password hashing approach to password verification. A salt prevents attackers from precomputing a dictionar...
I want to develop a steganography project with using exploiting modification direction method. I started to try and understand how the method works, but I have some questions about decryption. I hid the secret image in a cover image larger than the secret image by 9 times. So when it comes to decryption I'm not going t...
I'm trying to understand the GGH graded encoding scheme, but something there leaves me very confused and I can not figure out how to explain it: Let $R := \mathbb{Z}[X]/(X^n+1)$, where $n$ is a power of $2$ (hence $X^n+1$ is irreducible in $\mathbb{Z}[X]$); $q := 2^a$ for a large enough $a$; $R_q := R/qR$, i.e. $R_q = ...
I am implementing the Authenticated Key Exchange from Ideal Lattices on sage maths. On page number 3 the full key exchange scheme is presented. In this key exchange scheme, they are using the Hash function $c=H_1(i,j,x_i)$ and $d=H_1(j,i,y_j,x_i)$ that will output the elements that are invertible in $R_q$, where $R_q...
I'm trying to understand how padding works when using block ciphers. Padding may be required when the size of the plain text is not a multiple of the block size If that's so, then I don't understand the results I am getting on my Ubuntu VM. I created a .txt file in size of 20 bytes, encrypted it using AES128-ECB. I t...
I'm searching for a method/algorithm that is able to manage different encryption keys and guarantee that some subset of that keys is needed to perform the decryption (not all). For example: $$D_{K1, K2}(E_{K1, K2, K3}(X)) = D_{K1, K3}(E_{K1, K2, K3}(X)) = D_{K1, K2, K3}(E_{K1, K2, K3}(X)) = X$$ A real-world like exampl...
I (believe I) am aware of the general difference between a hash and a MAC; the former is used for integrity and the latter for integrity and authentication as it also takes a secret key as an input in addition to the message. But what if I hash the message, encrypt it using the secret key (one that is separate from the...
Ring-LWE based encryption (I pick up homomorphic encryption here) requires canonical embedding norm rather than $\ell_2$ norm to quantify the polynomial size (e.g. noise). Why is this better than $\ell_2$ norm? Isn't $\ell_2$ norm always be correct? Canonical embedding is just a embedding which maps a ring element to ...
Multiple Vigenère ciphers do not repeat the key until the message gets longer than the LCM of the cipher lengths. Are messages shorter than that safe? If not, what is the attack strategy? I believe there is a known plaintext attack which has an algebraic solution if the message is longer than the sum of the cipher le...
The SCA power attack described in 2016 article called "Power Side Channels in Security ICs: Hardware Countermeasures", depends on the measurement of power consumption fluctuations during AES-128 execution, for either known plain text, or known cipher text. In addition, the attacker has the ability to change the cipher ...
In traditional malware (especially ransomware) using RSA approach, the public key may be hard-coded in the malware binary and is used to encrypt a symmetric key generated on the system. The symmetric key itself is used to encrypt user files. Some new variants of malware are using ECDH instead of RSA. How is ECDH used i...
I tried for about 1 month to understand ABE and know I am confusing about access tree. In paper "Attributed-based encryption for fine-grained access control of encrypted data" the author explained the generation of keys with access tree for KP-ABE which I attached the picture of it here. I found an example for this bu...
I made a program on android. I used a password key of "PBKDF2WithHmacSHA1" for both of them as a key. The program i made was using Android java Cipher library. When I encrypt and decrypt with blowfish and arc4 its works, and vise versa works as well. Are they supposted to do that. Did I implement the algorithms correct...
Why is Rabin Encryption is considered as not CCA secure and how can I prove it? Any example would be helpful.
I'm studying Cryptography & Network Security. It has the following example for collision resistance: "Suppose Bob writes an IOU message, sends it to Alice, and she signs it. Bob finds two messages with the same hash, one of which requires Alice to pay a small amount and one that requires a large payment. Alice s...
I have two questions for an assignment that I need to answer in relation to Error Propagation in 8-bit CFB mode for AES and DES encryption. The questions are as follows: If there is an error in transmitted ciphertext block C1, how many plaintext blocks will be corrupted when the file is decrypted for 8-bit CFB-DES? If...
$$h(m) = g^m(\bmod p)$$ where $p$ is a prime number, how can I prove that this is a one way function and collision free? $$h(m) = g^m(\bmod n) $$ where $n=pq$ for two distinct primes $p,q$, how can I prove that it is a one way function and collision free?
Assume that the encryption uses $n$-bit keys to encrypt $l(n)$-length messages. If a symmetric key encryption scheme is defined as $\Pi_{1} = ( \mathrm{Enc}, \mathrm{Dec} )$, then for every $x_{0}, x_{1} \in \{0,1\}^{l(n)}$, $$ \left\vert \Pr\left[ A (\mathrm{Enc}_{U_{n}}(x_{0})) = 1\right] - \Pr\left[ A (\mathrm{Enc}_...
I can't seem to wrap my head around what benefit OAEP provides (specifically with RSA). Lets consider really small numbers for a moment. If the random source in the padding algorithm gave a random value in the range of 1-100, then each unique message value could be represented by 100 different padded values. Isn't this...
We say a symmetric key encryption scheme $\Pi_{1} = (\mathrm{Gen}, \mathrm{Enc}, \mathrm{Dec})$ is computational security if for every PPT algorithm $A$ and every $x_{0}, x_{1}$ ($|x_{0}| = |x_{1}|$), $$ \left\vert \Pr\left[\mathrm{Gen}(1^{n})=k; A (\mathrm{Enc}_{k}(x_{0})) = 1\right] - \Pr\left[\mathrm{Gen}(1^{n})=k; ...