instruction
stringlengths
15
30k
Is there any bias in certain parts of the hash? E.g., first `n` bits are more/less unique than the last/middle `n` bits? Is there any particular property of any group of bits that makes it more/less unique? Thanks
Is any group of bits in a SHA-1 hash more/less unique than other?
Do you mind if you give me any hints, links or ideas about how to improve the security of double regular encryption and decryption, by using CPA game and CCA game, it sounds interesting question, and I'm still discussing it with my classmate. Given the following info, The key generation algorithm (PK, SK) ← Gen(1λ)...
Is any group of bits in a SHA-1 hash more/less unique than another?
SHA1 Collisions - what about practical attacks?
Do you mind if you give me any hints, links or ideas about how to improve the security of double regular encryption and decryption, by using CPA game and CCA game, it sounds interesting question, and I'm still discussing it with my classmate. Given the following info, The key generation algorithm $(PK, SK) \leftarr...
Lamport signature: How many signatures are needed to forge a signature?
**tl;dr** this is **not** a duplicate of "what is a salt/why use salt?" question. Instead it is specificly asking when salt **may not be necessary** for hashing securly? (i.e. when the data being hashed is already as high-entropic as that chances for duplicates is very very low) **Reasoning underlying the question**...
Is there (this) a case in which salting is dispensable?
Having a DSA/ECDSA signature which is supposed to be DER encoded as an ASN.1 sequence of $r$ and $s$ (as described in the RFC), and being given some bytes which are ``"some valid DER encoded ASN.1" || "some extra bytes"`` – is the correct behavior to error out, or would it be more correct to proceed to attempt to verif...
In some cryptographic protocols I have seen messages protected for confidentiality, authenticity, replaying attacks, reordering attacks, etc. What protects a protocol from an attacker in a privileged network position (e.g. in control of a majority of the fibre networks connecting countries) from just dropping messa...
I assume you are familiar with $P$ and $NP$. Also, my knowledge of SNARKs is based mostly on [the work of Parno et al.][1], other work may differ in some fine details. So, a SNARK is a succinct non-interactive argument of knowledge. Leaving the "knowledge" part aside for the moment, let's look at "plain" succinct no...
The question asks how a collision in a hash such as SHA-1 could become a practical concern, with focus on the case of a public-key certificate à la X.509. I'll assume an attacker has enough resource to perform one single attack on SHA-1 with a small change: the value of the (arbitrary) 160-bit initialization value, ...
The question asks how a collision in a hash such as SHA-1 could become a practical concern, with focus on the case of a public-key certificate à la X.509. I'll assume an attacker has enough resource to perform one single attack on SHA-1 with a small change: the value of the (arbitrary) 160-bit initialization value, ...
I have two network endpoints that need to use the same derived key. Can the server send the salt to the client 'in the clear'?
Is the salt used with PBKDF2 secret?
I'm in search of the correct definition of a *stateful* authenticated encryption scheme (sAE), and its related security notion. This has been treated several times in the academic literature, however, all the papers I've read contains a discrepancy between how they state the security goal in informal English and their ...
While reading [this article on rank attacks on STS](http://eprint.iacr.org/2004/237) (a public-key scheme based on Multivariate Quadratic (MQ) equations), I stumbled upon some claims that I've also seen in other presentations on rank-attacks. However I'm not able to see why this claim follows. A description of STS and...
The question asks how a collision in a hash such as SHA-1 could become a practical concern, with focus on the case of a public-key certificate à la X.509. I'll assume an attacker has enough resource to perform one single attack on SHA-1 with a small change: the value of the (arbitrary) 160-bit initialization value, ...
Here's my issue and someone can help me understand it so I can program it correctly. I have a point(X,Y) on an Elliptical Curve E(a,b) where a=-3 and B is a large number that is in hexidecimal from -51BD. To compress this point oficially in a program, we know that every X on the curve has two Y's, one even and one...
I have a point $(X,Y)$ on an elliptical curve $E(a,b)$ where $a=-3$ and $B$ is a large number that is in hexadecimal from -51BD. To compress this point oficially in a program, we know that every $X$ on the curve has two $Y$'s, one even and one odd. Therefore, we only need to store whether the corresponding $Y$ point we...
According to [RFC 2409][1]: CKY-I and CKY-R are the Initiator's cookie and the Responder's cookie, respectively, from the ISAKMP header. Each CKY is a 64 bit value that is included in each [ISAKMP Header][2] in the Phase1 and Phase2 negotiation, and future ISAKMP informational exchanges. And they are ...
What is the functional role of CKY-I and CKY-R in ISAKMP (IKEv1)?
The question asks how a collision in a hash such as SHA-1 could become a practical concern, with focus on the case of a public-key certificate à la X.509. --- I'll first give an example involving executable code signing. I'll assume an attacker with enough resources to perform one single attack on SHA-1 with a sma...
A signature of some data can mean many different things, such as: This is a message I sent, this is a certificate I validated,... So I was surprised that common signing schemes don't include a "purpose" parameter as part of the signature. In particular I didn't find such a parameter in the schemes from PKCS#1. Other...
I know: Never do your own crypto. But this question is just theoretical. Assume you do a Diffie-Hellman Key Exchange with a server to produce a shared secret $x$. Then use a cryptographic hash function like SHA3 to generate a pseudorandom bitstream like this: $$p_i = \operatorname{SHA3}(x||p_{i-1}).$$ To encr...
> What is the functional role they play? They exist to identify the SA. That is, when an IKE implementation receives an IKE packet, it is able to use the cookies to identify the SA that the packet corresponds to. > Why not simply use an SPI value like IPsec does? Why do you think there is some fundamental dif...
The question asks how a collision in a hash such as SHA-1 could become a practical concern, with focus on the case of a public-key certificate à la X.509. --- I'll first give an example involving executable code signing. I'll assume an attacker in a position to write bootstrap code (like, the supplier of a developm...
The question asks how a collision in a hash such as SHA-1 could become a practical concern, with focus on the case of a public-key certificate à la X.509. --- I'll first give an example involving executable code signing. I'll assume an attacker in a position to write bootstrap code (like, the supplier of a developm...
The question asks how a collision in a hash such as SHA-1 could become a practical concern, with focus on the case of a public-key certificate à la X.509. --- I'll first give an example involving executable code signing. I'll assume an attacker in a position to write bootstrap code (like, the supplier of a developm...
The question asks how a collision in a hash such as SHA-1 could become a practical concern, with focus on the case of a public-key certificate à la X.509. --- I'll first give an example involving executable code signing. I'll assume an attacker in a position to write bootstrap code (like, the supplier of a developm...
The question asks how a collision in a hash such as SHA-1 could become a practical concern, with focus on the case of a public-key certificate à la X.509. --- I'll first give an example involving executable code signing. I'll assume an attacker in a position to write bootstrap code (like, the supplier of a developm...
The question asks how a collision in a hash such as SHA-1 could become a practical concern, with focus on the case of a public-key certificate à la X.509. --- I'll first give an example involving executable code signing. I'll assume an attacker in a position to write bootstrap code (like, the supplier of a developm...
Why can't people make a hash function that requires dozens of mega bytes of memory instead of cpu to avoid all the cracking and hacking? What I have in mind myself is this: we have an input X, we choose hash function SHA256, make a multiple megabyte array. 1.Hash X and put it in the beginning of the array. ...
![enter image description here][1]can we help me thanks? It has known that DES has key-complementation property. That is, given a key k and any message m 2 f0; 1g64 DESK(x) = DESK(x): By using this property, show that the key search of DES can be speed up by a factor two. look at image [1]: https://i.sta...
key-complementation property?
I understand that if a block cipher has $k$-bit keys and $n$-bit input/output blocks, then if $k>n$, we can expect one message-ciphertext pair to narrow us down (I think?) to $2^{k-n}$ possible keys, right? But doesn't DES/AES have a similar system as a block cipher with keys bigger than the blocks. So surely finding o...
Can we help me thanks? It is known that DES has the _key-complementation property_. That is, given any key $k$ and any message $m\in\{0,1\}^{64}$ $$\operatorname{DES}_k(m)=\overline{\operatorname{DES}_\overline k(\overline m)}$$ By using this property, show that the key search of DES can be sped up by a factor ...
Key-complementation property?
> I understand that if a block cipher has $k$-bit keys and $n$-bit input/output blocks, then if $k>n$, we can expect one message-ciphertext pair to narrow us down (I think?) to $2^{k−n}$ possible keys, right? That is approximately correct (if the block cipher with the wrong key acts like a random permutation; this i...
I was reading upon Biham and Shamir's paper and a fact has been presented over there: if $ P_1 = \bar P_2$ and I choose a key $K_1 = \bar K_2$ then in that case $$T_1 = DES(P_1, K_1)$$ $$T_2 = DES(P_2, K_2)$$ then $T_1 = \bar T_2$ . Does this hold for only that particular combination of S-box or it will be same ...
Why can't people make a hash function that requires dozens of mega bytes of memory instead of cpu to avoid all the cracking and hacking? What I have in mind myself is this: 0. We have an input X, we choose hash function SHA2-256, make a multi-megabyte array. 1. Hash X and put it in the beginning of the array. ...
Memory-expensive hash from an array of hashes?
[Here](http://screencast.com/t/v8NkmfFTR) is an image hidding some information. I need to discover, what is the hidden text. ![][1] I tried to interpret this as 27 letter alphabet(with space) in columns, tried this with Ceasar cipher. No meaningfull English word has occured. Does somebody have an idea what ...
> How can I be sure that the prover actually has a three-coloring? Prover responds with colors of just one single edge chosen by Verifier. In case he has valid coloring, his response is consistent with commitments with probability $1$; if not - he errs with a small probability, as answered by tylo. I'm writing this ...
There are published techniques for cracking LCGs, but to my eye those techniques seem very brittle — very minor changes can add nonlinearity that renders techniques like the LLL algorithm unusable. Or, am I mistaken, are these variations still easy to crack? ## Background One thing that perplexes me somewhat ab...
Why can't people make a hash function that requires dozens of mega bytes of memory instead of cpu to avoid all the cracking and hacking? What I have in mind myself is this: 0. We have an input X, we choose hash function SHA2-256, make a multi-megabyte array. 1. Hash X and put it in the beginning of the array. ...
There are alot of trade-offs ina various tasks. People actually CAN do the things you're describing, and the question is not just about the particular task. The problem/point is, that there's no option in - for example - OpenSSL : what to use? CPU-costly or Memory-costly algo? That's a pity that there is no such option...
Why can't people make a hash function that requires dozens of mega bytes of memory instead of cpu to avoid all the cracking and hacking? What I have in mind myself is this: 0. We have an input X, we choose hash function SHA2-256, make a multi-megabyte array. 1. Hash X and put it in the beginning of the array. ...
Why can't people make a hash function that requires dozens of mega bytes of memory instead of cpu to avoid all the cracking and hacking? What I have in mind myself is this: 0. We have an input X, we choose hash function SHA2-256, make a multi-megabyte array. 1. Hash X and put it in the beginning of the array. ...
It is written in the [HMAC][1] paper that the $ipad=0x36$ and $opad=0x5c$ were chosen such that it maximize the [Hamming-Distance][2] of the part of the key used in the inner and outer part of the HMAC process. Since `0x36=0b0110110` and `0x5c=0b1011100` It seems that the Hamming distance is 4, but I would expect ...
I'm new but thought I'd ask a question because I can't seem to find an answer to this anywhere. When people talk about hash functions, they usually say that they accept arbitrary-length input, but if you actually look at the padding (eg MD-strengthening padding), you see it's like M100.000||length where length is th...
MD-compliant hashes don't really accept arbitary length input, do they?
It is written in the [HMAC][1] paper that the $ipad=0x36$ and $opad=0x5c$ were chosen such that it maximize the [Hamming-Distance][2] of the part of the key used in the inner and outer part of the HMAC process. Since `0x36=0b0110110` and `0x5c=0b1011100` It seems that the Hamming distance is 4, but I would expect ...
When people talk about hash functions, they usually say that they accept arbitrary-length input, but if you actually look at the padding (eg MD-strengthening padding), you see it's like M100.000||length where length is the binary representation in bytes or bits. But what if the length is so large that you can't represe...
Why can't people make a hash function that requires dozens of mega bytes of memory instead of cpu to avoid all the cracking and hacking? What I have in mind myself is this: 0. We have an input $X$, we choose hash function SHA2-256, make a multi-megabyte array. 1. Hash $X$ and put it in the beginning of the arra...
According to [RFC 2409][1]: > CKY-I and CKY-R are the Initiator's cookie and the Responder's cookie, respectively, from the ISAKMP header. Each CKY is a 64 bit value that is included in each [ISAKMP Header][2] in the Phase1 and Phase2 negotiation, and future ISAKMP informational exchanges. And they are also used...
For my understanding salts in password hashes are used to prevent the precomputation of $plaintext \to hashvalues$ (rainbow tables). I know from different threads, it is not necessary to keep the salt secret (ie it doesn't need to be encrypted), but nevertheless I was wondering if it would be a problem by making it ...
I have a question about RSA key generation. This is a simple RSA algorithm: Choose p = 3 and q = 11 Compute n = p * q = 3 * 11 = 33 Compute ?(n) = (p - 1) * (q - 1) = 2 * 10 = 20 Choose e such that 1 < e < ?(n) and e and n are co-prime. Let e = 7 Compute a value for d such that (d * e) % ?(n) = 1. d=3...
I'm learning the POK notion and definitions and as a self exercise I wante to prove the statement that the Hamiltonicity protocol is a POK system with knowledge error $1/2$. So the question will be self-contained, I provide here the slide describing the protocol (credits to Moni Naor, Weizmann institute). > ![cop...
I came across <a href="http://crypto.stackexchange.com/questions/606/time-capsule-cryptography/12694">this question</a> with <a href="http://crypto.stackexchange.com/questions/606/time-capsule-cryptography/12694#610">this answer</a> about a cryptographic timelock-puzzle that needs approximately 30 years to be solved. T...
I came across <a href="http://crypto.stackexchange.com/questions/606/time-capsule-cryptography/12694">this question</a> with <a href="http://crypto.stackexchange.com/questions/606/time-capsule-cryptography/12694#610">this answer</a> about a cryptographic timelock-puzzle that needs approximately 30 years to be solved. T...
Hello guys I am looking to calculate the Inverse of a given polynomial in Galois field I have found the little Fermat's algorithm and the Itoh-Tsujii I am getting a bit confused with both algorithm as if having a squaring and multiplication operation should a reduction modulus be used [A.A mod F(x)] and then A.[A....
I'm reading [“Identity-Based Broadcast Encryption with Constant Size Ciphertexts and Private Keys”](http://link.springer.com/content/pdf/10.1007%2F978-3-540-76900-2_12.pdf) by Cécile Delerablée. In Page 207, encryption process needs $\gamma$ which is part of master key. This does not make sense. I want to kno...
I have a construction that requires as primitive an Additively Homomorphic Encryption scheme that does not rely on hidden group order, meaning I can't use Paillier. I now have two different instantiations of that primitive: - Additive ElGamal, with its issue of small message space. - Regev scheme based on LWE,...
I've read the [CBC-R description from Rizzo & Duong](https://www.usenix.org/legacy/events/woot10/tech/full_papers/Rizzo.pdf) but am having trouble understanding the sequence of steps that would be taken when the IV is unknown and is not included with the ciphertext. Suppose I want to send a two-block ciphertext such...
From the literature, it looks like the security proofs of sponge functions depend on how well they approximate a random permutation, Since a block cipher also ideally behaves like a random permutation does that mean strong block ciphers make for strong sponge functions? As in, can I expect: extern char *input...
Is a strong block cipher usable as a strong sponge function?
I read some books talk about RSA cryptography but I did not understand something when choosing a public key $e$ Sometimes the condition is $1<e<$$\phi(n)$ Where $\phi(n) = p-1 * q-1$ also sometimes is $e \in [{1,2,...,\phi(n)-1}]$ also sometimes is $e$ should be prime number Examble Choose $p...
Does it necessary the public key is prime number in RSA algorithm?
Hint: modular inverses are unique, therefore the following holds: $$2^x \equiv 3 \pmod{p} ~ ~ \iff ~ ~ 2^{-x} \equiv 3^{-1} \pmod{p}$$ Now what is the inverse of $3$ modulo this particular $p$? Can you express it as a power of two modulo $p$? Solve for $x$. If you end up with a negative $x$, use Fermat's little t...
The Wikipedia page on the topic (http://en.wikipedia.org/wiki/Fiat%E2%80%93Shamir_heuristic) is completely useless as it only explains what it is and not how it works. I looked at the original paper by Fiat and Shamir, but it only contains a single construction. In other words, the so called heuristic must be an idea e...
Can someone explain why an interactive assumption is not falsifiable? Maybe I'm misunderstanding what the statement means, but isn't even a non-interactive assumption interactive, but just with a zero amount of interaction? There is no context here, just this isolated paragraph in the intro of a paper: > Due to a...
I'm developing an application to run elections. A voting system. I would like to give the ability to the voters to check later if their vote were correct computed/casted. assumptions: * each user has its own and unique voter id (64 bytes id) * we have the birthyear of an user (i.e 1977, 1982, etc) * the user ...
Suppose we are given $p$, the large prime, $g$ which is the primitive root for $p$, $b$ which is calculated as $b=g^x$ mod $p$ where $x$ is the private key and $0<x<p-1$. Also suppose we know $y=g^r$ mod $p$ where $r$ is some random number and $0<r<p-1$ and is the discrete log of $y$. We also know $s=(M-xy)(r^{-1})$...
I'm developing an application to run elections. A voting system. I would like to give the ability to the voters to check later if their vote were correct computed/casted. assumptions: * each user has its own and unique voter id (64 bytes id) * we have the birthyear of an user (i.e 1977, 1982, etc) * the user mu...
This is a work-in-progress, mostly trying to address Case 3 in the question, since the problem of Case 2 is dealt with in [another answer][1], and has been thoroughly researched: - Jacques Stern: _Secret linear congruential generators are not cryptographically secure_, [in proceedings of the 28th Annual Symposium on...
Are there different versions of CAST-256 - also known as CAST6 - available? Are there different S-Boxes available for CAST-256? If there are different versions or S-Boxes what identifier should I use to indicate them? I have an issue with [PHP mcrypt version of CAST-256](http://mcrypt.cvs.sourceforge.net/viewvc/mcry...
I'm using Boneh-Boyen-Shacham signature scheme and want to estimate complexity in my scheme. as reported in "Scott M., Efficient Implementation of Cryptographic pairings", if we set parameters as: MNT curve, k=6 and p~160, then P(point mul)=0.6 ms and P(pairing)=4.5 ms. these two measured times are used in many referen...
what is the benefit of lcm in cryptography? and what is the effect of lcm on public key? note * lcm = Least common multiple thanks
what is the benefit of lcm in cryptography?
Are there different versions of CAST-256 - also known as CAST6 - available? Are there different S-Boxes available for CAST-256? If there are different versions or S-Boxes what identifier should I use to indicate them? [EDIT] Note that "Applied Cryptography 2nd Edition" by Bruce Schneier talks about configurable S-Boxes...
Are there different versions of CAST-256 - also known as CAST6 - available? Are there different S-Boxes available for CAST-256? If there are different versions or S-Boxes what identifier should I use to indicate them? I have an issue with [PHP mcrypt version of CAST-256](http://mcrypt.cvs.sourceforge.net/viewvc/mcry...
Just to say you have **tons** of literature about that. If you need an entry point check out some papers here for instance: <http://esorics2014.pwr.wroc.pl/page2/index.html#15> Read the introductions and the related work and follow the links to find the big seminal papers in the domain. Oh also, just a rema...
In the Cocks IBE scheme it is required for the hash function, that the Jacobi symbol of its output and the universally available moduls $n = p*q$ is $+1$, so: $\Big(\frac{H(ID)}{n}\Big) = \Big(\frac{a}{n}\Big) = \Big(\frac{a}{p}\Big) * \Big(\frac{a}{q}\Big) = +1$ So, either both Jacobi symbols $\Big(\frac{a}{p}\B...
Cocks IBE Scheme: why is -a a quadratic residue mod n?
Are there different versions of CAST-256 - also known as CAST6 - available? Are there different S-Boxes available for CAST-256? If there are different versions or S-Boxes what identifier should I use to indicate them? I have an issue with [PHP mcrypt version of CAST-256](http://mcrypt.cvs.sourceforge.net/viewvc/mcry...
I'm developing an application to run elections. A voting system. I would like to give the ability to the voters to check later if their vote were correct computed/casted. assumptions: * each user has its own and unique voter id (64 bytes id) * we have the birthyear of an user (i.e 1977, 1982, etc) * the user mu...
I'm developing an application to run elections. A voting system. I would like to give the ability to the voters to check later if their vote were correct computed/casted. assumptions: * each user has its own and unique voter id (64 bytes id) * we have the birthyear of an user (i.e 1977, 1982, etc) * the user mu...
When using SHA-1 to hash an input, the result is a pseudo-random number in the numeric ID space $0 - (2^{160}-1)$. Do I loose any statistical property in the result if I use modulo to restrict the key space? Obviously, the probability of collisions increases but is the randomness affected? As an example, if I hash ...
When using SHA-1 to hash an input, the result is a pseudo-random number in the numeric ID space $0 - (2^{160}-1)$. Do I loose any statistical property in the result if I use modulo to restrict the key space? Obviously, the probability of collisions increases but is the randomness affected? As an example, if I hash ...
When using SHA-1 to hash an input, the result is a pseudo-random number in the numeric ID space $\{0\dots2^{160}-1\}$. Do I loose any statistical property in the result if I use modulo to restrict the key space? Obviously, the probability of collisions increases but is the randomness affected? As an example, if I h...
The randomness still holds in your example but it is not true for any value of `N`. For example, if the original key space was `{0,1,2}` and you wanted to restrict it to `{0,1}`, doing `mod 2` would give the following results: ``` 0 mod 2 = 0 1 mod 2 = 1 2 mod 2 = 0 ``` Clearly, `0` will occur more often ...
The randomness still holds in your example but it is not true for any value of `N`. For example, if the original key space was `{0,1,2}` and you wanted to restrict it to `{0,1}`, doing `mod 2` would give the following results: ``` 0 mod 2 = 0 1 mod 2 = 1 2 mod 2 = 0 ``` Clearly, `0` will occur more often ...
The randomness still holds in your example but it is not true for any value of `N`. For example, if the original key space was `{0,1,2}` and you wanted to restrict it to `{0,1}`, doing `mod 2` would give the following results: ``` 0 mod 2 = 0 1 mod 2 = 1 2 mod 2 = 0 ``` Clearly, `0` will occur more often ...
The randomness still holds in your example but it is not true for any value of `N`. For example, if the original key space was `{0,1,2}` and you wanted to restrict it to `{0,1}`, doing `mod 2` would give the following results: ``` 0 mod 2 = 0 1 mod 2 = 1 2 mod 2 = 0 ``` Clearly, `0` will occur more often ...
When using SHA-1 to hash an input, the result is a pseudo-random number in the numeric ID space $\{0\dots2^{160}-1\}$. Do I loose any statistical property in the result if I use modulo to restrict the key space? Obviously, the probability of collisions increases but is the randomness affected? As an example, if I h...
I asked the following question on a final exam: > Symmetric Ciphers (e.g. AES, DES, Blowfish) use up to 256 bit on the > best case, which are considered strong against brute-force attacks. On > the other hand, asymmetric cryptography (e.g. RSA, DSA, Elgamal) use a > higher amount of bits (~2048). Explain the ...
Difference between Symmetric and Asymmetric. Is this answer correct, based on a written test?
I'm using Boneh-Boyen-Shacham signature scheme and want to estimate complexity in my scheme. as reported in "Scott M., Efficient Implementation of Cryptographic pairings", if we set parameters as: MNT curve, k=6 and p~160, then P(point mul)=0.6 ms and P(pairing)=4.5 ms. these two measured times are used in many referen...