instruction
stringlengths
15
30k
Are side-channels possible with ARX ciphers?
It's a basic question I guess, but I don't know the answer and I don't think that anyone asked it. Suppose I built a system, it relies on MD5 for security, suddenly I read am article on how easy are MD5 to crack nowadays. Not being able to implement other algorithms, I multiply the MD5 hash by Pi, and some Fibona...
Does complicating a flawed algorithm make it secure?
Firstly, a number theory textbook might well help here. I own [An Introduction to the theory of numbers](http://www.amazon.co.uk/Introduction-Theory-Numbers-G-Hardy/dp/0199219869/ref=sr_1_1?ie=UTF8&qid=1328113687&sr=8-1) which will give you a grounding in this and many other number theory topics which crop up in crypto...
Say we construct a pseudo-random number generator from a pseudo-random function $f$ (using some constant key $k$ and some initial value $v_0$). We do this by feeding the output block of the PRF back into the PRF to produce a new block of pseudo-random bits. That is, $B_{i+1} = f_k(B_i)$. Is that backtracking-resistant?...
If a PRG is constructed by iterating a PRF, is it backtracking-resistant?
I want to encrypt a message so that it can only be decrypted once. I know that we can use nonces to do this when we exchange data over a communication channel, but in my case the cipher text will be stored on a disc. Is there any way to do so? Thanking you so much in advance
It's a basic question I guess, but I don't know the answer and I don't think that anyone asked it. Suppose I built a system, it relies on MD5 for security, suddenly I read am article on how easy are MD5 to crack nowadays. Not being able to implement other algorithms, I multiply the MD5 hash by Pi, and some Fibona...
From this [answer][1]: > However, that wasn't the only situation they had in mind; they also > considered the case where someone implemented 2 key 3DES in hardware > (which the first and last subkeys were constrained to be the same) Why are the first and last keys constrained to be the same? [1]: http://c...
Why in 3 DES implemented in hardware 1st and 3rd key must be the same?
I want to encrypt a message so that it can only be decrypted once. I know that we can use nonces to do this when we exchange data over a communication channel, but in my case the cipher text will be stored on a disc. Is there any way to do so?
Encryption that can only be decrypted once?
Why do 1st and 3rd key have to be the same in 2 key 3DES?
So we've been using RSA for a while now. I wonder, is it still secure? I'm wondering whether surveillance agencies can at this point read traffic encrypted with say, TLS_ECDH_RSA_WITH_AES_128_GCM? Ultimately, what is the best way to implement https? RSA? DSA? ECDSA? ECDH? Is elliptic curve stronger/more secure t...
Disclaimer: I would have posted this as a comment but I do not have enough reputation. First of all, assuming you manage to safely generate RSA keys which are sufficiently large, i.e. >= 2048 bits, no TLS configuration flaw on your side and the lack of security bugs in the TLS library used by your server or the one ...
The test vectors listed in https://github.com/cantora/avr-crypto-lib/blob/master/testvectors/Mickey-v2-128-unverified.test-vectors Are represented as Hex strings? I'm sure that the key is, because it's length is 32. And each hex digit, nibble, is 4 bits. So 32x4=128. But what about the stream generated? How are...
In recent crypto there has been a trend to design ciphers using only the [ARX set of instructions][1] - i.e. additions (modulo $2^{32}$ or $2^{64}$), rotations (by a fixed constant) and XORs, examples include [Threefish][2], [Salsa20 and ChaCha20][3]. One of the nicer, claimed properties of such ciphers is that the...
In recent crypto there has been a trend to design ciphers using only the [ARX set of instructions][1] - i.e. additions (modulo $2^{32}$ or $2^{64}$), rotations (by a fixed constant) and XORs, examples include [Threefish][2], [Salsa20 and ChaCha20][3]. One of the nicer, claimed properties of such ciphers is that the...
Which precautions to protect against side-channel attacks on ARX ciphers?
Assuming you manage to safely generate RSA keys which are sufficiently large, i.e. >= 2048 bits, no TLS configuration flaw on your side, and the lack of security bugs in the TLS library used by your server or the one used by the client user agent, I do not believe `TLS_ECDH_RSA_WITH_AES_128_GCM` can, at this point, be ...
I've been given a message in 4 digit numbers but it doesn't seem to work when I use my calculated values for phi(m) and d. If I'm correct phi(m) = (p-1)(q-1) correct? And d is given by ed = 1mod(phi(m))? And from this, it can be calculated by the smallest number in which ed-1 can be divided by phi(m)?
There's a problem with boundaries here; how much "complication" is allowed? I could argue that SHA-2 is a complication of SHA-1 because they both use a Merkle-Damgård construction and have other similar elements. Then again, they are significantly different internally. On the other hand the addition of a single bitw...
> The key size used for an AES cipher specifies the number of repetitions of transformation rounds that convert the input, called the plaintext, into the final output, called the ciphertext. The number of cycles of repetition are as follows: 10 cycles of repetition for 128-bit keys. 12 cycles of repetition ...
>So my question is: it says 10 cycles, but does that mean that the initial round is performed once, the normal rounds 9 times, and the final round also once? Because the expanded key is 176-bytes, so the addroundkey function can be used 176/16 = 11 times. For the 128-bit AES, that is correct. **InitialRound**, wh...
In one of my assignments, I had the following question (Please read on. Not a homework assignment :) ): > X.509 (1998 version) lists properties that RSA keys must satisfy to be > secure. One such requirement is that the public exponent <code>e > > log<sub>2</sub>(n)</code> where n is the modulus. Consider the > ...
i have a question about CBC operating mode. what problem happen if we always use IV Zero in CBC Mode?
what problem happen if we always use IV Zero in CBC Mode?
In one of my assignments, I had the following question (Please read on. Not a homework assignment :) ): > X.509 (1998 version) lists properties that RSA keys must satisfy to be > secure. One such requirement is that the public exponent $e > log_2(n)$ where n is the modulus. Consider the > following justifications...
In one of my assignments, I had the following question (Please read on. Not a homework assignment :) ): > X.509 (1998 version) lists properties that RSA keys must satisfy to be > secure. One such requirement is that the public exponent $e > \log_2(n)$ where n is the modulus. Consider the > following justification...
is there any relation between 2 string with same MD5 hash? for example these two string : 0e306561559aa787d00bc6f70bbdfe3404cf03659e704f8534c00ffb659c4c8740cc942feb2da115a3f4155cbb8607497386656d7d1f34a42059d78f5a8dd1ef and 0e306561559aa787d00bc6f70bbdfe3404cf03659e744f8534c00ffb659c4c8740cc942feb2da1...
is there any relation between 2 string with same MD5 hash?
I'd like to encrypt work-related data backups stored on an external drive. The backups contain proprietary company information and trade secrets. My current backup program, Comodo Backup, allows me to encrypt backup files with AES, Serpent, XOR, and other schemes. However, I've read about vulnerabilities in encrypti...
Are all encryption tools made equal?
The requirement was introduced in [IUT Recommendation X.509 (November 1993)][1], informative appendix D.5.2: > It must be ensured that e > log<sub>2</sub>(n). If not, then the simple operation of taking the integer e<sup>th</sup> root of a ciphertext block will disclose the plaintext. This advice is misguided, an...
I'd like to encrypt work-related data backups stored on an external drive. The backups contain proprietary company information and trade secrets. My current backup program, Comodo Backup, allows me to encrypt backup files with AES, Serpent, XOR, and other schemes. However, I've read about vulnerabilities in encrypti...
The requirement was introduced in [IUT Recommendation X.509 (November 1993)][1], informative appendix D.5.2: > It must be ensured that e > log<sub>2</sub>(n). If not, then the simple operation of taking the integer e<sup>th</sup> root of a ciphertext block will disclose the plaintext. This advice was removed in t...
Two suggestions: 1. Does it simplify the problem for you if you omit n? (or only consider the n=1 case) 2. Suppose F(x⊕1<sup>n</sup>) would *not* be a pseudorandom function, what does that tell you about the pseudorandomness of the original function F?
There's a problem with boundaries here; how much "complication" is allowed? I could argue that SHA-2 is a complication of SHA-1 because they both use a Merkle-Damgård construction and have other similar elements. Then again, they are significantly different internally. On the other hand the addition of a single bitw...
Suppose $n=pq$, where p,q are prime numbers. let $p ( \le q)$ be the smallest prime, then we know that $p \le \sqrt{n}$. In trail division, we check $n \mod i$ for the values of $i$ from 2 to $\sqrt{n}$, to find the value of $p$ and then we calculate $\dfrac{n}{p}$ to get $q$. In general the time complexity ...
Suppose $n=pq$, where p,q are prime numbers. let $p ( \le q)$ be the smallest prime, then we know that $p \le \sqrt{n}$. In trail division, we check $n \mod i$ for the values of $i$ from 2 to $\sqrt{n}$, to find the value of $p$ and then we calculate $\dfrac{n}{p}$ to get $q$. In general the time complexity ...
There's a problem with boundaries here; how much "complication" is allowed? I could argue that SHA-2 is a complication of SHA-1 because they both use a Merkle-Damgård construction and have other similar elements. Then again, they are significantly different internally. On the other hand the addition of a single bitw...
[FIPS 202](http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf) define 2 functions: - SHAKE126 - SHAKE256 As extendable-output functions (XOFs) that can have variable output length. But in Appendix A.2 marks: > it is possible to use an XOF as a hash function by selecting a fixed output length. However,...
What is use case for XOF functions (i.e. SHAKE128/256)?
[FIPS 202](http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf) defines 2 functions: - SHAKE126 - SHAKE256 As extendable-output functions (XOFs) that can have variable output length. But in Appendix A.2 marks: > it is possible to use an XOF as a hash function by selecting a fixed output length. However...
What is the use case for XOF functions (i.e. SHAKE128/256)?
I'm thinking of ZRTP and OTR in particular here. From my understanding, after a Diffie-Hellman session is initiated, the shared secret is then hashed into a 4-digit number, which the two parties can then check out-of-band (or in ZRTP in-band, assuming that people can recognize each others' voices). How is this possi...
Do low-entropy fingerprints actually make any sense?
There's a problem with boundaries here; how much "complication" is allowed? I could argue that SHA-2 is a complication of SHA-1 because they both use a Merkle-Damgård construction and have other similar elements. Then again, they are significantly different internally. On the other hand the addition of a single bitw...
[FIPS 202](http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf) defines 2 functions: - SHAKE128 - SHAKE256 As extendable-output functions (XOFs) that can have variable output length. But in Appendix A.2 marks: > it is possible to use an XOF as a hash function by selecting a fixed output length. However...
Is there any relation between two strings with same MD5 hash? For example these two strings: 0e306561559aa787d00bc6f70bbdfe3404cf03659e704f8534c00ffb659c4c8740cc942feb2da115a3f4155cbb8607497386656d7d1f34a42059d78f5a8dd1ef and e306561559aa787d00bc6f70bbdfe3404cf03659e744f8534c00ffb659c4c8740cc942f...
is there any relation between two strings with same MD5 hash?
This question revolves around the Hashing Algorithm attribute that the resulting digest is always the same size (also known as Fixed Width). For example, whether you hash the word "hello", or 10gb file, MD5 will always return a 128 bit digest. My question is, ***how* do hashing algorithms always result in a constant...
How does a Hashing algorithm always result in a digest in a fixed size?
Wolfram alpha can do this: http://www.wolframalpha.com/input/?i=multiplicative+inverse+of+65537+mod+265291078722948385056973898354378582740 yields d = 240894030773496778838526583320400223673 The alternative is to write a small C program using gmp or using python, e.g.
In general, **no**: two bitstrings with the same MD5 need not be related by a simple relation (other than the obvious _have the same MD5_). Argument: by the [pigeonhole principle][1], if you take any set of $2^{128}+1$ distinct bitstrings, at least two are bound to have the same MD5. However, ***SOME OF*** the effi...
In general, **no**: two bitstrings with the same MD5 need not be related by a simple relation (other than the obvious _have the same MD5_). Argument: take $2^{128}+1$ distinct unrelated bitstrings (e.g. random 440-bit bitstrings); by the [pigeonhole principle][1], at least two are bound to have the same MD5. Howeve...
In the *Guillou-Quisquater Protocol*, the prover convinces the verifier that he knows an $e$-th root of an element $y \in \mathbb{Z}^*_n$ ($p, q, e$ are primes, $n = pq$ and $e$ is coprime with $\varphi(n)$). The protocol between prover $P$ and verifier $V$ (see [here][2] for instance) is: 1. $P$ picks $r$ at ran...
Is there any advantage to using an IV larger than a cipher's block size? Say I'm using AES-256 in Galois Counter Mode (GCM). My file format looks like this: [IV] [Ciphertext] Normally, the IV will be 256 bits, or 32 bytes, if the block size is 256 bits. Is there any advantage at all in using an IV _la...
IV larger than block size of cipher?
Smart and Vercauteren proposed [a homormophic encryption scheme (PKC 2010)][1] following Gentry's principles. Though their scheme can achieve fully homormophism theoretically, they admited that "for practical values of n our scheme cannot be made fully homomorphic" (p. 16). However,perhaps the only public fully (not...
Why can the Smart-Vercauteren Homomorphic Encryption been implemented as a practically fully homomorphic encryption?
In general, **no**: two bitstrings with the same MD5 need not be related by a simple relation (other than the obvious _have the same MD5_). Argument: take $2^{128}+1$ distinct random $1024$-bit bitstrings; by the [pigeonhole principle][1], at least two are bound to have the same MD5; since less than $2^{257}$ pairs of...
In general, **no**: two bitstrings with the same MD5 need not be related by a simple relation (other than the obvious _have the same MD5_). Argument: take $2^{128}+1$ distinct random $1024$-bit bitstrings; by the [pigeonhole principle][1], at least two are bound to have the same MD5; since less than $2^{257}$ pairs of...
Smart and Vercauteren proposed [a homormophic encryption scheme (PKC 2010)][1] following Gentry's principles. ​ Though their scheme can achieve fully homormophism theoretically, they admited that "for practical values of n our scheme cannot be made fully homomorphic" (p. 16). However, perhaps the only public fully (...
Why can the Smart-Vercauteren Homomorphic Encryption be implemented as a practically fully homomorphic encryption scheme?
In general, **no**: two bitstrings with the same MD5 need not be related by a simple relation (other than the obvious _have the same MD5_). Argument: take $2^{128}+1$ distinct random $1024$-bit bitstrings; by the [pigeonhole principle][1], at least two are bound to have the same MD5; since less than $2^{257}$ pairs of...
Is there any relation between two strings with the same MD5 hash? For example these two strings: 0e306561559aa787d00bc6f70bbdfe3404cf03659e704f8534c00ffb659c4c8740cc942feb2da115a3f4155cbb8607497386656d7d1f34a42059d78f5a8dd1ef and e306561559aa787d00bc6f70bbdfe3404cf03659e744f8534c00ffb659c4c8740cc...
Is there any relation between two strings with the same MD5 hash?
Paper link:[Paper][1] page 4 In the multiplication below equation is mentioned in BGN: [![enter image description here][2]][2] I could not understand difference between e hat and e without hat. An explanation with examples will be appreciated. According to paper, e hat is a Weil Pairing Distortion map but...
The below equation is mentioned in [Homomorphic Encryption and the BGN Cryptosystem][1] (pdf, page 4): * Mult(pk, $C_1$, $C_2$): Choose $u \xleftarrow{R} [1, n]$ and output $D = \hat{e}(C_1, C_2) \cdot e(Q, Q)^u \in \mu_n$. I could not understand difference between $\hat{e}$ and $e$ without the hat. An explana...
Smart and Vercauteren proposed [a homomorphic encryption scheme (PKC 2010)][1] following Gentry's principles. ​ Though their scheme can achieve fully homomorphism theoretically, they admitted that "for practical values of n our scheme cannot be made fully homomorphic" (p. 16). However, perhaps the only public fully ...
Can the Smart-Vercauteren Homomorphic Encryption be implemented as a practical fully homomorphic encryption scheme?
I'm just read [this article][1] from Atmel corporation in comparing RSA with ECC cryptography algorithms. First of all please read these two paragraphs quoted from the article: **P1: Strength of an algorithm** > The level of security in systems is becoming a primary concern as you > would expect. Most cryptog...
I found these following values ALWAYS have the leading 00 in public/private key, > public key: modulus > > private key: modulus, p,q, d mod (p-1), d mod (q-1), coefficient e.g., modulus 00 <= the leading 00 da ff 24 57 07 8a 4c b8 63 79 79 ff 55 27 10 15 0f 6c ab 0e 17 dc 05 1a d3 4f ...
I've only just started research on cryptography so I apologize if this is a basic question or I'm getting terms confused. I'm researching braid group cryptography and currently looking at the Anshel-Anshel-Goldfeld key exchange protocol applied to braid groups via the colored Burau representation. Both parties have...
How is a group element converted into a key?
Lets imagine that cipher (say AES256 in CBC mode) is initialized when application starts: C = cipher.Create K = kdf(password, iterations, salt) C.Initialize(K, iv) burn(K) At this point I have initialized cipher C. Key K is burned. Cipher C will be used to encrypt/decrypt data on demand (data ...
Key material leak from initialized cipher?
I've read the following paper and have one question on it. M. Luby and J. Staddon, "Combinatorial Bounds for Broadcast Encryption", EUROCRYPT'98. On page 523 (12th page of the paper) the authors say "there are at most $2^{tm}$ petals in $\mathcal{F}$ which don't split any of the blocks, $L_i$." However, I don'...
> Or in other words, is keeping initialized cipher in memory basically equal to keeping key in memory? In the case of AES, yes, every time you encrypt (or decrypt) another block of data you need the key (or equivalent information, like the round keys), so the cipher instance must have it somewhere. Other ciphers ...
Let's imagine that cipher (say AES256 in CBC mode) is initialized when application starts: C = cipher.Create K = kdf(password, iterations, salt) C.Initialize(K, iv) burn(K) At this point I have initialized cipher C. Key K is burned. Cipher C will be used to encrypt/decrypt data on demand (data...
Let $f$, $g$, and $h$ be hash functions that each map binary strings of length $2n$ to binary strings of length $n$. Suppose that $h(x) = f(g(x)||g(x))$. Prove that if $f$ and $g$ are collision resistant then $h$ is also collision resistant. This question was asked on an earlier assignment and my professor had take...
Proving collision resistance of a hash function?
I've only just started research on cryptography so I apologize if this is a basic question or I'm getting terms confused. I'm researching braid group cryptography and currently looking at the Anshel-Anshel-Goldfeld key exchange protocol applied to braid groups via the colored Burau representation. Both parties have...
Why Tor alone is not enough to guarantee the anonymity in Bitcoin? Why we need the constructions like [Zerocoin][1]? [1]: http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=6547123
Why Tor alone is not enough to guarantee the anonymity in Bitcoin?
Why is Tor alone not enough to guarantee anonymity for Bitcoin? <br> Why do we need the constructions like [Zerocoin][1]? [1]: http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=6547123
Why is Tor alone not enough to guarantee anonymity for Bitcoin?
Can someone explain to me (Or better yet, point me to a tool that does the brute forcing) how to crack a standard, simple RSA cipher (So don't bother with padding) if I know just one public key, the ciphertext, and some text that I know for sure is part of the plaintext? Please don't point me to the Wikipedia articl...
Consider the following modification of RC4: i ← 0 j ← 0 K ← 0 -- We will remember the previous output keystream byte. repeat i ← (i + 1) mod 256 j ← (j + S[i] + K) mod 256 -- Use the previous keystream byte -- for "ciphertext feedback". ...
Is it secure to use ciphertext feedback with RC4?
> Let $f$, $g$, and $h$ be hash functions that each map binary strings > of length $2n$ to binary strings of length $n$. Suppose that $h(x) = f(g(x)||g(x))$. Prove that if $f$ and $g$ are collision resistant > then $h$ is also collision resistant. This question was asked on an earlier assignment and my professo...
I've read the following paper and have one question on it. [M. Luby and J. Staddon, "Combinatorial Bounds for Broadcast Encryption", EUROCRYPT'98.][1] On page 523 (12th page of the paper) the authors say "there are at most $2^{tm}$ petals in $\mathcal{F}$ which don't split any of the blocks, $L_i$." However, I...
Consider the following modification of RC4: i ← 0 j ← 0 K ← 0 -- We will remember the previous output keystream byte. repeat i ← (i + 1) mod 256 j ← (j + S[i] + K) mod 256 -- Use the previous keystream byte -- for "ciphertext feedback". ...
There is a java library for android which implements integrity checking to predefined encrypting mode(which can be found [here](https://github.com/tozny/java-aes-crypto)). In this case it is AES-CBC. The thing is that i can feed to Cipher.getInstance AES-GCM, too. Which, already have built-in integrity checking. So the...
Is it an overkill to add external integrity check to the AES-GCM encoding?
Imagine a branchless implementation of the AES-128 cipher. Are there any benefits over the implementation that contains branches, other than possible prevention of timing attacks? Is it even true, that a branchless code can mitigate a timing attack? Are there any other side-channel attacks that are prevented in this...
Is there such thing as "hash reset sequence" that brings hash to the same known state? **UPDATE**: s/initial/known/ The question is - hash function is a state. In MD5 and other vulnerable to `length extension attack` hashes, the attack works by continuing computation from existing hash. So, the question here is -...
I'm to answer your question and say that yes, complicating an algorithm can make it secure. But I'm also going to define *complicate* the way I want to define it, not necessarily the way you want to define it. The [Luby-Rackoff theorem](https://en.wikipedia.org/wiki/Feistel_cipher) tells us that if we have a good en...
I found these following values ALWAYS have the leading 00 in public/private key, > public key: modulus > > private key: modulus, p,q, d mod (p-1), d mod (q-1), coefficient e.g., modulus 0007: 02 81 81 ; INTEGER (81 Bytes) 000a: | 00 <= the leading 00 000...