instruction
stringlengths
15
30k
Is there a public-key cryptography method that enables public keys to be much smaller than private keys?
In the security proof of Brent Waters's paper [*Efficient Identity-Based Encryption Without Random Oracles*](http://eprint.iacr.org/2004/180.pdf), he uses a novel “artificial abort” step. What is the meaning of this step?
What is the "artificial abort" technique?
In the security proof of Brent Waters's paper [*Efficient Identity-Based Encryption Without Random Oracles*](http://eprint.iacr.org/2004/180.pdf), he uses a novel “artificial abort” step on page 6. > At this point the simulator is still unable to use the output from the adversary. An adversary’s probability of succ...
Basically, any password is a string of letters and entropy can be easily calculated. For example you can use [Shannon entropy calculator][1] or by hand using a scientific calculator. Entropy is calculated based on frequencies of letters in the password, it does not care about used language. So diverse passwords wi...
In a recent [question](http://crypto.stackexchange.com/q/16348/4973) I asked here on crypto.se, an answer was given that surprised me a bit. As mentioned in the referenced question, I'm looking to derive encryption and authentication keys from the output of scrypt. Since I can use nearly any output size I'd like in...
Why would splitting a password output be better than separate HMACs for encryption/authentication key derivation?
I just saw **[a video at CNN](http://money.cnn.com/video/technology/2014/05/21/t-hacking-encrypted-passwords.cnnmoney)** in which it is claimed that, if the server isn't generating a random public key, the server can be hacked. First how HTTPS works… to be sure I’m on the same page: - Server has a public key and...
How does this SSL-related flaw work?
it is my understanding that a KDF adds entropy whereas a Hash lose information. I've read that KDF should be used to store passwords. I don't understand why we don't use a KDF and then a hash so that if the database of password is leaked then it would also be impossible to figure out the plain passwords. So stori...
KDF followed by a Hash?
> Is there code or idea for doing this? As you did not specify what research you have done, or what you already know, I can merely guess. In case you haven’t done so yet, you could check on: - [A privacy-compliant fingerprint recognition system based on homomorphic encryption and fingercode template](http://g...
> Is there code or idea for doing this? As you did not specify what research you have done, or what you already know, I can merely guess. In case you haven’t done so yet, you could check on: - [A privacy-compliant fingerprint recognition system based on homomorphic encryption and fingercode template](http://g...
I am doing a finger-print authentication process. The feature-extraction using minutiae has been done and I get an `N x 6` matrix, where the 6 columns are {$x_i$ ,$y_i$, crossing number of the $i$th minutiae, orientation of $i_{th}$ minutiae, rest 2 columns are not used for matching}. The first two are `(x,y)` co-or...
I am doing a finger-print authentication process. The feature-extraction using minutiae has been done and I get an `N x 6` matrix, where the 6 columns are {$x_i$ ,$y_i$, crossing number of the $i$th minutiae, orientation of $i_{th}$ minutiae, rest 2 columns are not used for matching}. The first two are `(x,y)` co-ordin...
It is my understanding that a KDF adds entropy, whereas a hash loses information. I've read that KDF should be used to store passwords. I don't understand why we don't use a KDF and then a hash, so that – if the database of password is leaked – it would also be impossible to figure out the plain passwords. So sto...
Internally scrypt has a huge state space, from which it derives 256-bit output blocks using PBKDF2-HMAC-SHA2, so it's basically already doing what you suggest as 1., just with much larger inputs. Adding another level of HMAC on top will not help. In general, you need to be careful when chaining hash functions like $...
There is a pretty good introductory book that strongly relates to the topic area: [Security with Noisy Data](http://www.amazon.com/Security-Noisy-Data-Biometrics-Anti-Counterfeiting/dp/1846289831/ref=sr_1_1?ie=UTF8&qid=1401105729&sr=8-1&keywords=security+with+noisy+data) that I would recommend you take a look at. The b...
I have read Pairings for cryptographers: It states that the groups $G_1$ and $G_2$ are groups of points on the curve and the group GT is a subgroup of the multiplicative group of a related finite field $F_{q^k}$. l is the order of these three groups. It then states that the sizes for $q$ are more comparable to RSA rat...
> Does input truncation using SHA-256 expose any potential weaknesses? No, hashing the passphrase with SHA-256 will be no stronger or weaker than feeding it in directly. If you go with Scrypt (which I would recommend you do), there are no restrictions on the size of the passphrase... and Scrypt consumes it internal...
###Caution: this answer is tentative, and touches only a minuscule part of the subject. <sup>Everyone, please fell free to incorporate it in your own answer, or edit it.</sup> A common misconception is that that are known methods to capture biometric data (like a fingerprint), apply some transformation, and get a r...
###Caution: this answer is tentative, and touches only a minuscule part of the subject. <sup>Everyone, please fell free to incorporate it in your own answer, or edit it.</sup> A common misconception is that that are known methods to capture biometric data (like a fingerprint), apply some transformation, and get a r...
There is a pretty good introductory book that strongly relates to the topic area: [Security with Noisy Data](http://www.amazon.com/Security-Noisy-Data-Biometrics-Anti-Counterfeiting/dp/1846289831/ref=sr_1_1?ie=UTF8&qid=1401105729&sr=8-1&keywords=security+with+noisy+data) that I would recommend you take a look at. The b...
I am trying to understand how to prove the following situation: Say we have an encryption algorithm that encrypts data blocks of 128 bits size, and makes them cipher blocks C= E(P) without chaining. Also assume there is a linearity rule for XOR: For every pair of Plaintext blocks P1, P2 there is: E(P1 XOR P2) = E...
Well, one obvious way he can decrypt ANY cipher block is just give it to his Decryption machine; that machine will give him the matching plaintext block, which is precisely what he is looking for. Now, normally when we give an attacker a decryption oracle, and give him a challenge "decrypt this specific message", we...
###Caution: this answer is tentative, and touches only a minuscule part of the subject. <sup>Everyone, please fell free to incorporate it in your own answer, or edit it.</sup> A common misconception is that there are known methods to capture biometric data (like a fingerprint), apply some transformation, and get a ...
Going through the wiki for [modes of operation](http://en.wikipedia.org/wiki/Cipher_block_chaining#Error_propagation) I see that the section error propogation says that an error in one block in the ciphertext in CBC mode only impacts two blocks. I do not quite get that. If the second plaintext block is decrypted wrong,...
I am trying to understand how to prove the following situation: Say we have an encryption algorithm that encrypts data blocks of 128 bits size, and makes them cipher blocks C= E(P) without chaining. Also assume there is a linearity rule for XOR: For every pair of Plaintext blocks P1, P2 there is: E(P1 XOR P2) = E...
I have created a RSA encryption/decryption program but how do i write out the results after doing a encryption? Right now I have it so that it will just print out the decimal value of one character after encrypting then a space and the next value. Example:<br /> Public Key:(143, 17)<br /> Message: hello<br /> Enc...
Say we have an encryption algorithm that encrypts data blocks of 128 bits size, and makes them cipher blocks $C = E(P)$ without chaining. Also assume there is a linearity rule for XOR: For every pair of plaintext blocks $P_1$, $P_2$ there is: $E(P_1 \oplus P_2) = E(P_1) \oplus E(P_2)$ for all patterns. Encryption is...
I'm looking for a simulation of the Quantum Key Distribution protocol. Does anyone here have one that they could recommend?
First off, I'm not an experienced cryptography or computer person, please bare with me. I have some basic experiences with PGP software though (not much of a redemption huh?). I have some data that I'd like to protect with ECC encryption, but I can't for the life of me find a tool or anything that can use ECC. I'm not ...
In (n,n) Shamir secret sharing if n shareholders do not have the public values (X values) can they still obtain the secret?
In (n,n) Shamir secret sharing if n shareholders do not have the public values (X values) can they still obtain the secret with only Y values?
Does a scheme which provides data authenticity (e.g. HMAC or RSA signature) always implicitly provide integrity? It seems, to me at least, that it must by necessity. However, I have seen cryptographers reference MAC, MIC, and MAIC as separate terms. In my experience, that usually means that there's a subtle difference ...
Does data authenticity always, implicitly, provide data integrity?
Sure the dealer can do that. The real question is, what kind of security does it provide? I am not aware of any formal analysis on the topic. If the attacker can verify when he has found the right x values, then at **best** the security of the scheme is computational in the size of the underlying finite field. If the a...
First off, I'm not an experienced cryptography or computer person, please bear with me. I have some basic experiences with PGP software though (not much of a redemption huh?). I have some data that I'd like to protect with ECC encryption, but I can't for the life of me find a tool or anything that can use ECC. I'm ...
I'm relatively new to encrypting, and I have some questions. I intend to write a standalone C# program that will write and read an encrypted file with sensitive data using a password entered by the user when the program is started. Both the program and the file will be stored together on a private place, but one never ...
Assume: - Alice and Bob both generate separate EC keypairs - Alice obtains Bob's public key, and together with her private key creates a shared secret key - Alice encrypts a message using the shared key and some mode of authenticated encryption (AES-GCM, for example) - Bob generates the same shared secret key...
Does ECIES imply authenticity?
1. Salt and IV do not need to be secret, but should be unique. If I understand correctly, the Rfc2898DeriveBytes class generates a random salt? In that case you are fine. 2. 64 bytes is (more than) enough for a random salt. The iteration count depends on your needs. You should basically pick the largest number that ...
I'm answering based on the protocol in your question, which seems to be (EC) Diffie-Hellman. > My question is; if Bob is confident that Alice's public key really belongs to Alice, then can he be confident that it was Alice who encrypted the message? If Bob is confident no one else has access to either secret key ...
I have implemented a key pair generation scheme for RSA algorithm. I have taken the length of private key exponent as RSA key size, but then I've got to know that RSA key size is the size of the modulus 'n'. Is it wrong to take RSA key size as the size of the private key exponenet? To generate a private key of 1024 ...
Is RSA key size the size of private key exponent in public key encryption?
I have written a program to run AES in CTR mode with keys of 128,192 or 256 bits and checked it gives correct results with the data given in section F.5 at http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf The program chooses a different nonce for each message that is enciphered. Do I need a different...
For enciphering messages with AES in CTR mode, do I need a different key for each message?
I am a student taking a cryptography course so forgive me if this comes off as a silly question. This is an assignment question: > $Alice \rightarrow R \rightarrow Bob$ $Alice \leftarrow [R]B \leftarrow Bob$ $Alice \rightarrow [R+1]A \rightarrow Bob$ > Why doesn't this protocol provide mutual authentica...
In the security proof of Brent Waters's paper [*Efficient Identity-Based Encryption Without Random Oracles*](http://eprint.iacr.org/2004/180.pdf), he uses a novel “artificial abort” step on page 6. > At this point the simulator is still unable to use the output from the adversary. An adversary’s probability of succ...
I'm relatively new to encrypting, and I have some questions. I intend to write a standalone C# program that will write and read an encrypted file with sensitive data using a password entered by the user when the program is started. Both the program and the file will be stored together on a private place, but one never ...
The equation for a finite field Elliptic Curve is of this form: y^2 = x^3 + a * x + b mod P When we do common EC operations like point doubling or point addition we need to calculate the inverse of a number. For example this is the formula to calculate the slope for the point addition. (pt1Y - pt2Y)...
The equation for a finite field Elliptic Curve is of this form: $$y^2 = x^3 + a * x + b \mathoperator{mod} P$$ When we do common EC operations like point doubling or point addition we need to calculate the inverse of a number. For example this is the formula to calculate the slope for the point addition. $$...
Going through the OTR specification I don't quite get why a new DH keys (and hence new symmetric key and hmac key) are generated for each message to be sent. Why is this necessary? I don't think it makes the argument for PFS any stronger. Also it does not have anything to do with deniability as well. Am I missing somet...
The equation for a finite field Elliptic Curve is of this form: $$y^2 = x^3 + a * x + b \mathop{mod} P$$ When we do common EC operations like point doubling or point addition we need to calculate the inverse of a number. For example this is the formula to calculate the slope for the point addition. $$(Y_1 -...
The equation for a finite field Elliptic Curve is of this form: $$y^2 \equiv x^3 + a * x + b \pmod{P}$$ When we do common EC operations like point doubling or point addition we need to calculate the inverse of a number. For example this is the formula to calculate the slope for the point addition. $$(Y_1 - ...
“Brainwallet” is a program that takes a passphrase (hopefully a good one) and deterministically creates a Bitcoin wallet. This wallet can be used for transactions, then deleted from the computer. To get access to the wallet again, you only need the passphrase to re-create it. Does something similar exist for GPG? If...
Are there any general techniques for evading frequency based crypt analysis without using any encryption techniques?
I am using a `AutoSeededRNG` from Crypto++ to generate IVs for use in CBC encryption. I am encoding the IVs using Base64 for future use (decryption). I notice that all the Base64 encoded IVs end with `gB`. Why is this? Is it a security problem? Here is the code: for (int i = 0; i < 10; i++) { ...
It seems that even in MAC-then-encrypt systems like SSL, something like HMAC is used rather than a plain hash. Why? Suppose we use some stream cipher; then why can't we use $Encrypt(m | H(m))$ as the MAC-then-encrypted version of the message? Assuming no bad relations between $Encrypt$ and $H$, what are the possible...
Why is plain-hash-then-encrypt not a secure MAC?
HMAC is a *keyed* hash… which means it additionally provides ***unforgeability***. A “plain hash” (which I assume to include cryptographic hashes) merely provides collision resistance, while a HMAC provides both collision resistance **and** unforgeability… because an attacker is unable to calculate a new, valid HMAC...
HMAC is a *keyed* hash… which means it additionally provides ***unforgeability***. A “plain hash” (which I assume to include cryptographic hashes) merely provides collision resistance, while a HMAC provides both collision resistance **and** unforgeability… because an attacker is unable to calculate a new, valid HMAC...
> It seems that in this case we are encrypting the hash with part of a secretly keyed stream cipher keystream, and the hash is secure; does this not fulfill an approximation of the ideal MAC? HMAC is a *keyed* hash… which means it additionally provides ***unforgeability***. A “plain hash” (which I assume to inclu...
> It seems that in this case we are encrypting the hash with part of a secretly keyed stream cipher keystream, and the hash is secure; does this not fulfill an approximation of the ideal MAC? HMAC is a *keyed* hash… which means it additionally provides ***unforgeability***. A “plain hash” (which I assume to inclu...
> It seems that in this case we are encrypting the hash with part of a secretly keyed stream cipher keystream, and the hash is secure; does this not fulfill an approximation of the ideal MAC? HMAC is a *keyed* hash… which means it additionally provides ***unforgeability***. A “plain hash” (which I assume to inclu...
"Why?" We want to be able to build off of more basic encryption schemes. <br><br><br> "Suppose we use some stream cipher; then why can't we use <br> Encrypt(m|H(m)) as the MAC-then-encrypted version of the message?" For "traditional" non-authenticated encryption schemes, encrypting plaintexts <br> with the ...
> …something like HMAC is used rather than a plain hash. HMAC is a *keyed* hash… which means it additionally provides ***unforgeability***. A “plain hash” (which I assume to include cryptographic hashes) merely provides collision resistance, while a HMAC provides both collision resistance **and** unforgeability… ...
> …something like HMAC is used rather than a plain hash. HMAC is a *keyed* hash… which means it additionally provides ***unforgeability***. A “plain hash” (which I assume to include cryptographic hashes) merely provides collision resistance, while a HMAC provides both collision resistance **and** unforgeability… ...
Assume that initiator $I$ and responder $R$ of a key agreement protocol have agreed on new symmetric session keys $K'_{auth}$ and $K'_{enc}$, e.g. by way of Diffie-Hellman and key derivation, possibly including [key confirmation][1]. Now they want to use the new $K'$s for the first time and on all subsequent messages. ...
Common pitfalls of session key activation?
Are they any reductionist proofs where an attacker $\mathcal{I}$ for a well established computationally "hard" problem $\mathsf{Π}$ is employing an attacker $\mathcal{A}$ who we assume is able to break a decisional problem $\mathsf{Γ}$ (i.e: semantic security->guess if $b=1$ or $b=0$) in order $\mathcal{I}$ to break $\...
i am looking for crypto algorithm or combination of them. Basically i need algo/name/lib/whatever information, which can generate private key and for this key can be computed multiple keys based on some seed? So with different seed would be different line of keys and so on. I think somethink like this is used fo...
Looking for crypto with derived keys?
> I understand that, for a block cipher that receives a key of k bits and processes blocks of n bits (n>k), on ECB mode, Oscar would find false keys and because of that he would need to check more than one pair (i.e. two or three for DES). That doesn't sound right; if you are assuming that the attacker (Oscar) has a...
I am using AES/CBC to encrypt my http cookie. I never encrypt the same cookie value twice so my understanding is I don't need to use a random initial vector - using a fixed initial vector is fine for this case. A random initial vector is needed if we may encrypt the same message more than one. Is my understanding corre...
I use PBKDF2-SHA512 with an iteration count of 128,000 to hash my passwords. I use a CSPRNG to generate a salt per password. However, I am unsure about the ideal size of the salt. I have read **a lot of** things about the salt size, but I have been unable to find a definitive answer. All of them agree that there is a m...
PBKDF2-SHA512 - Does a Big Salt Decrease Security?
i am looking for crypto algorithm or combination of them. Basically i need algo/name/lib/whatever information, which can generate private key and for this key can be computed multiple keys based on some seed? So with different seed would be different line of keys and so on. I think somethink like this is used fo...
I'm using the sha256 algorithm to generate a number in one of my programming projects. A sha256 hash is calculated from three strings: one the user can edit, one the user can view but not edit and one the user cannot view or see until it is changed to a new string. From the hash, the first two characters are looked ...
Uniform distribution/randomness of characters in the sha256 hash?
First of all, I would like to note that the statements you make up front are not universally true -- sometimes we use Elliptic Curves with different equations, and with a bit of cleverness, we can do a long series of point additions/doubles and compute a single multiplicative inverse at the end. These cavaets don't re...
> So, here's my question: is there a point where the salt size doesn't matter anymore in terms of security and where it might even decrease it? The purpose of a salt is to prevent the attacker from targeting multiple users' passwords with the same try or caching common passwords' hashes in a table. You need enough s...
"Why?" We want to be able to build off of more basic encryption schemes. <br><br><br> "Suppose we use some stream cipher; then why can't we use <br> Encrypt(m|H(m)) as the MAC-then-encrypted version of the message?" For "traditional" non-authenticated encryption schemes, encrypting plaintexts <br> with the ...
I am looking for cryptographic algorithm or combination of them. Basically I need an algorithm, which can generate private key and for this key can be computed multiple keys based on some seed. So a different seed would generate a different line of keys and so on. Does such an algorithm (or set of algorithms) exist...
First of all, I would like to note that the statements you make up front are not universally true -- sometimes we use Elliptic Curves with different equations, and with a bit of cleverness, we can do a long series of point additions/doubles and compute a single multiplicative inverse at the end. These cavaets don't re...
Let A be a point on curve with integral coordinates. Does k.A necessarily have integer coordinates? If so than why and if not than how to find A and k such that k.A has integral coordinates.
As far as I understand: - The primary disadvantage associated with stream ciphers is the need for a random and unique key for each run in order to protect against reused-key attacks. - OFB/CFB/CTR block cipher modes turn the cipher into a stream cipher. Again, the IV/nonce should be random and unique. What's the...
We know that traditional mathematical proofs can contain mistakes, and that these mistakes can remain undiscovered for years. Sometimes, the scheme is secure even if the proof is incorrect, e.g. [RSA-OAEP](http://eprint.iacr.org/2000/060). Sometimes, the scheme is mildly flawed, the flaws undiscovered because of mistak...
From what i have read it seems like one of the purported benefits of using CTR mode AES, is that it can be parallelized to a greater degree, or maybe more easily than the other block cipher modes, leading to performance gains? In [NIST SP800-38A](http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf) §6.5...
How to parallelize tasks in CTR-AES for maximum performance?
From what I have read it seems like one of the purported benefits of using <br> CTR mode AES, is that it can be parallelized to a greater degree, or maybe <br> more easily than the other block cipher modes, leading to performance gains? In [NIST SP800-38A](http://csrc.nist.gov/publications/nistpubs/800-38a/sp800...
How can one parallelize tasks in CTR-AES for maximum performance?
Can any one explain how the modified r-adding walk by Jung Hee Cheon et.al. work?
Such reductions I know are 1. the reductions in hardcore predicates/functions from computational assumptions, say, from the OWP/OWF/RSA/DCR/CDH/DBDH assumptions, 2. the reductions in (provably-secure) PRGs/PRFs from computational assumptions, say, from the OWP/OWF/RSA/DCR/CDH/DBDH assumptions, and 3. the reductio...
In RSA encreyption time is usually much less than decryption time due to having a small public exponent. Can this be achieved in ECC?
So I'm working on the attacks on the RSA and came across the M.Weiner attack, the limit for d inorder for the attack to apply is d less than or = to (1/3)N^0.25, so it says that Boneh and duffer improved this limit, but to what? Like what's the limit they reach for the attack to still apply. Thank you in advance!
Paillier cryptosystem is a probabilistic asymmetric algorithm for public key cryptography (http://en.wikipedia.org/wiki/Paillier_cryptosystem). Pailliers weakness, isn't that partly because it is missing the nonce, but if so how can it be probabilistic? Am I missing something here? I am also trying to understand the...
This is mostly a supplement to [@ThomasPornin's answer](http://crypto.stackexchange.com/a/1194/12164), not a complete answer on its own (but too long to fit in a comment). ECC uses a finite field, so even though elliptical curves themselves are relatively new, most of the math involved in taking a discrete logarithm...
Paillier cryptosystem is a probabilistic asymmetric algorithm for public key cryptography (http://en.wikipedia.org/wiki/Paillier_cryptosystem). Doesn't homomorphic encryption schemes have regular effects on the plaintext, and does that mean Pailliers cryptosystem missing the nonce? What is that I am missing? I am al...
[Paillier cryptosystem](http://en.wikipedia.org/wiki/Paillier_cryptosystem) is a probabilistic asymmetric algorithm for public key cryptography. Doesn't homomorphic encryption schemes have regular effects on the plaintext, and does that mean Pailliers cryptosystem missing the nonce? What is that I am missing? I am a...