instruction
stringlengths
15
30k
In a single round of SHA-512, in the operations $\Sigma_0(A)$, $\Sigma_1(E)$ why are the constants $28$, $34$, and $39$ used for the number of rotations? What significance do these numbers have? What if they are changed?
Significance of rotation constants in SHA-512?
For a short summary, see [my comment][1]. This over-detailed answer, which in the end I might decide to undelete nevertheless, attempts to make sense [in the context of the rest of the problem] of the fragment: > _f_) Although not subject to man-in-the-middle attacks, there does exist a flaw in the protocol. Find i...
For a short summary, see [my comment][1]. I apologize that this answer is over-detailed and arguably picky. That's my best attempt to make sense [in the context of the rest of the problem] of the fragment: > _f_) Although not subject to man-in-the-middle attacks, there does exist a flaw in the protocol. Find it, an...
For a short summary, see [my comment][1]. I apologize that this answer is over-detailed and arguably picky. That's my best attempt to make sense [in the context of the rest of the problem] of the fragment: > _f_) Although not subject to man-in-the-middle attacks, there does exist a flaw in the protocol. Find it, an...
Choose a public key encryption scheme, where $(s(x||r), p(x||r))$ is a key-pair derived from $x||r$ <strike>using a cryptographic hash function</strike> so that $s(x||r)$ is invertible. To make a commitment $C(x, r)$, Alice derives the key-pair and publishes the public key $c = p(x||r)$. If she reveals $x$ and $r$ t...
For a short summary, see [my comment][1]. I apologize that this answer is over-detailed and arguably picky. That's my best attempt to make sense [in the context of the rest of the problem] of the fragment: > _f_) Although not subject to man-in-the-middle attacks, there does exist a flaw in the protocol. Find it, an...
For a short summary, see [my comment][1]. I apologize that this answer is over-detailed and arguably picky. That's my best attempt to make sense [in the context of the rest of the problem] of the fragment: > _f_) Although not subject to man-in-the-middle attacks, there does exist a flaw in the protocol. Find it, an...
For a short and practical summary, see [my comment][1]. I apologize that this answer is over-detailed and arguably picky, to the point that I deleted it at some point. Bear with me: that's my honest attempt to make any sense [in the context of the rest of the problem] of the fragment: > _f_) Although not subject to...
Summary: The statement is ambiguous. It is likely incorrect in stating that the protocol is "_not subject to man-in-the-middle attacks_". My best guess of the intent of _f_) is that it is wanted a description of a [reflexion-to-different instance attack, found by Ricky Demer][4], allowing Mallory to authenticate to Ali...
Suppose Alice wants to prove to Bob that t1 is less than t2. t1 and t2 represent the timestamp. Alice does not want to reveal t1 and t2. However, she needs to receive Bob's confirmation that t1 is less than t2. In order to prevent Bob to perform Brute force and find t1 and t2, Alice wants to use some Salt with the time...
Suppose Alice wants to prove to Bob that `t1` is less than `t2`. `t1` and `t2` represent timestamps. Alice does not want to reveal `t1` and `t2`. However, she needs to receive Bob’s confirmation that `t1 < t2`. In order to prevent Bob from performing a brute-force attack to find `t1` and `t2`, Alice wants to use some *...
I used [rsa-json.native][1] to generate RSA keys for a node.js application that will use [secure-peer][2] later to connect two clients with each other. Now I have 2 questions: - In [secure-peer/index.js][3] I've found `defaultCiphers = ['RC4']` - is this acceptable? I've heard that RC4 is broken. - Are my example...
Is there a length-preserving encryption scheme, that preserves the lengths of input sizes such that the length of the input plain text is same as length of the output cipher text ?
Is there a length-preserving encryption scheme?
Summary: The statement is ambiguous. My best guess is that the flaw thought in _f_) is the feasibility of the [reflexion-to-different instance attack found by Ricky Demer][4], allowing Mallory to authenticate to Alice as Bob without involving Bob, constituting a valid attack against 1/2/3 in the Dolev-Yao model, and br...
Summary: The statement is ambiguous. My best guess is that the flaw thought in _f_) is the feasibility of the [reflexion-to-different instance attack found by Ricky Demer][1], allowing Mallory to authenticate to Alice as Bob without involving Bob, constituting a valid attack against 1/2/3 in the Dolev-Yao model, and br...
Summary: The statement is ambiguous. My best guess is that the flaw thought in _f_) is the feasibility of the [reflexion-to-different instance attack found by Ricky Demer][1], allowing Mallory to authenticate to Alice as Bob without involving Bob, constituting a valid attack against 1/2/3 in the Dolev-Yao model, and br...
I want to use Elliptic Curve based blind signature scheme for my research. There is no proper implementation on ECC based blind signatures. Can someone describe to me which things I need to follow when implementing this?
**No**. With neither a trusted third party nor trusted hardware, we know no system with an even mildly accurate delay of release. If we accept a trusted third party, there are options. For example: The trusted third party generates a public/private key pair per hour (for an asymmetric cipher such as RSA-OAEP),...
Summary: The statement is ambiguous. My best guess is that the flaw thought in _f_) is the feasibility of the [reflexion-to-different instance attack found by Ricky Demer][1], allowing Mallory to authenticate to Alice as Bob without involving Bob, constituting a valid attack against 1/2/3 in the Dolev-Yao model, and br...
I want to use Elliptic Curve based blind signature scheme for my research. <br> There is no proper implementation of ECC-based blind signatures. <br> Can someone describe to me which things I need to follow when implementing this?
Suppose we have a hash function $H: \{0,1\}^* \mapsto \{0,1\}^n$, that doesn't get all the $n$ length <br> bitstrings as a value for any input, but is otherwise secure. Can that fact be detected? For example, let $H$ be a secure $n$-bit hash function. You are given a black box function $F$ and told it's either $H$...
How can one detect if a hash function doesn't have a full image?
What does it mean that a protocol realizes "strong mutual authentication"? And What does it mean that a protocol realizes "weak mutual authentication"? Can you define them formally ? I have found a definition for "strong mutual authentication" (not formal): Strong mutual authentication requires not only matching...
What are the requirements of a nonce?
In the Pointcheval paper - **Security arguments for digital signatures and blind signatures**, they have proved the security of Schnorr signature for existential forgery under adaptively chosen-message attack. ![Schnorr Signature Scheme][1] The proof requires a simulator that can produce transcripts that are ind...
Is Generating transcripts that are indistinguishable from actual messages in a Signature scheme not universal forgery?
In the Pointcheval paper - [**Security arguments for digital signatures and blind signatures**](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.11.8213), they have proved the security of Schnorr signature for existential forgery under adaptively chosen-message attack. ![Schnorr Signature Scheme][1] The p...
> defaultCiphers = ['RC4'] - is this acceptable? I've heard that RC4 is broken. About RC4 vulnerabilities in general, see e.g. http://crypto.stackexchange.com/questions/853/google-is-using-rc4-but-isnt-rc4-considered-unsafe RC4 can be secure when you discard (enough of) the beginning of the keystream or use a new...
> In effect, does this mean that a separate HMAC must be created for every single message, i.e. all 16 bytes? No, you can use HMAC over the whole message with all its blocks. Of course, that means you can't localize corruption/tampering, so if you were sending a huge message you might want HMAC smaller parts (but...
I disagree with the other answers in that I think taking XOR of the blocks was a useful addition, no matter the reason it was originally put in. Suppose we had a KDF defined as PBKDF2, but taking the last block instead of a XOR of all blocks. Let's ignore multi-block support and define it simply as: $$\begin{alig...
I disagree with the other answers in that I think taking XOR of the blocks was a useful addition, no matter the reason it was originally put in. Suppose we had a KDF defined as PBKDF2, but taking the last block instead of a XOR of all blocks. Let's ignore multi-block support and define it simply as: $$\begin{alig...
What is the best way to generate a unique 64 bit numeric database key from a string? For example, say the string is a URL, you could generate a 64 bit key using SipHash or by truncating a sha256 hash to 64 bits, but collisions are likely at 2^32 (~ 4 billion) entries. However, if instead you truncated the hash to...
Generate a unique 64 bit numeric database key from a string without collisions at 2^32 birthday threshold?
I disagree with the other answers in that I think taking XOR of the blocks was a useful addition, no matter the reason it was originally put in. Suppose we had a KDF defined as PBKDF2, but taking the last block instead of a XOR of all blocks. Let's ignore multi-block support and define it simply as: $$\begin{alig...
What is the best way to generate a unique 64 bit numeric database key from a string? For example: if the string is a URL, you could generate a 64 bit key using [SipHash](https://131002.net/siphash/) or by truncating a SHA256 hash to 64 bits, but collisions are likely at $2^{32}$ (~ 4 billion) entries. However, if...
Generate a unique 64 bit numeric database key from a string without collisions at $2^{32}$ birthday threshold?
In the Pointcheval paper “[Security arguments for digital signatures and blind signatures](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.11.8213)”, they have proved the security of Schnorr signature for existential forgery under adaptively chosen-message attack. ![Schnorr Signature Scheme][1] The proof ...
Is ”generating transcripts that are indistinguishable from actual messages in a signature scheme” not universal forgery?
[The definition of PBKDF2][1] states that I obtain a derived key <sup>(1)</sup> by calling a pseudorandom function a bunch of times recursively: > $U_1 = PRF(password, salt)$ $U_2 = PRF(password, U_1)$ … $U_n = PRF(password, U_n-1)$ The standard then defines the actual key material `K` as > $K = F(p...
I disagree with the other answers in that I think taking XOR of the blocks was a useful addition, no matter the reason it was originally put in. Suppose we had a KDF defined as PBKDF2, but taking the last block instead of a XOR of all blocks. Let's ignore multi-block support and define it simply as: $$\begin{alig...
[@D.W. is probably closest](http://crypto.stackexchange.com/a/409/12164) to the real reason (this was fifteen years ago, so things get a bit hazy), there was some concern about short cycles, and it was effectively free - you're already iterating the hashing deliberately to slow things down so speed isn't an issue - so ...
I am trying to understand how RSA digital signatures can incorporate any data from a PRNG into the final signature. Does this mean that separate implementations might fail to verify each others signatures if they chose a different method for coming up with random padding based on the input or a hash of the input? I...
Assume that I have two sources of entropy (say, a hardware RNG and a CSPRNG) and that the two sources are independent (do not know anything about the internal state of the other RNG). Can I mix them by XORing blocks safely? If one of the two has been compromised/subverted, is there any way it can reduce the total ent...
Mixing Entropy Sources by XOR?
Well, the goal of their reductionists proof is to show that if there is an adversary against the signature scheme one is able to compute the secrete key. Now, if the reduction would already know the secret key from the start this would make no sense. But how should the reduction then answer the signing queries of the a...
Suppose we have N bits, so we can have 2^N different bit sequences. Some sequences doesn't looks random, say, all "1" or "0". There are also other patterns like "10101010...", "11001100..." and such. I'm not a crypthographer but know there are some ways to evaluate given sequence as random with some given satisfied ...
How many "true" random numbers in given bits?
Suppose we have N bits, so we can have 2^N different bit sequences. Some sequences don't look random, say, all "1" or "0". There are also other patterns like "10101010...", "11001100..." and such. <br> I'm not a cryptographer but know there are some ways to evaluate <br> a given sequence as random with some given...
What you need to know is that _all_ equations in this context are, implicitly, understood to be modulo n. That information alone should answer all of your questions, starting with the equation k = (z1 - z2) / (s1 - s2) (modulo N), which hence means k = ((z1-z2) * modular_inverse_mod_n(s1-s2)) % n, where I tried to copy...
<p> Crypto Stack Exchange is for software developers, mathematicians and others interested in cryptography. </p> <p>Cryptography Stack Exchange is for asking questions about the mathematics and properties of cryptographic systems, their analysis ("cryptanalysis") and subsidiary topics that generally make up crypto...
What are the ***"standard procedures in cryptanalysis"*** to analyze unknown ciphertext? In other words: Are there any protocols, officially acknowledged checklists or something like that which represent a ***"standard"*** approach in cryptanalysis to analyze unidentified ciphertext? If yes, which ones would that be...
Does this protocol provide Perfect Forward Secrecy / are there potential security flaws?
Are they the same thing? Authenticate means to verify it is from the sender. But it seems like signing also verifies it is from the sender. What exactly is the relationship between these two processes?
What is the difference between authenticating and signing a document?
Authenticating a document means to verify it is from the sender. But it seems like signing a document also verifies it’s from the sender. What exactly is the relationship or difference between “authenticating a document” and “signing a document”? Are they the same thing?
Suppose we have $n$ bits, so we can have $2^n$ different bit sequences. Some sequences don't look random, say, all $1$ or $0$. There are also other patterns like $10101010...$, $11001100...$ and such. I'm not certain but aren't there ways to evaluate a given sequence as random with some given satisfied error? My ...
Given $n$ bits, how many "truly random" sequences/numbers can be constructed?
Suppose we have $n$ bits, so we can have $2^n$ different bit sequences. Some sequences don't look random, say, all $1$ or $0$. There are also other patterns like $10101010…$, $11001100…$ and such. I'm not certain but aren't there ways to evaluate a given sequence as random with some given satisfied error? Given $n$ ...
Im working on my own AES implementation as a personal educational exercise (not for production use), and a book im using as a resource states: > In the case of CTR, we are merely XORing the output of the cipher > against the plaintext. This means there is no inherit reason why the > plaintext has to be a multiple...
If – when using AES in CTR mode – you decide to use the setup where you combine the IV and the block count value into a single value, [as suggested here](http://crypto.stackexchange.com/questions/2173/how-to-calculate-an-iv-when-i-have-a-shared-private-key), the first 12 bytes are your IV and the last 4 bytes the block...
Value of “counter” when decrypting AES in CTR mode?
I'm looking for some PRNGs and – as I have been using Java for a long period of time – I thought that the `BitInteger` class, together with the `Random` class, could both generate some large pseudo random numbers. Are the algorithms behind those generations cryptographically secure, or is it just some sort of `a + ...
Well, the goal of their reductionists proof is to show that if there is an adversary against the signature scheme one is can use this adversary to extract the unknown secret key. Now, if the reduction would already know the secret key from the start this would make no sense. But how should the reduction then answer the...
Suppose we have $n$ bits, so we can have $2^n$ different bit sequences. Some sequences don't look random, say, all $1$ or $0$. There are also other patterns like $10101010…$, $11001100…$ and such. I'm not certain but aren't there ways to evaluate a given sequence as random with some given satisfied error? Given $n$ ...
The question asks for a signature scheme, with a public verification procedure, that is tolerant to minor alterations of the signed data during its transmission [possibly in analog form over some noisy channel], where the signature is a _small_ digital appendix sent over a digital channel assumed error-free in the abse...
The question asks for a signature scheme, with a public verification procedure, that is tolerant to minor alterations of the signed data during its transmission [possibly in analog form over some noisy channel], where the signature is a _small_ digital appendix sent over a digital channel assumed error-free in the abse...
The question asks for a signature scheme, with a public verification procedure, that is tolerant to minor alterations of the signed data during its transmission [possibly in analog form over some noisy channel], where the signature is a _small_ digital appendix sent over a digital channel assumed error-free in the abse...
Suppose one had a complete list of primes up to $2^{n+1}-1$. Then wouldn't one be able to crack an $n$-bit RSA public key in time $O(\pi(2^{n+1}-1))$, making RSA insecure? Thanks, René
> As $n$ events cant be represented as $2^n$ number, we can have a function $F(n)$, which gives 0 if NIST suite for given bit sequence represented by $n$ fails to satisfy and gives 1 if n looks like random. > Question is what is sum $F(n)$ over all $n$? A statistical randomness test generally (and in the case of ...
> I'm not certain but aren't there ways to evaluate a given sequence as random with some given satisfied error? Given n bits, how many "truly random" sequences/numbers can be constructed? If you define "truly random" as meaning prior to generating the sequence, that each bit has an independent 50% chance of being 0 ...
Well, if you consider a uniform distribution over all $2^n$ different bitstrings, then you have exactly $N$ bits of entropy. If the distribution is not uniform, you "lose entropy". If you use a pseudo random number generator, chances are that not every string can be generated, and thus you don't have the full entropy. ...
> I'm not certain but aren't there ways to evaluate a given sequence as random with some given satisfied error? Given n bits, how many "truly random" sequences/numbers can be constructed? If you define "truly random" as meaning prior to generating the sequence, that each bit has an independent 50% chance of being 0 ...
> I'm not certain but aren't there ways to evaluate a given sequence as random with some given satisfied error? Given n bits, how many "truly random" sequences/numbers can be constructed? If you define "truly random" as meaning prior to generating the sequence, that each bit has an independent 50% chance of being 0 ...
> I'm not certain but aren't there ways to evaluate a given sequence as random with some given satisfied error? Given n bits, how many "truly random" sequences/numbers can be constructed? If you define "truly random" as meaning prior to generating the sequence, that each bit has an independent 50% chance of being 0 ...
I think arguments could be made for either, but I would still call BGV the state of the art for FHE for the following reasons: 1. A public [implementation][1] exists 2. We have [benchmark info][2] 3. Other protocols have successfully applied it with real world use and analysis [here][3] and [here][4] (though pre...
md5 is a one-way hashing function remember? Which means: cipher = md5(plain) If you know `cipher` you cannot possibly get `plain` by reversing md5. Which means: plain != md5(cipher) So s it possible to find `m3` such that `md5(m3+m1)=md5(m1+m2)` if I know `m2` and `md5(m1+m2)` The answer is absol...
Is it possible to find m' such that md5(m'+m1)=md5(m1+m2) if i know m2 and md5(m1+m2) ? is this a collision or pre-image attack.<br> Also in this case is it possible to find m' and H such that md5(m1+m')=H if i know md5(m1+m2) and m2 ? Basically a message is like : (M,md5(M|m1)) sent from server to client ( only cli...
Is it possible to find $m'$ such that $\operatorname{MD5}(m'||m_1)=\operatorname{MD5}(m_1||m_2)$ if I know $m_2$ and $\operatorname{MD5}(m_1||m_2)$? Is this a collision or a preimage attack? Also in this case is it possible to find $m'$ and $H$ such that $\operatorname{MD5}(m_1||m')=H$ if I know $\operatorname{MD5}(...
The short answer is: given $n$ bits, $2^n$ “truly random” $n$-bit sequences can be constructed — all of them. Randomness is not a property of a number, nor a property of a sequence of numbers. It's a property of the method that was used to generate that number or sequence. Or, as [fgrieu puts it](http://crypto.stack...
The encrypted file can be opened by following combinations (either any 2 DK, or 1 MK): DK1 + DK2 DK1 + DK3 DK2 + DK3 DK1 + DK2 + DK3 MK Any heads-up with Python KDF logic? Any good documentation/reference will also suffice the purpose. I tried deriving keys with `KDF(MK, "pass1") -> DK...
The context for this question (it's quite involved) can be found in this document: https://docs.google.com/file/d/0B15itpMWb2ztWTJrYTgzX204OVU However, I want to make it clear that you don't have to read or understand all of that document to answer this question. Basically, this technique allows the audit of a TL...
What are the consequences of not checking the server mac in a TLS connection?
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" is just one example for a cipher suite, as far as I'm concerned it means this: it uses the TLS protocol, exchanges keys with Elliptic Curve Diffie Hellman Ephemeral, whose public keys are signed with RSA and afterwards AES 128 bit is used with the Galois Counter Mode, which pr...
Why does AES-GCM need MAC? (TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256)
> I'm not certain but aren't there ways to evaluate a given sequence as random with some given satisfied error? Given n bits, how many "truly random" sequences/numbers can be constructed? If you define "truly random" as meaning prior to generating the sequence, that each bit has an independent 50% chance of being 0 ...
I'm not sure of the exact status of the program, since there was some controversy surrounding it a few weeks ago, see: [Is TrueCrypt not secure now and should I stop using it?](http://security.stackexchange.com/questions/58940/is-truecrypt-not-secure-now-and-should-i-stop-using-it). But the very popular program [TrueCr...
I need to decrypt a huge file that I own previously encoded by myself with a RSA public key. Problem is that I can't load it in my disposable memory for specific embedded architecture reasons. I need to decrypt it with the private key associated to the identity of that architecture. I want to know if its possibl...
The short answer is: given $n$ bits, $2^n$ “truly random” $n$-bit sequences can be constructed — all of them. Randomness is not a property of a number, nor a property of a sequence of numbers. It's a property of the method that was used to generate that number or sequence. Or, as [fgrieu puts it](http://crypto.stack...
> As far as I know, in a typical RSA encoding process first you transform the whole char string that is the file into a number, to be encrypted, so my assumption is that is not possible in a typical RSA encoding-decoding process. That's not typical. A typical real world RSA encryption process uses hybrid encryption...
Alice has a secret key which she uses to encrypt messages in CTR mode. CTR mode is critically vulnerable to counter reuse, and Alice has a problem: she has terrible memory and no pen to write anything down. She has good enough memory to send one message, but between messages she sometimes forgets the counter values tha...
> I'm not certain but aren't there ways to evaluate a given sequence as random with some given satisfied error? Given n bits, how many "truly random" sequences/numbers can be constructed? If you define "truly random" as meaning prior to generating the sequence, that each bit has an independent 50% chance of being 0 ...
I need to decrypt a huge file that I own previously encoded by myself with a RSA public key (it's possible for this step using a symmetric algorithm key). Problem is that I can't load it in my disposable memory for specific embedded architecture reasons. I need to decrypt it with the private key associated to the id...
I need to decrypt a huge file that I own previously encoded by myself with a RSA public key (it's possible for this step using a symmetric algorithm key). Problem is that I can't load it in my disposable memory for specific embedded architecture reasons. I need to decrypt it with the private key associated to the id...
> I'm not certain but aren't there ways to evaluate a given sequence as random with some given satisfied error? Given n bits, how many "truly random" sequences/numbers can be constructed? If you define "truly random" as meaning prior to generating the sequence, that each bit has an independent 50% chance of being 0 ...
> As far as I know, in a typical RSA encoding process first you transform the whole char string that is the file into a number, to be encrypted, so my assumption is that is not possible in a typical RSA encoding-decoding process. That's not typical. A typical real world RSA encryption process uses hybrid encryption...
I need to decrypt a huge file that I own previously encoded by myself with a RSA public key (it's possible for this step using a symmetric algorithm key). Problem is that I can't load it in my disposable memory for specific embedded architecture reasons. I need to decrypt it with the private key associated to the id...
There has been talk in literature about doing multiple encryption with different block ciphers or stream ciphers several times before, and the benefits and risks of such efforts. There may be hidden assumptions or weaknesses in designs of symmetric cipher algorithms, or perhaps they have been deliberately sabotaged by ...
What are good combination of public key algorithms or primitives for long term security?