instruction
stringlengths
15
30k
I want an algorithm of some sort that can ensure that an operation takes a fairly specific amount of time, but proof that this operation was done can be completed relatively inexpensively. For instance, I can prove that an operation will probably take around 30 seconds by doing a cycle with a hashing algorithm such...
Consider a cryptographic hash function that maps $n$-bit strings to $n$-bit strings: $$ \DeclareMathOperator{\H}{H} \DeclareMathOperator{\SHA}{SHA-256} \H(x) : \left\{0,1\right\}^{n} \mapsto \left\{0,1\right\}^{n}. $$ Let $\H^i$ denote the result of iterating $\H$ $i$ times, i.e., $\H^1 = \H$, $\H^2 = \H \cir...
What is difference among eavesdropper attack, multiple message attack and CPA attack? I only know that in eavesdropper there are an adversary can send only 2 msgs to challanger but in multi. msg. attack & CPA can send a vector of messages.
What is difference among eavesdropper attack, multiple message attack and CPA attack?
> Why is Diffie-Hellman key exchange not hard over $\mathbb{Z}^{*}_p$ ?
why is DDH not hard over $\mathbb{Z}^*_p$?
What is/are difference(s) among eavesdropper attack, multiple message attack and CPA attack? I only know that in eavesdropper there is an adversary which can send only 2 msgs to challanger but in multi. msg. attack & CPA, it can send a vector of messages.
what is the basic difference between following: 1. Lightweight Authenticated encryption 2. Online authenticated encryption 3. Authenticated encryption for low memory schemes.. Are they same or different ?
What is/are difference(s) among eavesdropper attack, multiple message attack and CPA attack in context of symmetric key encryption? I only know that in eavesdropper attack there is an adversary which can send only 2 msgs to challanger and adversary has to distinguish between these in order to win the game but in ...
One of the new features of [Java 8][1] is the SHA-224 message digest. What is the use case for having a 224 bit length hash? [1]: http://openjdk.java.net/projects/jdk8/features#130
Why is Diffie-Hellman key exchange not hard over $\mathbb{Z}^{*}_p$?
Why is DDH not hard over $\mathbb{Z}^*_p$?
One of the new features of [Java 8][1] is the SHA-224 message digest. What is the use case for having a 224-bit-length hash? [1]: http://openjdk.java.net/projects/jdk8/features#130
what is the basic difference between following: 1. Lightweight Authenticated encryption 2. Online authenticated encryption 3. Authenticated encryption for low memory schemes.. Are they same or different ?
I am studying a function where I found the some hash properties. Hash functions: 1. Given a code `c` is computationally infeasible to find m such that `h(m) = c` 2. Given m is computationally infeasible to find `n != m` such that `h(m) = h(n)` 3. It is computationally infeasible to find any pair `(m, n)` such...
In the definition of existential unforgeability, there is no detail about the following questions. In general, can we suppose that a signer is also a possible adversary ? When generating a signature, can we suppose that the signer behaves well ? More precisely, suppose that a signer is able to generate a signatur...
I've been reading the article "A (second) preimage attack on the GOST hash function" by F. Mendel et al ([link][1]) and I'm having some difficulty to grasp the some of the values complexities and probabilities of the attack. 1. On page 228, how is the probability that two pairs lead to the corresponding values $x_1$...
Explanations for the complexity values for second preimage attack on GOST?
I've been reading the article "A (second) preimage attack on the GOST hash function" by F. Mendel et al ([link][1]) and I'm having some difficulty to grasp the some of the values complexities and probabilities of the attack. Specifically: 1. On page 228, how is the probability that two pairs lead to the correspondin...
SHA-224, part of [FIPS&nbsp;186][1] since <strike>FIPS&nbsp;186-3</strike> FIPS&nbsp;186-2 change notice 1 of 2004, was introduced to match the second of the security strengths {80, 112, 128, 192, 256} defined in the document that became [NIST Special Publication 800-57 – Recommendation for Key Management – Part 1: Gen...
I've been reading the article "A (second) preimage attack on the GOST hash function" by F. Mendel et al ([link][1]) and I'm having some difficulty to grasp some of the values of complexities/probabilities in the attack. Specifically: 1. On page 228, how is the probability that two pairs lead to the corresponding val...
Preliminary: Almost [the same article][1] is available for free without breaking any law, nor downloading 5GB (formatting is shifted by at most one third of a page). It is also (as well as all other articles of IACR crypto conferences from 2000-2011) in the [IACR Online Proceedings][2], specifically in the FSE 2008 sec...
What is the basic difference between the following types of Authenticated Encryption (AE) scheme? 1. Lightweight Authenticated encryption 2. Online Authenticated Encryption 3. Authenticated Encryption for low memory devices Are they same or different?
Honestly, in practice, there are very few if any reasons to use SHA-224. [As fgrieu notes](http://crypto.stackexchange.com/questions/15151/sha-224-purpose/15155#15155), SHA-224 is simply SHA-256 with a different IV and with 32 of the output bits thrown away. For most purposes, if you want a hash with more than 128 ...
I am studying [Triple DES](http://en.wikipedia.org/wiki/Triple_DES). I have got two basic questions. One, why are we following a sequence like encrypt(decrypt(encrypt)); what is the problem using a sequence encrypt(encrypt(encrypt))? Second, why are we not using a single long key (say 168 independent key bits) i...
I'm trying to design cryptographic protocol to play Rock-Paper-Scissors with two parties, neither trusting each other, nor trusting server they use for communication, so game is 'provably fair'. So there are Alice and Bob. They don't know about each other, and they've came to server to match them with each other, wi...
Rock-paper-scissors over network, how to protect from cheating server?
I know that Skein can output a digest of arbitrary size, with a kind of counter mode. Blocks of the resulting digest can be computed in parallel. What about Keccak ? I know that a sponge function can generate a hash of arbitrary length, but is it possible to generate this output with a parallel algorithm ?
Let H be a secure hash function (e.g. SHA256), is it possibile to find *H(M1)* given *H(M1||M2)* if the length of M1 and/or M2 is exact the block size of the hash (that is, 64 bytes for SHA family hashes)?
The PKCS #1 v1.5 padding scheme for RSA [has been proven to have some weakness][1] when used with TLS for example. My question is: is it still secure under the following conditions? Alice sends a message to Bob encrypted with RSA using PKCS #1 v1.5 padding scheme. If Bob figures out that the message is correct,...
Is PKCS #1 v1.5 RSA encryption padding secure under these conditions?
When a server is under attack, it send the client the following data: 1. **Nonce** - *a byte array of Y length* 2. **Hash** - *the hash digest of the puzzle solution* The client has to find X such as Hash(*Nonce*||*Counter*) = *Hash* where Counter is a 32-bit integer value starting from 0. The client has to...
Let $H$ be a secure hash function (e.g. SHA256), is it possibile to find $H(M1)$ given $H(M1||M2)$ if the length of $M1$ and/or $M2$ is exact the block size of the hash (that is, 64 bytes for SHA family hashes)?
Although this has been extensively discussed around here, I'm curious whether my approach makes sense, or I should just stick to "the standard version". I'm implementing some homomorphic encryption primitives (Paillier, Okamoto–Uchiyama etc) and, at the moment, I'm using GMP as the big number library (this may chang...
Is it true that for RSA with no padding, the length of data must be equal to the length of key? If so, why is that so? Mathematically, it does not seem to matter, isn't it?
Is it true that for RSA with no padding, the length of data must be equal to the length of key?
I want to develop an application that will allow a user to create a public/private key pair, and encrypt it symmetrically with a key such that once they enter their password, they will be able to decrypt the key pair and retrieve its contents. However, it is desirable for someone else that they trust to be able to ...
How to invalidate decryption key in multi user model?
I'm familiar with client puzzles, where the client performs some work and there is a way to prove to the server that the client has done so. Is there a way to do this, but where the client's resource is memory (storage) rather than computation (CPU)? In other words, the client ties up some storage for some duration...
Currently busying myself with the Bitcoin "mining" algorithm, I am wondering if the process really cannot be simplified. For reference, the algorithm is basically SHA-256d: $success := SHA256( SHA256( IV || nonce ) ) < target$ The resulting hash of 256 bits is then interpreted as a single number of 256 digits ...
What is the basic difference between the following types of Authenticated Encryption (AE) schemes? 1. Lightweight Authenticated encryption 2. Online Authenticated Encryption 3. Authenticated Encryption for low memory devices Are they all the same or is there a specific difference between them?
This question is a bit different from other questions here, but I think it is suitable to correctly understand the terminology of cryptography. Consider the following two sets of terms: - Encryption scheme, signature scheme - Identification scheme, commitment scheme, secret-sharing scheme The latter are actua...
Suppose that I want to encrypt some data using two different algorithm chained (e.g. AES and Serpent) and harnessing the benefits of CBC. I can do: SERPENT_CBC( AES_CBC(plaintext) ) or SERPENT_ECB( AES_CBC(plaintext) ) Of course the second solution is computationally slighter than the first one. ...
Alice, Bob, and Carol each generate ECDH keypairs. Alice and Bob establish a communication channel and negotiate an AliceBob secret. The question is: Is it safe for Alice and/or Bob to reuse their keypairs to negotiate a new AliceCarol and/or BobCarol secret? The intended use is authentication. Each party ca...
Is it safe to reuse ECDH asymmetric keys for authentication?
Alice, Bob, and Carol each generate ECDH keypairs. Alice and Bob establish a communication channel and negotiate an AliceBob secret. The question is: **Is it safe for Alice and/or Bob to reuse their keypairs to negotiate a new AliceCarol and/or BobCarol secret?** The intended use is authentication. Each party ...
Is it true that for RSA with no padding, the length of data must be equal to the length of key? If so, why is that so? What is the reasoning why the data needs should have the same number of bits as the modulus? What is the mathematical implication?
The question pertains not in terms of security but computing operational functionality, as it how the computation is done. Is it true that for RSA with no padding, the length of data must be equal to the length of key? If so, why is that so? What is the reasoning why the data needs should have the same number of...
The question pertains not in terms of security but computing operational functionality, as it how the computation is done. Is it true that for RSA with no padding, the length of data must be equal to the length of key? If so, why is that so? What is the reasoning why the data needs should have the same number of...
According to the [original NESSIE submission](https://www.cosic.esat.kuleuven.be/nessie/workshop/submissions.html) of Whirlpool: > "The finite field ${\rm GF}(2^8)$ will be represented as ${\rm GF}(2)[x]/p(x)$, where $p(x) =$ $x^8 +$ $x^4 +$ $x^3 +$ $x^2 +$ $1$ is the first primitive polynomial of degree $8$ listed in ...
> "If PGP and GPG both follow the OpenPGP standard, are they 100% compatible in all use cases?" No, they are not 100% compatible in **all** use cases, because — depending on the PGP version — there are known interoperability problems. The [GNUPG FAQ](http://www.gnupg.org/faq/GnuPG-FAQ.html) answers this question ...
The short answer is **NO**. Generally (or in the context of the library of the question), it is not true that for RSA with no padding, the length of data must be _equal_ to the key length. When and if that applies, that's a restriction of a particular cryptographic library, and either that's not the only restriction ab...
The short answer is **NO**. Generally (or in the context of the library of the question), it is not true that for RSA with no padding, the length of data must be _equal_ to the key length. When and if that applies, that's a restriction of a particular cryptographic library, and either that's not the only restriction ab...
_**Note:** This is not (yet) a full answer, but I'm posting this anyway in the hope that I or someone else might be able to complete it later. Please don't upvote this yet. If you can fill in the gaps in the vague proof sketch below, please do so; if you post it as a separate answer, you'll have my vote._ ---- ...
The short answer is **NO**. Generally (or in the context of the library of the question), it is not true that for RSA with no padding, the length of data must be _equal_ to the key length. When and if that applies, that's a restriction of a particular cryptographic library, and either that's not the only restriction ab...
The short answer is **NO**. Generally (or in the context of the library of the question), it is not true that for RSA with no padding, the length of data must be _equal_ to the key length. When and if that applies, that's a restriction of a particular cryptographic library, and either that's not the only restriction ab...
When proving a crypto scheme security under random oracle model. Is the random oracle always controled by the challenger? What if the Hash is only used by the adversary?
Is the random oracle always controled by the challenger?
The short answer is **NO**. Generally, it is not true that for RSA with no padding, the length of data must be _equal_ to the key length. When and if that applies, that's a restriction of a particular cryptographic library, and either that's not the only restriction about the data, or the library does not allow reliabl...
We know that [Cryptographic hash function](http://en.wikipedia.org/wiki/Cryptographic_hash_function) is generally a one-way function where we can't retrieve the original message. On the other hand, encryption is a two a function where we get the original message from the encrypted message or vice versa. So in normal se...
In shamir's secret sharing scheme we are trusting a third party who generates the secret polynomial. How can we ensure security here when we are involving a third party?
We simply have to trust this party because this scheme requires a trusted setup. We can use [verifiable secret sharing](http://en.wikipedia.org/wiki/Verifiable_secret_sharing), that allows the parties to check whether the shares they have obtained are consistent. If we do not want to have a trusted dealer who se...
In Shamir's secret sharing scheme, we are trusting a third party who generates the secret polynomial. How can we ensure security here when we are involving a third party?
When proving a Crypto scheme security under random oracle model, is the random oracle always controlled by the challenger? What if the Hash is only used by the adversary?
Is a random oracle controled by the challenger?
I'm looking for a very detailed example of proof by reduction. Say we have two or three protocols (that have been proven secure) and we construct a new protocol. We want to provide a proof of security for this new protocol. For instance, we can consider the following simple example: we have a (secure) signature algo...
I'm looking for a very detailed example of proof by reduction. Say we have two or three protocols (that have been proven secure) and we construct a new protocol. We want to provide a proof of security for this new protocol. For instance, we can consider the following simple example: we have a (secure) signature algo...
I would like to inquire if there is any Method to achieve the following: There is a list $L$ of $n$ entities that is allowed to perform a certain action. $L$ is cryptographically signed by some authority, so nobody can change it without detection. Now everybody (icluding everyone of the $n$ entities) should be able...
It's a simple question : If an attacker find some round key of AES256. Is it possible to find the master key ? How the master key is safe if an attackers find round {1,2,...} key ? Thanks
I would like to inquire if there is any Method to achieve the following: There is a list $L$ of $n$ entities that are allowed to perform a certain action. $L$ is cryptographically signed by some authority, so nobody can change it without detection. Now everybody (icluding everyone of the $n$ entities) should be abl...
> If an attacker find some round key of AES256. Is it possible to find the master key ? If the attacker is given a single round key from an 256 bit AES key, it is infeasible to reconstruct the full key (even if you have access to chosen plaintext/ciphertext against the full key). This single round key reduces the...
I've had an assignment to sign a file using hash and salt, so I read about salt and I got why it's important when it comes to password, but not to sign messages. 1- how to sign using salt ? the only way I could think of is I add the salt to the message then hash them, then send the hash along with the salt (encrypte...
Preliminary: Almost [the same article][1] is available for free without breaking any law, nor downloading 5GB (formatting is shifted by at most one third of a page). It is also (as well as all other articles of IACR crypto conferences from 2000-2011) in the [IACR Online Proceedings][2], specifically in the FSE 2008 sec...
If an attacker finds some round key of AES256, is it possible to find the master key? How safe is the master key if an attackers finds multiple round keys?
> If an attacker find some round key of AES256. Is it possible to find the master key ? If the attacker is given a single round key from an 256 bit AES key, it is infeasible to reconstruct the full key (even if you have access to chosen plaintext/ciphertext against the full key). This single round key reduces the...
I'm not cryptography expert (well, I'm here after all!) but I have this doubt… Suppose I have 2 different keys: 1. secretkey1 2. secretkey2 And a plain text: - myReallySecretPlainText If I use **AES128** on my plain text with my first key I get this: U2FsdGVkX19fHxumDqEB9Kuyvhj+aoHpctLCdo2VEvt...
I have some difficulties to understand, when we construct a reduction, how we determine the time for the constructed adversary to break a target security property. In general these details are not explained in books. Do you have some examples in which the time $t$ for the adversary $A$ is not equal to $t'$, the t...
Preliminary: Almost [the same article][1] is available for free without breaking any law, nor downloading 5GB (formatting is shifted by at most one third of a page). It is also (as well as all other articles of IACR crypto conferences from 2000-2011) in the [IACR Online Proceedings][2], specifically in the FSE 2008 sec...
Can you help me understand the differences, both algorithmic and practical, between RFC 5246 SessionID re-use and RFC 5077 Session Resumption? Both appear to be ways to nail up a second TLS session without a Server certificate exchange, leveraging the full certificate exchange and validation of a previous, separate ...
Compare RFC 5246 SessionID re-use versus RFC 5077 Session Resumption?
Is there some kind of assymetric encryption which can be done in head?
Challenge–response authentication which can be done in head?
Sometimes, websites and scientific papers that introduce and/or handle cryptographic algorithms also provide speed-analysis and tables comparing the individual performance of cryptographic implementations. I would like to do the same, but I'm not sure how to calculate the “cycles”. I have this data: - processor c...
i have a problem that i am having a bit of trouble with; we are given a partial key (missing 11 letters) for a mono-alphabetic substitution cipher and asked to calculate the number of possible keys given that no plaintext letter can be mapped to itself. ordinarily, the number of possible keys would be the number ...
There are arguments for both sides: - Yes, you can. In Feistel networks, the $F$ function is always evaluated in the same direction, not need for inversion. Similar constructions work as well. Or just XOR a hash value to your message (like in a stream cipher, but block-wise), and make the hash value dependent on the...
> Given a partial key for a mono-alphabetic substitution cipher (missing > 11 letters), calculate the number $N$ of possible keys, given that no > plaintext letter can be mapped to itself. Ordinarily, the number of possible keys would be the number of derangements of the missing letters $!11$. However, 5 of the ...
I just read through [this article](http://mathiasbynens.be/notes/pbkdf2-hmac) which demonstrates practical (and seemingly trivial) collisions in PBKDF2-HMAC-SHA1, and provides a few examples of collisions. Am I missing something here? Is PBKDF2-HMAC-SHA1 really broken this badly and trivially? Or am I missing some w...
Is PBKDF2-HMAC-SHA1 really broken?
This is NOT A PROBLEM for *PBKDF2-HMAC-SHA1*. The *PBKDF2-HMAC-SHA1* function is a key derivation function (password-based key derivation). It is fairly good function, for instance it is recommended by NIST ([NIST SP 800-132][1]). It is rare for this function to have a collision, but collisions generally are not a p...
No, it is not broken. This is NOT A PROBLEM for *PBKDF2-HMAC-SHA1*. The *PBKDF2-HMAC-SHA1* function is a key derivation function (password-based key derivation). It is fairly good function, for instance it is recommended by NIST ([NIST SP 800-132][1]). It is (relatively) rare for this function to have a collision, ...
> In what sort of circumstances would an attacker potentially be able to detect a pattern from a series of hashed passwords? I think the most direct answer is: When the hashing algorithm is not cryptographically secure. The main four points of cryptographic hash function evaluation are as follows ([quoting wikipedi...
> In what sort of circumstances would an attacker potentially be able to detect a pattern from a series of hashed passwords? I think the most direct answer is: When the hashing algorithm is not cryptographically secure. The main four points of cryptographic hash function evaluation are as follows ([quoting wikipedi...
I intend to use a generic integrated/hybrid encryption scheme for transmitting information between a client and a server. Key encapsulation: a 128-bit symmetric key is generated and asymmetrically encrypted. Data encapsulation: a 96-bit IV is generated, the plaintext is encrypted with AES-GCM using the generated ...
What about SRP? It has an additional property, that you do not need to keep the shared secret unprotected on the server. http://srp.stanford.edu/design.html You did not specify if you want to restrict the number of roundtrips, but I guess with SRP they can be minimized.
NIST have just launched a new service called the <strike>NSA</strike>**[NIST Randomness Beacon][1]**. It has been met with [some initial skepticism][2]. Perhaps the cryptography community would have used it before June 2013 when NIST had a trusted reputation. At first I thought it was a mistimed April Fool's joke, howe...
How useful is NIST's Randomness Beacon for cryptographic use?
I intend to use a generic integrated/hybrid encryption scheme for transmitting information between a client and a server. Key encapsulation: a 128-bit symmetric key is generated and asymmetrically encrypted. Data encapsulation: a 96-bit IV is generated, the plaintext is encrypted with AES-GCM using the generated ...
I intend to use a generic integrated/hybrid encryption scheme for transmitting information between a client and a server. Key encapsulation: a 128-bit symmetric key is generated and asymmetrically encrypted. Data encapsulation: a 96-bit IV is generated, the plaintext is encrypted with AES-GCM using the generated ...
Say you have a characteristic polynomial of an LFSR: $$f(X) = X^4 + X^3 + 1$$ How can I use this function f to get the output of the LFSR, given some initial state? Obviously I can create the LFSR diagram based on the function, since this function describes where the "taps" are (see .e.g the Wikipedia article ...
LFSR get output from characteristic polynomial?