instruction
stringlengths
15
30k
I have some thoughts on this. First, I want to say I am no expert on cryptography, I just know some stuff, and I took a cryptography class in University. I am very interested in this topic. I understand that many security experts out there might get angry just by the discussion of these things, but I hope you can sp...
Would it be possible to break an RSA key, in for example 1 week of time, if the cracker have already spent X number of years building an index of primes by performing every permutation of existing prime keys up to $2^{2048}$? I understand this would take an immense amount of time to do, but it would only be done onc...
Is it feasible to build an index of prime factors?
>How long would that take in permutations and perhaps with the fastest computer in the world? Given the analysis by @fgrieu using the prime number theorem, we know there are roughly $2^{185}$ possible prime numbers which could be used to construct a $384$-bit RSA key pair. Thus there are $2^{185^2}$ possible RSA key...
Let the **preimage resistance** be defined as »given a hash value $h$, it is hard to find any message $m$ such that $\operatorname{hash}(m)=h$«, and let the **second preimage resistance** be defined as »given a message $m_1$, it is hard to find any message $m_2$ such that $\operatorname{hash}(m_1)=\operatorname{hash}(m...
Why doesn't preimage resistance imply the second preimage resistance?
Let's assume for an instant that you _could_ build a large table of all primes. Then... what ? How would you _use_ it ? What would you look up ? If you "just" scan the table and try to divide the number to factor by each prime, then this is known as [trial division][1]; there is no need to _store_ the primes (they c...
In the face of non-quantum attacker, [Keccak][1][r=1088,c=512] with 512 bits of output provides: - Collision resistance up to $2^{256}$ operations - Preimage resistance up to $2^{256}$ operations - Second preimage resistance up to $2^{256}$ operations In general however, using quantum computing, specifically...
Does anyone know how to do an ECDH with more than 2 parties? I know how to do a key exchange between 2 parties but I need to be able to have a key agreement between 3 or more parties.
Does anyone know how to do an [ECDH][1] key exchange with more than two parties? I know how to do a key exchange between 2 parties, but I need to be able to have a key agreement between 3 or more parties. [1]: http://en.wikipedia.org/wiki/Elliptic_curve_Diffie%E2%80%93Hellman
Can one generalize the Diffie-Hellman key exchange to three or more parties?
No. See the following. http://www.gwern.net/Self-decrypting%20files It has a decent list of ways you might try to do it. However, there is no guaranty that the desired amount of time would actually elapse until the "lock" was broken. In other words, significantly more or significantly less time might be requir...
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), publish th...
I read the following from [Understanding Public Key Cryptography][1] on Microsoft TechNet: > Using a private key to establish identity shows that the full > encryption and decryption operation was accomplished successfully. > Showing a full operation means that plaintext would have to be > encrypted to ciphertext...
This text tries to explain how digital signatures work, but **it actually is a bit misguiding.** It explains digital signatures based on public-key encryption schemes, but this is only valid for schemes like RSA. And even here, you don't simply encrypt some message with your private key to sign it, but you apply the...
Every definition of pseudorandom generator that I've seen <br> says it takes n-bit strings and gives poly(n)-bit strings. <br><br> Is there a proof that if there is such a pseudorandom generator, <br> then there is a pseudorandom generator that takes n-bit seeds and repeatedly outputs bits on request? <br><br><b...
endless PRNG from PRNG with specific stretch?
After reading the paper [How to Break XML Encryption][1] (thanks to Krzysztof for the link), here are my two cents. This attack relies on the fact that a CBC-ciphertext C = (IV, C1, ... Cd) can be decomposed into pairs of (IV, C1), (C1, C2), (C2, C3), ... (C(d-1), Cd), each of which is also a valid CBC ciphertext fo...
The [RUB in Germany reports that XML encryption is broken.][1] This is essentially [the W3C standard][2] for [protecting XML documents][3] from prying eyes. Does this mean that an attacker can only see a single message, or that they can actually infer the encryption key for all messages? Is this a new vulnerabil...
Is the CBC weakness in XML Encryption a new discovery? Are other applications vulnerable?
Every definition of pseudorandom generator that I've seen says it takes n-bit strings and gives poly(n)-bit strings. Is there a proof that if there is such a pseudorandom generator? Is there is a pseudorandom generator that takes n-bit seeds and repeatedly outputs bits on request? Things I would be curious about ...
Endless PRNG from PRNG with specific stretch?
EDIT: Ilmari Karonen's answer below well not exactly what I want, gives a very good idea of what I am trying to accomplish. Are there any known secret sharing schemes that allow new parties to be read in on a portion secret, preferably without all parties having to be online at the same time? I don't want to have ...
Just to establish notation with respect to the RSA protocol, let $n = pq$ be the product of two large primes and let $e$ and $d$ be the public and private exponents, respectively ($e$ is the inverse of $d \bmod \varphi(n)$). Given a plaintext message $m$, we obtain the ciphertext $c = m^e \bmod n$; we subsequently dec...
I want to create a system to encrypt a document and store it with a 3rd party, but not have the 3rd party be able to decrypt it until some unspecified later date. It seems like the solution would be to split the key into two parts, given to two different trusted 3rd parties. Then when the date arrives those 3rd parties...
How to require two keyholders to decrypt a document?
I think I once faced the recommendation, that the initialization vector should always be random and never be used twice with the same key. How serious is this weakness? Also, is AES less effected than DES?
What are the details of the DES weakness of reusing the same IV in CBC mode with the same key?
NIST removed "The Lempel-Ziv Compression" test from the [Statistical Test Suite][2] in revision 2008 and above and has not incorporated it since – see revision [2010][1]. Why was it removed? Does it no longer provide sufficient testing of a PRNG or was it simply superseded by better tests? [1]: http://csrc.nist...
I'm trying to choose a group that is hard under the Chosen-Target Computational Diffie-Hellman assumption, according to the definition in [this paper](http://citeseer.ist.psu.edu/viewdoc/download;jsessionid=A1203E5E445CF0377E4413AEE0C98034?doi=10.1.1.122.6366&rep=rep1&type=pdf), in order to implement the oblivious tran...
The usual technique for having a group of prime size $q$ is to work modulo a prime $p$ such that $q$ divides $p-1$. The target group is then the subgroup of $q$-th roots of $1$ in $\mathbb{Z}_p$. To build such a group, first choose $q$, then selects random values $r$ until you find one such that $p = qr+1$ is prime. Th...
I'm trying to choose a group that is hard under the Chosen-Target Computational Diffie-Hellman assumption, according to the definition in [this paper](http://citeseer.ist.psu.edu/viewdoc/download;jsessionid=A1203E5E445CF0377E4413AEE0C98034?doi=10.1.1.122.6366&rep=rep1&type=pdf), in order to implement the oblivious tran...
Is there a group of prime order which could fit the CT-Computational Diffie-Hellman assumption?
A [recent paper][2] showed that the [McEliece cryptosystem][1] is not, unlike RSA and other cryptosystems, weakened as drastically by quantum computing because strong Fourier sampling cannot solve the hidden subgroup problem. However, in 2008, [new parameters][3] were proposed after the old ones were found to be vul...
Every definition of pseudorandom generator that I've seen says it takes n-bit strings and gives poly(n)-bit strings. Is there a proof that if there is such a pseudorandom generator then there is a pseudorandom generator that takes n-bit seeds and repeatedly outputs bits on request? Things I would be curious about...
I understand the use of pseudo-random number generators. I am not getting mixed up between these and "real" random number generators. However, I don't understand for what a real random number generator is used. If it is not deterministic, how can it be used in an algorithm?
I'm putting together a password policy for my company. I very much want to avoid requiring complex passwords, and would much rather require length. The maximum length I can enforce is 14 characters. I can calculate that 14 random lower case characters is stronger than 8 characters using anything on the keyboard. Ho...
I've got a feeling that I'm going to write this a lot on here: define "sufficient". The question you must answer is "what do you want to protect and how much is it worth to you"? In general, a plain XOR cypher with a key shorter than the *total* plaintext encrypted is pretty weak, and methods for decrypting are more ...
I'm putting together a password policy for my company. I very much want to avoid requiring complex passwords, and would much rather require length. The maximum length I can enforce is 14 characters. I can calculate that 14 random lower case characters is stronger than 8 characters using anything on the keyboard. ...
How can rainbow tables be used for a dictionary attack?
Finding a decent explanation of rainbow tables was something I struggled with, so firstly I'll cover what they are. I will get to your question in the end. My sources for this are [this guide][1] and the [wikipedia article][2]. **Why can't I just use a big bucket of hashes?** Firstly the naive way to build a reve...
Finding a decent explanation of rainbow tables was something I struggled with, so firstly I'll cover what they are. I will get to your question in the end. My sources for this are [this guide][1] and the [wikipedia article][2]. **Why can't I just use a big bucket of hashes?** Firstly the naive way to build a reve...
Finding a decent explanation of rainbow tables was something I struggled with, so firstly I'll cover what they are. I will get to your question in the end. My sources for this are [this guide][1] and the [wikipedia article][2]. **Why can't I just use a big bucket of hashes?** Firstly the naive way to build a reve...
DATA ENCRYPTION ALGORITHM is designed to encipher and decipher blocks of data consisting of 64 bits under control of a 56-bit key. if my data is more than 64 bits,(suppose 66 or 67 bits) will it take remaining bits as '0's (zero's)..?? how would it encrypt?
A "practical attack against XML's cipher block chaining (CBC) mode" has been demonstrated: http://www.informationweek.com/news/security/vulnerabilities/231901532 My question is this: Does this affect SSL/TLS? Thanks in advance. Related: http://crypto.stackexchange.com/questions/1042/is-the-cbc-weakness-in...
Does the XML Encryption flaw affect SSL/TLS?
The **Data Encryption Algorithm** is designed to encipher and decipher blocks of data consisting of 64 bits under control of a 56-bit key. If my data is more than 64 bits, (suppose 66 or 67 bits), will it take remaining bits as `0`s (zeros)? How would it encrypt?
How can I encrypt more than 64 bit with the Data Encryption Standard?
No; the problem with XML is that it doesn't include a Message Authentication Code (MAC), or anything else to validate the ciphertext; the only validation that XML does is checking if the CBC padding is sane. The attack uses that as an Oracle to decrypt data; the attacker generates an encrypted region with the last two...
A "practical attack against XML's cipher block chaining (CBC) mode" has been demonstrated: [XML Encryption Flaw Leaves Web Services Vulnerable][1]. Does this weakness of CBC-mode which is used here also affect SSL/TLS? Related: http://crypto.stackexchange.com/questions/1042/is-the-cbc-weakness-in-xml-encryption...
No; the problem with XML is that it doesn't include a Message Authentication Code (MAC), or anything else to validate the ciphertext; the only validation that XML does is checking if the CBC padding is sane. The attack uses that as an Oracle to decrypt data; the attacker generates an encrypted region with the last two...
No; the problem with XML is that it doesn't include a Message Authentication Code (MAC), or anything else to validate the ciphertext; the only validation that XML does is checking if the CBC padding is sane. The attack uses that as an Oracle to decrypt data; the attacker generates an encrypted region with the last two...
If H(m) is a secure hash function, can't we implement a MAC using H(k||m)? However, it seems the more widely used MACs, such as NMAC and HMAC use a much more complicated scheme. Why is this concatenation scheme insecure?
If H(m) is a secure hash function, can't we implement a MAC using H(k||m)? However, it seems the more widely used MACs, such as NMAC and [HMAC][1] (both originally defined in [Keying hash functions for message authentication][2]) use a much more complicated scheme. Why is this concatenation scheme insecure? [...
Why is H(k||x) not a secure MAC construction?
A fixed length CBC-MAC uses the all-zero key as the initialization vector. Suppose that we used a randomized IV instead, and sent the IV along with the tag. So if the message m will be m = b1 || b2 || b3 || ... || bl And the MAC will be (IV, t) where t is defined as normal (http://en.wikipedia.org/wiki/CBC-MAC) ...
A fixed length [CBC-MAC][1] uses an all-zero block as the initialization vector. Suppose that we used a randomized IV instead, and sent the IV along with the tag. So if the message $m$ will be $m = b_1 || b_2 || b_3 || ... || b_l$ And the MAC will be $(IV, t)$ where $t$ is the authentication tag defined as norma...
Why is it insecure to use a randomized IV for CBC-MAC instead of an all-zero IV?
I am trying to understand how a CBC attack in SSL/TLS works? I have been looking around online but all examples and explanations are very hard to understand and follow. Can you give a simple explanation for how such attacks happen?
How does a Cipher Block Chaining (CBC) attack work?
A fixed length [CBC-MAC][1] uses an all-zero block as the initialization vector. Suppose that we used a randomized IV instead, and sent the IV along with the tag. So if the message $m$ will be $m = b_1 || b_2 || b_3 || ... || b_l$, the MAC will be $(IV, t)$ where $t$ is the authentication tag defined as normal. ...
I am trying to understand how a CBC attack in SSL/TLS works. I have been looking around online but all examples and explanations are very hard to understand and follow. Can you give a simple explanation for how such attacks happen?
How does a Cipher Block Chaining (CBC) attack work against SSL?
Can someone tell me which mode out of **ECB** and **CBC** is better, and how to decide which mode to use? Are there any other modes which are better?
Should I use ECB or CBC encryption mode for my block cipher?
Assuming some large block of text is encrypted with an enigma machine and I only know a small subset of letters before and after encryption, how do I go about figuring out the enigma settings from this point?
How to deduce enigma settings given a partial plaintext?
Why would you expect to find a collision in a hash function after approximately root n hashes?
Why would you expect to find a collision in a hash function after approximately $\sqrt{n}$ hashes?
I read this article: http://en.wikipedia.org/wiki/Hard-core_predicate Still I don't understand what exactly is a hard-core predicate. Is it possible to put this in simple English terminology and perhaps with a simple example?
What is Hard-core predicate?
I read this article on Wikipedia: [Hard-core predicate][1]. Still I don't understand what exactly is a hard-core predicate. Is it possible to put this in simple English terminology, and perhaps with a simple example? [1]: http://en.wikipedia.org/wiki/Hard-core_predicate
What is a hard-core predicate?
If in a public wlan, WPA2-PSK is used, but the PSK is more or less publicly available, does this mean that an attacker with that PSK can easily decrypt wlan traffic from/to other clients of that wlan? Or does WPA2 negotiate sort of a per-client encryption, so that while an intruder can access the wlan, he's still not a...
If the PSK is known, is it possible to decrypt traffic from other clients in a WPA2 wlan network?
If in a public WLAN WPA2-PSK is used, but the PSK is more or less publicly available, does this mean that an attacker with that PSK can easily decrypt wlan traffic from/to other clients of that WLAN? Or does WPA2 negotiate sort of a per-client encryption key, so that while an intruder can access the WLAN, he's still...
I have created an application that will be able to read any file and encrypt it using AES Encryption. For efficiency, I am reading a block of data, encrypting it and so on. So for decrypting, I just have to read each block and decrypt using the same key to get the data back. This was what I had in mind. But it turns...
[bcrypt][1] is an intentionally slow hash algorithm. In my [last protocol idea][2], I wanted to use it to expand a password and then only transfer the bcrypt-hashed password. An efficient attack on this would be an ability to iterate all bcrypt hashes (or only these from passwords in a dictionary, maybe $2^{12}$ one...
Can one efficiently iterate valid bcrypt hash output values?
It's a quite a weak cipher, being better than a simple substitution cipher by only using digraphs instead of monographs. An interesting weakness is the fact that a digraph in the ciphertext (AB) and it's reverse (BA) will have corresponding plaintexts like UR and RU (and also ciphertext UR and RU will correspond to ...
What are the main weaknesses, if any, of a [Playfair cipher][1]? I know that they depend on none of the letters missing, but that is an easy fix if a letter gets dropped. Besides that, are there any other problems with it? [1]: http://en.wikipedia.org/wiki/Playfair_cipher
What are the main weaknesses, if any, of a Playfair cipher?
Do you know anything at all about the key? If not, then what you have is a "Known plaintext attack" - you know the cyphertext is `16 05 78 B0 0A C2 78 7F` and the plaintext is `FF FF FF FF FF FF FF FF`. DES has some weaknesses, but it isn't that weak. A cypher that can be cracked with a mere 8 bytes of plaintext/c...
Triple DES has 168 bit keys, but due to the meet-in-the-middle attack only provides 112 bits of security. Twofish supports 128, 192 and 256 bit keys. As neither cipher has published practical weaknesses, you are best off looking at key sizes to help you judge strength. Given that, if strength of cipher is your only met...
Triple DES has 168 bit keys, but due to the meet-in-the-middle attack only provides 112 bits of security. Blowfish supports up to 448-bit security. As neither cipher has published practical weaknesses, you are best off looking at key sizes to help you judge strength. Given that, if strength of cipher is your only metri...
Is Blowfish strong enough for VPN encryption?
So I'm messing around in the bouncycastle library with the RFC3394 AES Key Wrap engine and I'm trying to understand the benefit of it. The problem I'm running into is how to store keys securely on a device like a phone or even a laptop or desktop. I need to wrap the keys so that anyone snooping around in memory can't j...
How does RFC3394 secure my cryptographic keys?
So I'm messing around in the BouncyCastle library with the RFC 3394 AES Key Wrap engine and I'm trying to understand the benefit of it. The problem I'm running into is how to store keys securely on a device like a phone or even a laptop or desktop. I need to wrap the keys so that anyone snooping around in memory can...
How does a key wrapping like RFC 3394 secure my cryptographic keys?
Thomas mentioned some "theoretical weaknesses" that can happen with $2^{32}$ blocks of data with CBC mode and an 8 byte block cipher; I will explore more about what that weakness is, and its practical relevance. In CBC mode, we effectively send randomized data through the block cipher. However, there is a chance th...
[Wikipedia][1] says: > **Key Wrap** constructions are a class of symmetric encryption algorithms designed to > encapsulate (encrypt) cryptographic key material. We are using these algorithms to encrypt (and authenticate) a key, using a symmetric algorithm (and symmetric key, named *key encryption key*). Some ...
Why do we need special key-wrap algorithms?
In page 9 (16 in the PDF) of [Final report][1] of [European project IST-1999-12324(NESSIE)][2] it is mentioned that: > The NESSIE project is also developing a new generic tool to analyze block ciphers with differential [78] and linear cryptanalysis [422]. **This tool is based on a general description language for ...
Is there a secret sharing scheme where the knowledge of just one share is sufficient to find the secret, in other words a (one-out-of-n) sharing scheme ? Plz I need to know if it is possible to make such operation with secter sharing
In usual (t, n) secret sharing schemes, a secret "S" is split into n parts so that any t out of n parts reconstruct the original secret. So, suppose that there is a group of "n" participants each one has a secret xi (xi may be its private key). My question is, is it possible to create a secret "S" using the prexisting ...
Threshold Secret sharing - How to create a shared secret from pre existing secret parts?
In usual $(t, n)$ secret sharing schemes, a secret $S$ is split into $n$ parts so that any $t$ out of $n$ parts reconstruct the original secret. So, suppose that there is a group of $n$ participants each one has a secret $x_i$ ($x_i$ may be its private key). My question is, is it possible to create a secret $S$ using t...
If we define Oblivious Transfer as following: Alice inputs $(x_0,x_1) \in F^2$, where $F$ is a field, and Bob inputs $b\in\{0,1\}$, then Alice gets a dummy output(for which she knows nothing about b), and Bob gets $x_b$. Now if we use a Random functionality R, which requires no input but output random bits $(z_0,z_1)\...
For a project using RC4, the output is to be mapped to values of 0 to 35. Thus, only 36 unique output values representing the letters A to Z and 0 to 9. To avoid bias, the RC4 byte output (with a range of 0 to 255) is discarded if the value is greater than 251. The output is then mod 36, which then maps the output...