instruction
stringlengths
15
30k
To get a public key of some organization or someone we want to send an encrypted message to, we need to make a request to CA asking that organization's public key. CA then returns X509 certificate. It contains CA's signature. To decrypt it we need to have a CA's public key. How can we securely obtain CA's public key? ...
How does certificate revocation list (CRL) work? How can I send a request to the CA to add my current private key to the CRL, so no one except me can add my certificate to the CRL? <sub>Related: - [How can we get CA's public key?](http://crypto.stackexchange.com/q/11712/6961) - [I've got my private key comprom...
Not all ciphers can be broken, even by infinitely powerful adversaries. When used correctly, the [One Time Pad (OTP)](http://en.wikipedia.org/wiki/One-time_pad) is [information-theoretic secure](http://en.wikipedia.org/wiki/Information_theoretic_security), which means it can't be broken with cryptanalysis. However, ...
> Why are there exactly $m$ values for $k$? Well, assuming $k$ is the value of the shared secret that either Alice and Bob derive, well, that's not true; there are at most $m$ possible values, however it may be fewer. There will be exactly $m$ values if $g$ is a primitive root modulo $p$; however when we use Diffie...
I have been given a problem in preparation for my cryptography final that I'm not sure how to solve. It asks me to suppose a scenario where instead of where an attacker would intercept some message from Alice ($g^a$) mod p and ($g^b$) mod p from bob, and then replacing each of these with $g^e$, the attacker would repla...
I know that SHA-1 is an unkeyed cryptographic hash function when used in practice. But, in the theory, all hash function are defined with keys. My question is: - How I will be able to formalize the SHA-1 hash function using keys? - In security proof, which approach could be used - theoretical or practical?
Routers could just use Diffie-Hellman protocol with any computer who tries to connect to that router. Then it would be impossible to eavesdrop for anyone. Only router and computer would know the secret key for that session. No? Or someone could act as a router and send his own public key and get the traffic through ...
Why routers don't just use Diffie-Hellman protocol?
Why have 4th and 5th steps in Needham-Schroeder Protocol? It is said "These steps assure B that the original message it received (step 3) was not a replay.". But what is a replay here? And I don't actually get what those 4th and 5th steps do. Send some nonce?
Why have 4th and 5th steps in Needham-Schroeder Protocol?
Reading Schneier's ["The Doghouse: Crypteto"](https://www.schneier.com/blog/archives/2009/09/the_doghouse_cr.html) dated September 30, 2009, I noticed Bruce Schneier stating: > Threefish, the block cipher inside Skein, encrypts data at 7.6 clock cycles/byte with a 256-bit key, 6.1 clock cycles/byte with a 512-bit k...
Has threefish successfully been attacked (practically or theoretically)?
To elaborate on what the comments are leading you toward... This sort of encryption scheme is susceptible to a straight-forward [known-plaintext attack][1]. Every byte of the ciphertext will have been encrypted in the format: $$C_i = P_i \oplus K_{i\ \bmod{\ len(K)}}$$ where $i$ is the byte index within th...
You can search for root certificates of a given CA. E.g.: * http://www.symantec.com/page.jsp?id=roots, but this page is served over plain HTTP so maybe you shouldn't trust it! * or https://www.mozilla.org/projects/security/certs/included/. From there when you want to check a certificate you can check whether ...
When working with an additive homomorphic encryption scheme (say Pallier's), is there an efficient way to get the *encrypted* value of a comparison test to an integer value (I realise that an unencrypted comparison test would make the encryption scheme worthless)? I know there are (rather costly in number of rounds...
In this [paper][1] at the bottom of pg. 1235 and beginning of pg. 1236 it says: > An MPC protocol is said to be secure, if for every real world leakage > adversary A there exists an ideal world simulator S, such that the > output of all the parties (including the adversary) in the real world, > is computationall...
Why do the outputs of parties in an MPC protocol have to be indistinguishable from the ideal / real world (as opposed to inputs)?
I may have found an answer (welcoming any comment on whether I missed something): Say, party A has Enc(x) and Enc(y): - A flips a coin: b in {-1, 1} - A computes: >Enc(c) = (Enc(y)Enc(-x))^(b * r) Enc(-r') = Enc(br(y-x)-r') where (r, r') are a pair of random obfuscating values such that: r' < r and r(y-x)...
I understand that if you have a message _m_, you can blind it by selecting a random r and then multiplying $r^e\times m (mod n)$ Someone else then signs it with d, raising to the power of $d$: $r^{ed}\times m^d (mod n) = r \times m^d$. Finally to unblind: $r^{-1}\times r \times m^d = m^d$ and $(m^d)^e = m$. I unders...
I may have found an answer (welcoming any comment on whether I missed something): Say, party A has Enc(x) and Enc(y): - A flips a coin: b in {-1, 1} - A computes: >Enc(c) = (Enc(y)Enc(-x))^(b * r) Enc(-r') = Enc(br(y-x)-r') where (r, r') are a pair of random obfuscating values such that: r' < r and r(y-x)...
I may have found an answer (welcoming any comment on whether I missed something) which works, **given certain size restrictions on the input $x$ and $y$**: Say, party A has Enc(x) and Enc(y): - A flips a coin: b in {-1, 1} - A computes: > $Enc(c) = (Enc(y) Enc(-x))^{b*r} Enc(-r') = Enc(b*r*(y-x)-r')$ wher...
I understand that if you have a message $m$, you can blind it by selecting a random $r$ and then multiplying $r^e\times m \pmod{n}$ Someone else then signs it with $d$, raising to the power of $d$: $(r^{ed}\times m^d) \bmod n = r \times m^d$. Finally to unblind: $r^{-1}\times r \times m^d = m^d$ and $\left(m^d\right)...
Why have 4th and 5th steps in Needham-Schroeder Protocol? It is said "These steps assure B that the original message it received (step 3) was not a replay.". But what is a replay here? And I don't actually get what those 4th and 5th steps do. Send some nonce? Here is the protocol outline I am looking at ([source][1...
>And I don't actually get what those 4th and 5th steps do. Send some nonce? Notice that $N_b$ has not been seen until step 4, so it is generated by B. In step 5, A sends $N_b-1$ back to B. This proves to B that A knows $K_{ab}$ otherwise A could not have recovered $N_b$. This is done to prevent A from replaying t...
I think your first question is answered by K.G., so I'll tackle the other two >Why not the inputs? The paper talks about a "secret state". Is the secret state different from input/output? Often the inputs of the corrupted parties assumed to be known, but not those of the honest parties. As far as the secret s...
I'm reading a proof of the proposition of [CollisionResistant Hashing Towards Making UOWHFs Practical][1] > Suppose there exists a compression function $F: \Sigma^k\times\Sigma^{c+m'} \rightarrow \Sigma^c$ with $m'>k$ such that $F$ is $(t',\epsilon')$-resistant to target collisions. Then there exists a compression ...
As long as you ensure that $n_1\leq n_2$ is guaranteed, the value $r^em\pmod {n_1}$ can be treated as an element in $Z_{n_2}$ and the "outer blinding" and "outer unlinding" in $Z_{n_2}$ does not change this value. Consequently, if you compute the "inner unblinding" in $Z_{n_1}$ after the "outer unblinding" your proposa...
I'm reading a proof of the proposition of [CollisionResistant Hashing Towards Making UOWHFs Practical][1] > Suppose there exists a compression function $F: \Sigma^k\times\Sigma^{c+m'} \rightarrow \Sigma^c$ with $m'>k$ such that $F$ is $(t',\epsilon')$-resistant to target collisions. Then there exists a compression ...
Reading Goldreich's Foundations of Cryptography II, I found this proof for the security of the common pseudorandom generator + XOR encryption scheme (Proposition 5.2.12 in the book): > Assume you have a secure pseudorandom generator $g \colon \{ 0,1\}^n \to \{0,1\}^m$, and you construct your encryption scheme in the...
Why have 4th and 5th steps in Needham-Schroeder Protocol? It is said "These steps assure B that the original message it received (step 3) was not a replay.". But what is a replay here? And I don't actually get what those 4th and 5th steps do. Send some nonce? Here is the protocol outline I am looking at ([source][1...
In the elliptic curve: y^2 = x^3 + 20x + 13 mod 2111. Using the point (3, 10) I am wondering how to multiply this point by the scalar 57? I realize I can write 57*P as 2^5.P + 2^4.P + 2^3.P + P = 2(2(2(2(2P)))) + 2(2(2(2P))) +2(2(2P)) + P. My question is what is the best way to calculate these doubles and ad...
In the elliptic curve: $y^2 = x^3 + 20x + 13 \bmod{2111}$. Using the point $P=(3, 10)$ I am wondering how to multiply this point by the scalar $57$? I realize I can write $57*P$ as $2^5*P + 2^4*P + 2^3*P + P = 2(2(2(2(2P)))) + 2(2(2(2P))) +2(2(2P)) + P$. My question is what is the best way to calculate these...
As long as you ensure that $n_1\leq n_2$ is guaranteed, the value $r^em\pmod {n_1}$ can be treated as an element in $Z_{n_2}$ and the "outer blinding" and "outer unlinding" in $Z_{n_2}$ does not change this value. Consequently, if you compute the "inner unblinding" in $Z_{n_1}$ after the "outer unblinding" your proposa...
As long as you ensure that $n_1\leq n_2$ is guaranteed, the value $r^em\pmod {n_1}$ can be treated as an element in $Z_{n_2}$ and the "outer blinding" and "outer unlinding" in $Z_{n_2}$ does not change this value. Consequently, if you compute the "inner unblinding" in $Z_{n_1}$ after the "outer unblinding" your proposa...
During my master thesis I came across RSA-PSS-R which is in my opinion a quite elegant way of saving bandwidth and space using digital signature. But I didn't find any information about any real world implementation out there. I have the feeling that it's exactly like the Schnorr Signature scheme. Everybody says that ...
Any real world implementation using message recovery?
Consider protocol like QUIC or MinimaLT which are essentially layer4 replacement for TCP/UDP (riding on top of UDP currently because of fear of random firewalls dropping new L4 protocol). From crypto point of view they are mostly the same designs (using same EC stuff djb has done). IP addresses are not relevant for ...
Could MITM securely identify identity?
A signature scheme with message recovery is standardized as ISO/IEC 9796-2 ([link to preview][1]). Scheme 1 in this standard is commonly used in the Smart Card industry, despite its [known weaknesses][2] in a chosen-message setup. Example real-life uses include the [EMV banking application][3] (the free documents li...
A signature scheme with message recovery is standardized as ISO/IEC 9796-2 ([link to preview][1]). Scheme 1 in this standard is commonly used in the Smart Card industry, despite its [known weaknesses][2] in a chosen-message setup. Example real-life uses include the [EMV banking application][3] (the free documents li...
We have a game $G0$ for which an adversary $A$ has access to a certain amount of ressources. Let us suppose that the maximum advantage for the adversary to win this game is $Adv_{G0}$. If we modify slightly the game $G0$ into the game $G1$ in such way that we give an additionnal information (usefull or not) to this ...
> Can we state that $Adv_{G0} \le Adv_{G_1}$ ? Absolutely. Let us call $S0$ the strategy that $A$ can use in game $G0$ to achieve advantage $Adv_{G0}$; we notice that $A$ can also use strategy $S0$ to achieve that exact same advantage in $G1$, and hence we see that the maximum advantage he can achieve in $G1$ must ...
I'd like to know how much bigger is the ciphertext when encrypting a message using ecc encrytpion? Elgamal EC or ECIES or others. Which outputs the smallest ciphertext? Thank you
A signature scheme with message recovery is standardized as ISO/IEC 9796-2 ([link to preview][1]). Scheme 1 in this standard is commonly used in the Smart Card industry, despite its [known weaknesses][2] in a chosen-message setup. Example real-life uses include the [EMV banking application][3] (the free documents li...
I'd like to know how much bigger is the ciphertext when encrypting a message using ecc encrytpion? ECIES Thank you
We have a business requirement to keep credit card data. What is today's (Nov 2013) state of the art algorithm to encrypt credit card data that will be saved on disk? Additionally, I'd appreciate pointers to Java libraries that implement these algorithms Note that we are PCI compliant and we already store credit car...
The banking and financial communities, in particular, are very conservative. For example, 3DES has long been the standard for PIN encryption, and replaced DES when DES became too long in the tooth. It may be slower than AES, but is venerable and trusted. IBM z-series mainframes have long supported hardware encry...
I'd like to know how much bigger is the ciphertext when encrypting a message using ECC encrytpion? ECIES (or ElGamal) Thank you
Reading Schneier's ["The Doghouse: Crypteto"](https://www.schneier.com/blog/archives/2009/09/the_doghouse_cr.html) dated September 30, 2009, I noticed Bruce Schneier stating: > Threefish, the block cipher inside Skein, encrypts data at 7.6 clock cycles/byte with a 256-bit key, 6.1 clock cycles/byte with a 512-bit k...
In order to setup an authenticated shared secret key between two clients, I am faced with the choice between two possibilities: 1. Let users set a (low-entropy) shared password and then perform some password-authenticated key exchange that is resilient to low-entropy secrets (as described [here](http://tools.ietf.or...
In order to setup an authenticated shared secret key between two clients, I am faced with the choice between two possibilities: - A: Let users set a (low-entropy) shared password and then perform some password-authenticated key exchange that is resilient to low-entropy secrets (as described [here](http://tools.ietf....
I'd like to know how much bigger is the ciphertext when encrypting a message using ECC encrytpion? ECIES (or ElGamal)
I may have found an answer (welcoming any comment on whether I missed something) which works, **given certain size restrictions on the input $x$ and $y$**: Say, party A has Enc(x) and Enc(y): 1. A flips a coin: b in {-1, 1} 2. A computes: $Enc(c) = (Enc(y) Enc(-x))^{b*r} Enc(-r') = Enc(b*r*(y-x)-r')$ where (r,...
I may have found an answer (welcoming any comment on whether I missed something) which works, **given certain size restrictions on the input $x$ and $y$**: Say, party A has Enc(x) and Enc(y): 1. A flips a coin: b in {-1, 1} 2. A computes: $Enc(c) = (Enc(y) Enc(-x))^{b*r} Enc(-r') = Enc(b*r*(y-x)-r')$ where (r,...
I may have found an answer (welcoming any comment on whether I missed something) which works, **given certain size restrictions on the input $x$ and $y$**: Say, party A has Enc(x) and Enc(y): 1. A flips a coin: b in {-1, 1} 2. A computes: $Enc(c) = (Enc(y) Enc(-x))^{b*r} Enc(-r') = Enc(b*r*(y-x)-r')$ where (r,...
I may have found an answer (welcoming any comment on whether I missed something) which works, **given certain size restrictions on the input $x$ and $y$**: Say, party A has Enc(x) and Enc(y): 1. A flips a coin: b in {-1, 1} 2. A computes: $Enc(c) = (Enc(y) Enc(-x))^{b*r} Enc(-r') = Enc(b*r*(y-x)-r')$ where (r,...
When working with an additive homomorphic encryption scheme (say Pallier's), is there an efficient way to get the *encrypted* value of a comparison test to an integer value (I realise that an unencrypted comparison test would make the encryption scheme worthless)? I know there are (rather costly in number of rounds...
When working with an additive homomorphic encryption scheme (say Pallier's), is there an efficient way to get the *encrypted* value of a comparison test to an integer value (I realise that an unencrypted comparison test would make the encryption scheme worthless)? I know there are (rather costly in number of rounds...
I may have found an answer (welcoming any comment on whether I missed something) which works, **given certain size restrictions on the input $x$ and $y$**: Say, party A has Enc(x) and Enc(y): 1. A flips a coin: b in {-1, 1} 2. A computes: $Enc(c) = (Enc(y) Enc(-x))^{b*r} Enc(-r') = Enc(b*r*(y-x)-r')$ where (r,...
When working with an additive homomorphic encryption scheme (say Pallier's), is there an efficient way to get the *encrypted* value of a comparison test to an integer value (I realise that an unencrypted comparison test would make the encryption scheme worthless)? I know there are (rather costly in number of rounds...
Talking about a (symmetric) encryption scheme $\Pi=(Gen,Enc,Dec)$ where $Gen$ take the security parameter $n$ as input and generates a key $k$ of length $n$. Generally speaking we say that $Gen$ choose key uniformly from $\{0,1\}^n$ but this is not always the case. How can I prove that if there exist an encryptio...
Why can we always assume that $Gen$ algorithm choose key uniformly?
Talking about a (symmetric) encryption scheme $\Pi=(Gen,Enc,Dec)$ where $Gen$ take the security parameter $n$ as input and generates a key $k$ of length $n$. Generally speaking we say that $Gen$ choose key uniformly from $\{0,1\}^n$ but this is not always the case. How can I prove that if there exist a secure enc...
When working with an additive homomorphic encryption scheme (say Pallier's), is there an efficient way to get the *encrypted* value of a comparison test to an integer value (I realise that an unencrypted comparison test would make the encryption scheme worthless)? I know there are (rather costly in number of rounds...
Talking about a (symmetric) encryption scheme $\Pi=(Gen,Enc,Dec)$ where $Gen$ take the security parameter $n$ as input and generates a key $k$ of length $n$. Generally speaking we say that $Gen$ choose key uniformly from $\{0,1\}^n$ but this is not always the case. How can I prove that if there exist a (computati...
Can you explain the actual attack? 1. Why the attacker need to firstly send some arbitrary UDP packet? 2. How the attacker break the privacy between A and B? Link: [The article of Bellovin][1] I'm attaching the slide for a reminder:![enter image description here][2] [1]: https://www.cs.columbia.edu/~smb/...
Can you explain the actual attack? 1. Why the attacker need to firstly send some arbitrary UDP packet? 2. How the attacker break the privacy between A and B? Link: [The article of Bellovin][1] I'm attaching the slide for a reminder:![enter image description here][2] [1]: https://www.cs.columbia.edu/~sm...
Let say that I wrote a 26 letter alphabet, each letter of my alphabet represent a letter from the latin alphabet. I'm writing in 3 languages, only I know which languages. Grammar is the one from my native language. Each time I need to write a word I randomly chooses in which language I'm going to write it. Ca...
In [this paper][1] on pg. 1236 under the section "Security Against Continual Leakage" the authors say: > We further remark that the weaker security notion previously > achieved cannot be extended meaningfully to continual leakage in the > MPC setting. That is, it cannot address the setting where the n users > do...
What is the difference between a one-shot MPC protocol and a unbounded invocation of multiple MPC protocols?
Can you explain the actual attack? 1. Why does the attacker need to firstly send some arbitrary UDP packet? 2. How can the attacker break the privacy between A and B? Link: [The article of Bellovin][1] I'm attaching the slide for a reminder:![enter image description here][2] [1]: https://www.cs.columbi...
I see in some “Authentication schemes with biometric” papers that those authors wrote a phase as password and biometric update phase. My question is that why we may needs biometric update phase? Is not biometric (say finger print or iris or face and …) permanent properties?
I want to implement a basic version of Diffie-Hellman key agreement for groups. So, my key is $K=g^{abc} mod p$. Following this, the parameters I would need to transfer would be $K_a = g^{bc}$ etc. The group may become large (up to 100 member), so I don't want to calculate every parameter anew and reuse $K$. Is ther...
I want to implement a basic version of Diffie-Hellman key agreement for groups. So, my key is $K=g^{abc} \mod p$. Following this, the parameters I would need to transfer would be $K_a = g^{bc}$ etc. The group may become large (up to 100 member), so I don't want to calculate every parameter anew and reuse $K$. Is the...
I want to implement a basic version of Diffie-Hellman key agreement for groups. So, my key is $K=g^{abc} \mod p$. Following this, the parameters I would need to transfer would be $K_a = g^{bc}$ etc. The group may become large (up to 100 member), so I don't want to calculate every parameter anew and reuse $K$. Is the...
You'd need to compute $K^{(a^{-1})}$. Only those who hold the private key $a$ can do this. Multiplying with $(g^a)^{-1} = g^{-a}$ would subtract $a$ from the exponent, not divide the exponent by $a$. So your optimization isn't possible in practice. Take a look at the alternatives at [Can one generalize the Diffie-He...
Most of the encryption modes of Feistel Networks especially the ones used to build fixed length block ciphers just provide confidentiality . Can we build authenticated encryption using Feistel Networks ?
Can we build authenticated encryption using Feistel Networks?
1. Suppose I have a random number (eg $625 467 921$). I use it once to encrypt a message OTP style, and when I want to use them again, I reverse them (eg to $129 764 526$') and use to encrypt the other message. Whatis the weakness of this scheme? 2. Again, suppose I have some random numbers (again eg $625 467 921$)....
1. Suppose I have a random number (eg `625 467 921`). I use it once to encrypt a message OTP style, and when I want to use them again, I reverse them (eg to `129 764 526`) and use to encrypt the other message. What is the weakness of this scheme? 2. Again, suppose I have some random numbers (again, eg `625 467 921`)...
David Kahn in his book "The Codebreakers" wrote about Jefferson's wheel cipher, saying that > To this day the Navy uses it… (the book was first published in 1967) Are there any historical accounts of successful cryptanalysis of that cipher?
http://en.wikipedia.org/wiki/One-time_password#How_OTPs_are_generated_and_distributed Why have so many methods to generate OTPs, why not just use just random strings?
Why not just generate random strings for one-time password (OTP)?
Why send a challenge to the user and ask them to hash that challenge with the symmetric key and send that hash back to the server? Why not just ask for a hash value of a symmetric key? And what is the point of this protocol at all when you both have symmetric keys?
Why send a challenge with CHAP?
I have been reading about the Challenge-Handshake authentication Protocol (aka [CHAP](http://en.wikipedia.org/wiki/Challenge-Handshake_Authentication_Protocol)). Why send a challenge to the user and ask them to hash that challenge with the symmetric key and send that hash back to the server? Why not just ask for a h...
Actually, the attack is on CBC mode (which IPSec uses). In the attack, it modifies the encrypted packets, and uses the IPSec decryptor as a decryption Oracle. How it works is based on how CBC-mode decryption works: ![CBC mode decryption][1] Note that any particular plaintext block depends only on the correspo...
I want a key stretching system that's as strong as the stronger of scrypt and PBKDF2. The consensus now is that scrypt is by far the better system, but that might change if in the future, a weakness is found in Salsa20. Here is a proposed system that I dreamed up, does it seem like a good idea? First run scrypt and...
I want a key stretching system that's as strong as the stronger of scrypt and PBKDF2. The consensus now is that scrypt is by far the better system, but that might change if in the future, a weakness is found in Salsa20. Here is a proposed system that I dreamed up, does it seem like a good idea? First run scrypt and...
What is the difference between these two notions ? Thank you.
What is the difference between these two notions?
I've read the following two questions and their answers: - http://crypto.stackexchange.com/questions/5180/messages-of-different-lengths-and-one-time-computationally-secret - http://crypto.stackexchange.com/questions/5146/why-is-a-non-fixed-length-encryption-scheme-worse-than-a-fixed-length-one I am still not con...
Is the following scheme private? By private i mean an untrusted aggregator (UA) cannot reveal anything other then an aggregate function output on plaintext data Each party holds a secret key $k_i$ and data $d_i$. It sends to the aggregator $d_i H(r)^{k_i}$. $H$ is a hash function that maps elements to a group $N$...
Is the following aggregation scheme private?
And how do you propose to generate those strings "randomly"? That becomes the real problem. If you use the output of rand(), then the security of your algorithm is no better than the unpredictability of your random number generator. Random number generators have to be carefully designed for cryptographic use. M...
I know that if using a CBC-MAC in a way that the tag is a concatenation of **all** the blocks' output (and not just the last one) it's insecure under CPA for the simplest case of 2 blocks CBC-MAC where: message $m=m_1||m_2 (|m_1|=|m_2|=blocksize)$, tag $t=t_1||t_2$ such that: $t_1 = F_k(m), t_2=F_k(t_1\oplus m2)...
CBC encryption mode is reorderable?
The idea of [crypto_box API in NaCl library][1] is to shield the programmer away from the technical details and provide an easy to use functions for encrypting and encrypting messages. Given what I've just wrote, I do not understand why the idea of *nonce* is exposed in this API. Explaining what nonce is and how to ...
I know that if using a CBC-MAC in a way that the tag is a concatenation of **all** the blocks' output (and not just the last one) it's insecure under CPA for the simplest case of 2 blocks CBC-MAC where: message $m=m_1||m_2$ (where $|m_1|=|m_2|=$ blocksize),the tag $t=t_1||t_2$ such that: $t_1 = F_k(m_1), t_2=F_k...
I know that if using a CBC-MAC in a way that the tag is a concatenation of **all** the blocks' output (and not just the last one) it's insecure under CPA for the simplest case of 2 blocks CBC-MAC where: message $m=m_1||m_2$ (where $|m_1|=|m_2|=$ blocksize),the tag $t=t_1||t_2$ such that: $t_1 = F_k(m_1), t_2=F_k...