instruction
stringlengths
15
30k
Many of the beginner explanations use very simple examples: [like this](http://pajhome.org.uk/crypt/rsa/rsa.html) It is still hard to factorize a small number by hand, compared to other operations. There is definitely a size of prime numbers where hand computation is still feasible, but hand factorizing isn't. Woul...
The main difficulty in designing what I asked, is coming up with a permutation over a relatively small set, that is easy to compute in the forward direction, but convincingly much more difficult to invert. The least unsatisfactory I have so far is based on the discrete logarithm problem in $\mathbb Z_p$. If $p$ and $(p...
As Paŭlo Ebermann says, this is (apparently) a homophonic cipher. Ciphers that obscure single-letter-frequencies, such as homophonic ciphers, the [Alberti cipher][1], Vigenère cipher, the [Playfair][2] cipher, etc. are impossible to crack using single-letter frequency analysis, which is the only cryptanalysis techni...
I'm looking for a slow one-way pseudorandom permutation; or in other words a block cipher $E_K: P\in\{0,1\}^b\mapsto C\in\{0,1\}^b$ with moderate block size $b\approx 64$ bits, wide key $K$, indistinguishable from a random permutation for one not knowing $K$, and additional characteristics: - encryption $E_K$ is con...
The main difficulty in designing what I asked, is coming up with a permutation over a relatively small set, that is easy to compute in the forward direction, but convincingly much more difficult to invert. The least unsatisfactory I have so far is based on the discrete logarithm problem in $\mathbb Z_p$. If $p$ and $(p...
Is it possible to create a ZKP (or comparable [MAC scheme][1]) that can be typed by a human with relative ease? What would that crypto system look like? If I were to design a crypto system around what can be typed easily by a human, say [26 uppercase ASCII letters][2], or [16 mixed case letters][3] I believe that ...
Can a zero knowledge proof (or MAC) be generated from human-typable input?
> Edit: My goal is to create a voting scheme that doesn't require a lot of crypto infrastructure to be deployed. Smartcards, and tokens are impractical for these purposes. I envision a user typing a "code" into a web browser (which is imperfect) and submitting the inputs. The code is either static, or with minimal c...
I will address your question below, however I have a serious concern that I want to bring up first. I glanced at the $p$ used in ngx_ssl_dhparam, and it is not immediately obvious that it was chosen correctly. Unless you know that whoever generated that value knew what they were doing, you should select a different va...
I will address your question below, however I have a serious concern that I want to bring up first. I glanced at the $p$ used in ngx_ssl_dhparam, and it is not immediately obvious that it was chosen correctly. Unless you know that whoever generated that value knew what they were doing, you should select a different va...
This is probably not secure enough for a proof of work. I'll outline some attacks, of increasing sophistication/complexity and increasing effectiveness (decreasing runtime). ## Brute force ## The obvious attack is brute force: enumerate all $2^{32}$ possible inputs and check to find the first that produces the d...
> Edit: My goal is to create a voting scheme that doesn't require a lot of crypto infrastructure to be deployed on the client side. Smartcards, and tokens are impractical for these purposes. I envision a user typing a "code" into a web browser (which is imperfect) and submitting the inputs. The code is either static...
I'm looking for a slow one-way pseudorandom permutation; or in other words a block cipher $E_K: P\in\{0,1\}^b\mapsto C\in\{0,1\}^b$ with moderate block size $b\approx 64$ bits, wide key $K$, indistinguishable from a random permutation for one not knowing $K$, and additional characteristics: - encryption $E_K$ is con...
I'm looking for a slow one-way pseudorandom permutation; or in other words a block cipher $E_K: P\in\{0,1\}^b\mapsto C\in\{0,1\}^b$ with moderate block size $b\approx 64$ bits, wide key $K$, indistinguishable from a random permutation for one not knowing $K$, and additional characteristics: - encryption $E_K$ is con...
I will address your question below, however I have a serious concern that I want to bring up first. I glanced at the $p$ used in ngx_ssl_dhparam, and it is not immediately obvious that it was chosen correctly. Unless you know that whoever generated that value knew what they were doing, you should select a different va...
**Re: *"So why limit the export?"*** The laws you're talking about are generally part of the laws that control the export of weapons and of dual-use goods. Dual-use goods are things that can be used both for a military and for a civil purpose… cryptography is such a dual-use good. In fact, the classification as d...
I'm looking for a slow one-way pseudorandom permutation; or in other words a block cipher $E_K: P\in\{0,1\}^b\mapsto C\in\{0,1\}^b$ with moderate block size $b\approx 64$ bits, wide key $K$, indistinguishable from a random permutation for one not knowing $K$, and additional characteristics: - encryption $E_K$ is con...
The main difficulty in designing what I asked, is coming up with a permutation over a relatively small set, that is easy to compute in the forward direction, but convincingly much more difficult to invert. The least unsatisfactory I have so far is based on the discrete logarithm problem in $\mathbb Z_p$. If $p$ and $(p...
The main difficulty in designing what I asked, is coming up with a permutation over a relatively small set, that is easy to compute in the forward direction, but convincingly much more difficult to invert. The least unsatisfactory I have so far is based on the discrete logarithm problem in $\mathbb Z_p$. If $p$ and $(p...
The main difficulty in designing what I asked, is coming up with a permutation over a relatively small set, that is easy to compute in the forward direction, but convincingly much more difficult to invert. The least unsatisfactory I have so far is based on the discrete logarithm problem in $\mathbb Z_p$. If $p$ and $(p...
How should I manage Diffie-Hellman parameters on a Web Server?
I am considering the FNV1a 32 bit hash as part of a simple software security and authentication system. I am aware that FNV1a is NOT ideal but it may suit my needs. I am aware that FNV1a has rather poor collision behavior, but I would like to know if it may be implemented in such a way as to minimize problems. Assum...
Would this prevent FNV1a 32 bit hash collision?
I am looking into implementing ECDSA signature and ECDH key agreement in a Xilinx FPGA. All the examples I have found of VHDL implementations skip over how to construct the low level ECC primitives (e.g. point multiplication, MOD P in prime fields, and specially Inversion. Can anyone point me to documentation or a simp...
I am looking into implementing ECDSA signature and ECDH key agreement in a Xilinx FPGA. All the examples I have found of VHDL implementations skip over how to construct the low level ECC primitives (e.g. point multiplication, MOD P in prime fields, and specially Inversion. Can anyone point me to documentation o...
Where can I find examples of ECC implemented in VHDL?
Can you provide an example in relation to Hidden Field Equations Multivariate?
I will address your question below, however I have a serious concern that I want to bring up first. I glanced at the $p$ used in ngx_ssl_dhparam, and it is not immediately obvious that it was chosen correctly. Unless you know that whoever generated that value knew what they were doing, you should select a different va...
I'm currently reading up on the [components of PGP](http://www.iusmentis.com/technology/encryption/pgp/pgpattackfaq/prng/). Wondering what exactly the PRNG is used for. PGP uses ANSI X9.17 and entropy from a users keystrokes to generate a temporary key. So is this temporary key used for the public key encrypti...
How is a PRNG used in the PGP?
I'm currently reading up on the [components of PGP](http://www.iusmentis.com/technology/encryption/pgp/pgpattackfaq/prng/) and I am wondering what exactly the PRNG is used for. PGP uses ANSI X9.17 and entropy from a users keystrokes to generate a temporary key. So, is this temporary key used for the public key encry...
Is it possible to modify SSL handshakes to enable PFS while still using RSA during the handshake?
I know we could possibly be using DH key exchange, that would enable PFS. However, what if we make modifications on our SSL 3.0 handshake such that the only cipher we use is RSA for the achieving PFS? Is it possible to modify SSL handshakes to enable PFS while still using RSA during the handshake?
I know we could possibly be using DH key exchange, that would enable PFS. However, what if we make modifications on our SSL 3.0 handshake such that the only cipher we use is RSA for the achieving PFS? Is it possible to modify SSL handshakes to enable PFS while still using RSA during the handshake?
To my understanding, if a server cert+key (RSA) is compromised, than the SSL/TLS network traffic can be decrypted. What about a client cert+key (RSA)? ie, can somebody with the client cert+key decrypt (or in general mess with) the traffic of another user? (yes, I know they can impersonate but that is not my questi...
I'm writing my own cryptosystem that uses One Time Pad and Diffie-Hellman to generate keys for the OTP. I am using Rails on the server side and Javascript for the client side. *Please don't tell me this is insecure and I shouldn't do it. I'm doing this purely for educational purposes and in no way will this be dep...
Diffie-Hellman: Does the size of the prime modulus depend on the potential size of the secret?
To my understanding, if a server “cert+key” (RSA) is compromised, than the SSL/TLS network traffic can be decrypted. What about a client “cert+key” (RSA)? Could someone reuse client certificates? For example: can somebody with the client “cert+key” decrypt (or in otherwise mess with) the traffic of another user...
Could someone reuse client certificates?
Well, for one thing, you are not using a "One Time Pad". A "One Time Pad" means, by definition, that someone generates a pad of numbers using true randomness (and not algorithmicly), and that no potential adversary has any information on what that pad may contain. Then, that pad is given to both the sender and the re...
Well, for one thing, you are not using a "One Time Pad". A "One Time Pad" means, by definition, that someone generates a pad of numbers using true randomness (and not algorithmicly), and that no potential adversary has any information on what that pad may contain. Then, that pad is given to both the sender and the re...
I'm looking for a slow one-way pseudorandom permutation; or in other words a block cipher $E_K: P\in\{0,1\}^b\mapsto C\in\{0,1\}^b$ with moderate block size $b\approx 64$ bits, wide key $K$, indistinguishable from a random permutation for one not knowing $K$, and additional characteristics: - encryption $E_K$ is con...
When we transmit information across an insecure channel, we wish for our data to be secure. So, what does this mean? To discuss these we'll use the standard cryptographic situation of Alice and Bob. Alice wants to send something (the *plaintext*) across an insecure channel (what this means will be discussed) to Bo...
**I want to store data encrypted within an Android application.** Keeping an encryption key safe outside the app is not an option so I looked into password derived key algorithms. I found a nice example from Android on [this blogpost][1]. Let me quote the significant code in here. The question follows. publi...
I don't see where the method implies a PIN is good practice? This is just a wrapper function for a key derivation function, and the variable names chosen to say "This is the one that contains the not-very-random-data". Obviously more entropy the `passphraseOrPin` variable has the better, but it might just be that fo...
**I want to store data encrypted within an Android application.** Keeping an encryption key safe outside the app is not an option so I looked into password derived key algorithms. I found a nice example from Android on [this blogpost][1]. Let me quote the significant code in here. The question follows. publi...
**I want to store data encrypted within an Android application.** Keeping an encryption key safe outside the app is not an option so I looked into password derived key algorithms. I found a nice example from Android on [this blogpost][1]. Let me quote the significant code in here. The question follows. publi...
In a commitment scheme, are there any differences on using a symmetric cipher versus using a hash? If at the "opening" i have to reveal 'r' (i.e. a random number concatenated with the messaged at the time of hashing) and 'm' (i.e. The Message), why not reveal the key used for encryption for everybody to decipher t...
One thing I was surprised to learn about AES is that random padding can be added to the message to make it a multiple of block size. What I cannot wrap my head around is how this random padding can be removed from the message upon decryption reliably, given that if it is generated by a truly random process, the recipie...
For all $c_0\leftarrow m_0 \oplus k$ there exists a $k'$ such that $c_1 \leftarrow m_1 \oplus k'$, where $m_0 \neq m_1$ and $c_0 = c_1$. Assuming a truly random $k$, the first assignment is a one-time pad. If we were to repeat the process over all $m \in M$, we would create a Stirling set of the first kind. To ...
>What are the properties of random padding (and I realize there are different ways to do it but I'm looking for an illustrative example) that allow it to be reliably removed from the message? You can do random padding with AES, but you'd have to reserve say the very last byte to tell how many bytes of padding were a...
In a commitment scheme, are there any differences on using a symmetric cipher versus using a hash? If at the "opening", I have to reveal $r$ (a random number concatenated with the messaged at the time of hashing) and $m$ (the message), why not reveal the key used for encryption for everybody to decipher the messag...
What are the pros/cons of using symmetric crypto vs. hash in a commitment scheme?
I want to store data encrypted within an Android application. Keeping an encryption key safe outside the app is not an option so I looked into password derived key algorithms. I found a nice example from Android on the blog-post “[Android Developers — Using Cryptography to Store Credentials Safely ][1]”. Let me quo...
Encryption Key derivation from numeric PIN?
One thing I was surprised to learn about AES is that random padding can be added to the message to make it a multiple of block size. What I can not wrap my head around is how this random padding can reliably be removed from the message upon decryption, given that if it is generated by a truly random process, the recipi...
How is an AES Encrypted Message Decrypted with Random Padding?
Here is how I interpret your proposed scheme: - For Alice to commit to a value $M$, she selects a random $r$ and a random $k$. She then computes and publishes the value $C = Encrypt_k( r | M )$ - For Alice to reveal the commitment, she publishes the values $k$, $r$ and $M$. Bob verifies that $Encrypt_k( r | M )...
One of the problems of one-time Lamport signatures is that public keys are disposed after use, so you must generate many keys and store them in a Merkle tree. The root is the "real" public key and each signature is supplied with a Merkle branch from the root public-key to the one-time public key. I was thinking of u...
Can one use a Cryptographic Accumulator to efficiently store Lamport public keys without the need of a Merkle Tree?
When chosing the public exponent e, it is stressed that e must be coprime to φ(n), i.e. gcd(φ(n), e) = 1. I know that a common choice is to have e = 3 (which requires a good padding scheme) or e = 65537, which is slower but safer. I also know that for two primes p and q, it is true that φ(n) = (p - 1) (q - 1) ...
In RSA, why is it important choosing e so that it is coprime to φ(n)?
I'm working with documents encrypted in long term storage. When a client requests the document, the document should be delivered encrypted under a distinct key (distinct from the long term storage key). For efficiency, I want to avoid decrypting the document under its long term key and then re-encrypting under a cli...
Block Cipher Mode Amicable to Fast Key Change/Rotation Like XOR?
I'm looking for a slow one-way pseudo-random permutation; or in other words a block cipher $E_K: P\in\{0,1\}^b\mapsto C\in\{0,1\}^b$ with moderate block size $b\approx 64$ bits, wide key $K$, indistinguishable from a random permutation for one not knowing $K$, and additional characteristics: - encryption $E_K$ is co...
Slow one-way pseudo-random permutation?
I want to store data encrypted within an Android application. Keeping an encryption key safe outside the app is not an option so I looked into password derived key algorithms. I found a nice example from Android on the blog-post “[Android Developers — Using Cryptography to Store Credentials Safely ][1]”. Let me quo...
Yes. $\:$ If one uses a secure symmetric cipher properly, then the commitment scheme will be unconditionally binding, length-revealing, otherwise computationally hiding, and produce commitments whose length is grows linearly with the length of the message. $\:$ If one uses a collision-resistant <br> hash properly, th...
Yes. $\:$ If one uses a secure symmetric cipher properly, then the commitment scheme will be unconditionally binding, length-revealing, otherwise computationally hiding, and produce commitments whose length is grows linearly with the length of the message. $\:$ If one uses a collision-resistant <br> hash properly, th...
When choosing the public exponent e, it is stressed that $e$ must be coprime to $\phi(n)$, i.e. $\gcd(\phi(n), e) = 1$. I know that a common choice is to have $e = 3$ (which requires a good padding scheme) or $e=65537$, which is slower but safer. I also know that for two primes $p,q$, we have $\phi(pq) = (p - 1)...
I have been reading about differential and linear cryptanalysis. They were mainly introduced by Adi Shamir and Biham to show weakness of DES. However, many of articles state that they have been considered as a technique to evaluate all other block ciphers. My question is, are they beneficial for public key cryptography...
I am trying to understand the AES encryption algorithm. I know that we process 128 bits at a time for a 128 bit key in a 4x4 octet form, but am confused by the following: 1. How does the substitution subround work, as the size of the Rijndael's S-box is 16x16 Octets and size of the input is 4x4? 2. How does the ...
The main difficulty in designing what I asked, is coming up with a permutation over a relatively small set, that is easy to compute in the forward direction, but convincingly much more difficult to invert. The least unsatisfactory I have so far is based on the discrete logarithm problem in $\mathbb Z_p$. If $p$ and $(p...
Yes, you can have a key of any length of that range (as long as it is an integral number of bytes), but really, why? There is absolutely no reason to. * If the key is uniformly distributed, anything over 256 bits is total overkill and completely pointless. * If the key is not uniformly distributed (maybe it's a ...
Let $G$ be a group of order $n$ and let $e,d$ be integers such that $ed\equiv 1 \pmod{n}$. Then the exponentiation maps $x \mapsto x^e$ and $y \mapsto y^d$ are inverse maps on $G$. These maps give us the *Pohlig-Hellman exponentiation cipher*. The secret key is the two numbers $e$ and $d$. The group $G$ and its ord...
The main difficulty in designing what I asked, is coming up with a permutation over a relatively small set, that is easy to compute in the forward direction, but convincingly much more difficult to invert. The least unsatisfactory I have so far is based on the discrete logarithm problem in $\mathbb Z_p$. If $p$ and $(p...
The main difficulty in designing what I asked, is coming up with a permutation over a relatively small set, that is easy to compute in the forward direction, but convincingly much more difficult to invert. The least unsatisfactory I have so far is based on the discrete logarithm problem in $\mathbb Z_p$. If $p$ and $(p...
If a cipher implementation passes unit tests using test vectors from some **trusted** reference implementation, then can we say that the implementation is fully conforming to the specification, and must have been implemented correctly? Is it possible to backdoor a cipher (or hash function, I suppose) in such a way t...
Do test vectors ensure a cipher is free of backdoors?
If a cipher implementation passes unit tests using test vectors from some *trusted* source ([these][1] for RSA, for example), then can we say that it is fully conforming to the specification, and must have been implemented correctly? Is it possible to backdoor a cipher (or hash function, I suppose) in such a way tha...
If a cipher implementation passes unit tests using test vectors from some *trusted* source ([these][1] for AES, for example), then can we say that it is fully conforming to the specification, and must have been implemented correctly? Is it possible to backdoor a cipher (or hash function, I suppose) in such a way tha...
>can we say that it is fully conforming to the specification, and must have been implemented correctly? No. >Is it possible to backdoor a cipher (or hash function, I suppose) in such a way that it still appears to be correct and is compatible with different implementations of the same cipher? Certainly. Say...
>can we say that it is fully conforming to the specification, and must have been implemented correctly? No. >Is it possible to backdoor a cipher (or hash function, I suppose) in such a way that it still appears to be correct and is compatible with different implementations of the same cipher? Certainly. Say...
I'm looking for a slow one-way pseudo-random permutation; or in other words a block cipher $E_K: P\in\{0,1\}^b\mapsto C\in\{0,1\}^b$ with moderate block size $b\approx 64$ bits, wide key $K$, indistinguishable from a random permutation for one not knowing $K$, and additional characteristics: - encryption $E_K$ is co...
Is there any new understanding, property, or knowledge that came from the [Number Fields@home][1] distributed computing project and has advanced the study of cryptography? Is there something specific that may be gained from this project w.r.t. cryptography? [1]: http://numberfields.asu.edu/NumberFields/
Has HumberFields @ Home benefited cryptography in any meaningful way?
Has NumberFields @ Home benefited cryptography in any meaningful way?
Has NumberFields @ Home benefited cryptography in any meaningful way?
Is there any new understanding, property, or knowledge that has come from the [Number Fields @Home][1] distributed computing project? Has any outcome advanced the study of cryptography, or altered previous recommendations? If nothing in particular has come from the project as of yet, are there some outcomes a crypt...
Has the distributed project "Number Fields @ Home" project benefited cryptography in any meaningful way?
>can we say that it is fully conforming to the specification, and must have been implemented correctly? No. >Is it possible to backdoor a cipher (or hash function, I suppose) in such a way that it still appears to be correct and is compatible with different implementations of the same cipher? Certainly. Say...
What is the difference between PPE and SPPE?
Given a message and DES encrypted form of said message, is it possible to efficiently compute the key used to encrypt the data?
DES — Can I recover the key when I have both ciphertext and the plaintext?
Can somebody explain, in simple terms, the difference between Pseudo Random Permutation Ensemble and Super Pseudo Random Permutation Ensemble?
I'm reading patent application [US 20120278897 A1 — “System and method of sort-order preserving tokenization”][1]. Near the bottom they describe their token generation algorithm, which basically involves using the first few characters of a string as input to a modified order preserving Ziv-Lempel compression function [...
In Kerberos, if the Key Distribution Center is compromised then all the stored keys are exposed. In PKI, if a Certificate Authority is compromised then certificates may be forged. So, I guess we typically assume that the "trusted" third party will not be compromised so easily? Because either method you choose, there ...
Simple question. I have a source file and I have encrypted it with a certain public key. If I take this exact same source file, encrypt it with the exact same key a few hours later would the file hash of the two encrypted files be the same?
If you use a deterministic public key encryption scheme like [textbook RSA](http://en.wikipedia.org/wiki/RSA_%28algorithm%29#Operation), i.e., without randomized padding, then **yes**. If you use a *secure* public key encryption scheme such as [RSA OAEP](http://en.wikipedia.org/wiki/Optimal_asymmetric_encryption_pad...
If you use a deterministic public key encryption scheme like [textbook RSA](http://en.wikipedia.org/wiki/RSA_%28algorithm%29#Operation), i.e., without randomized padding, then **yes**. If you use a *secure* public key encryption scheme such as [RSA OAEP](http://en.wikipedia.org/wiki/Optimal_asymmetric_encryption_pad...