instruction
stringlengths
15
30k
Of course it is technically possible to crack AES. The method for doing this is to guess the correct key. Assuming you know something about the plaintext, you can easily verify that the key you guessed resulted in the correct decryption. *The probability of breaking AES using this method?* AES has 128, 192 and 256 b...
I know that inventing one's one crypto always sucks, but the problem is that hand ciphers are usually 1. very insecure 2. very slow. This is an attempt to make a relatively secure, keyable, and modular multi-round cipher by hand. In each round of encryption the following two steps are done: 1. The text is permute...
Is this hand cipher any more secure than the Vigenère cipher?
I've come across an implementation of DH in Java that uses the `Random` class to generate the secret integer value $a$, as shown in in [Wikipedia's description][1] of the algorithm. As such, the seed of the RNG is only 32 bits and the output may be predictable. By observing DH exchanges only, would it be possible to...
Is it feasible to break Diffie-Hellman key exchange when the implementation uses a poor-quality PRNG?
We have an application that requires cleartext passwords for user authentication because of the authentication mechanism in use (RADIUS/CHAP), which unfortunately we cannot change. Since we don't want to store cleartext passwords, an idea is to use asymmetric encryption to secure them as good as possible. After creati...
Assymetric password encryption - Viable? Which algorithm?
This seems OK assuming you can trust the authentication servers to leak neither the private key nor the deciphered passwords; and, if you use RSA, assuming you use a standard encryption padding with randomization, e.g. one of the two RSAES schemes in [PKCS#1][1]. Elgamal indeed gives you shorter cryptograms, which m...
The complexity of the number field sieve can be obtained from the expected size of the coefficients of the polynomial $f(x) = x^d + c_{d-1} x^{d-1} + \ldots + c_0$: if $c_i \le N^{\epsilon/d}$, then the expected runtime is $$ \exp\left(\left(\left(\frac{32(1 + \epsilon)}{9}\right)^{1/3} + o(1)\right) (\log N )^{1/3...
This seems OK assuming you can trust the authentication servers to leak neither the private key nor the deciphered passwords; and, if you use RSA, assuming you use a standard encryption padding with randomization, e.g. one of the two RSAES schemes in [PKCS#1][1]. Elgamal indeed gives you shorter cryptograms, which m...
some story first: Alice and Bob both have public/private key pairs. Now Bob wants Alice to sign his public key id. Alice agrees but only when Bob signs the public key id of her. Is this something that can be achieved? at the end, the signatures should only be valid or extractable if Alice and Bob did both made their...
I am doing a project which requires the encryption to be done using AES. Is it really possible (technically) to crack AES? If yes, please tell me: * What is the probability of breaking AES? * How does the round number influence this probability? Do more rounds really help in decreasing this probability? * Wha...
What is the probability of breaking the AES algorithm?
some story first: Alice and Bob both have public/private key pairs. Now Bob wants Alice to sign his public key id. Alice agrees but only when Bob signs the public key id of her. Is this something that can be achieved? at the end, the signatures should only be valid or extractable if Alice and Bob did both made their...
Aumasson, Bernstein and Bosslet did an excellent job demonstrating fatal weaknesses in MurmurHash and CityHash, but what about [SpookyHash](http://burtleburtle.net/bob/hash/spooky.html)? My first uneducated guess is that it would be much harder to create collisions, but not impossible. My second uneducated guess ...
Is SpookyHash vulnerable to HashDoS?
some story first: Alice and Bob both have public/private key pairs. Now Bob wants Alice to sign his public key id. Alice agrees but only when Bob signs the public key id of her. Is this something that can be achieved? at the end, the signatures should only be valid or extractable if Alice and Bob did both made their...
I am sorry, but I need to introduce some concepts which are not directly related to cryptography to make myself clear, I hope I won't stun you with this ... (I'd rather explain it here than redirect the reader to an even more stunning external link ;) ) ## UBI Properties ## I am working on Flash memory devices. ...
How to design a practical and secure MAC scheme?
I'm reading through a DH implementation, and I think I found a potential hole. - Public $p$ and $g$ values are properly selected. - A candidate secret value $\bar a$ is pseudo-randomly selected such that $0 \leq \bar a < 2^{|p|}$, where $|p|$ is the number of bits required to store $p$. - If $\bar a \geq p$, di...
Potential vulnerability in DH key selection - am I understanding this right?
We are using the encryption built into Solaris 11 ZFS, which offers the choice between CCM (CBC counter mode) and GCM (Galois counter mode). What are the pros and cons of choosing each of these cipher modes?
In ASN.1, the X and Y values for a 256-bit elliptic curve key are stored as a single 66-byte ASN.1 BITSTRING. Are the values just the first and second half of this bitstring?
How do I unpack the x and y values from the BITSTRING at the end of a DER ECDSA private key?
I am sorry, but I need to introduce some concepts which are not directly related to cryptography to make myself clear, I hope I won't stun you with this ... (I'd rather explain it here than redirect the reader to an even more stunning external link ;) ) ## UBI Properties ## I am working on Flash memory devices. ...
Suppose I have two users who are issued two different UProve IDs. The Issuer has guaranteed that one UProve token bearer will never have more than one UProve token ID. * How can I use UProve to guarantee that two users are "different" without disclosing their actual private ID? Here is a scenario: An online vot...
How can two UProve token holders prove to a 3rd party that they aren't the same user?
in one-time pads we always say do not use same key twice to encrypt messages like ASCII words. but if we use a random key to XOR a random binary message then reusing same key for XORing new random messages will compromise our key ? or attacking reused keys for random messages is infeasible ?
Looking at the U-Prove Technology Overview V1.1 http://research.microsoft.com/apps/pubs/default.aspx?id=166980. Shows that this can be done. The `issuer` knows who the individual is but can't correlate that with `verifier` or `prover` use. Upon setup the `issuer` can have extra attributes available that upon request...
In one-time pads we always say do not use same key twice to encrypt ASCII messages, but if we use a random key to XOR a random binary message then reusing same key for XORing new random messages will compromise our key ? or attacking reused keys for random messages is infeasible ?
There are many ways to authenticate the contents of the disk. The way you have described is reasonable, if you have a way to store the global sequence number in an authentic way (so it cannot be tampered with). Another general approach is to look at the data structure that is maintained by the UBI to map from logic...
I know that other bit sizes are possible, e.g. this HTTPS server seems to have a 9000 bit key https://www.ssllabs.com/ssltest/analyze.html?d=qqq.gg, but it's very rare that one sees a key not of size 1024, 2048, 4096, etc. bits in common usage - what is the reason for this? Is it just customary, or is there a cryptogra...
Why are RSA key sizes almost always a power of two?
This sounds like a fair exchange protocol where what is exchanged is a digital signature. Per this [paper][1], these are impossible without trusted third parties. With a trusted third party, they are possible. Indeed people have proposed [schemes][2] that do what you describe again relying on a third party in the...
In predicate encryption or attribute based encryption, the setup function is mentioned with the setup(1^n) or setup(1^l). What is it mean? I am not clear. Is it multiples of one's or representing something else.
In RSA, the bit size $n$ of the public modulus $N$ is often of the form $n=c\cdot2^k$ with $c$ a small odd integer. $c=1$ ($n=512$, $1024$, $2048$, $4096$.. bit) is most common, but $c=3$ ($n=768$, $1536$, $3072$.. bit) and $c=5$ ($n=1280$..) are common. One reason for this is simply to limit the number of possibilitie...
In RSA, the bit size $n$ of the public modulus $N$ is often of the form $n=c\cdot2^k$ with $c$ a small odd integer. $c=1$ ($n=512$, $1024$, $2048$, $4096$.. bit) is most common, but $c=3$ ($n=768$, $1536$, $3072$.. bit) and $c=5$ ($n=1280$..) are common. One reason for this is simply to limit the number of possibilitie...
In RSA, the bit size $n$ of the public modulus $N$ is often of the form $n=c\cdot2^k$ with $c$ a small odd integer. $c=1$ ($n=512$, $1024$, $2048$, $4096$.. bit) is most common, but $c=3$ ($n=768$, $1536$, $3072$.. bit) and $c=5$ ($n=1280$..) are common. One reason for this is simply to limit the number of possibilitie...
In one-time pads we always say do not use same key twice to encrypt `ASCII` messages, but if we use a random key to `XOR` a random binary message and then reusing the same key for `XOR`ing new random messages will compromise our key ? Or is attacking reused keys for random messages infeasible?
In RSA, the bit size $n$ of the public modulus $N$ is often of the form $n=c\cdot2^k$ with $c$ a small odd integer. $c=1$ ($n=512$, $1024$, $2048$, $4096$.. bit) is most common, but $c=3$ ($n=768$, $1536$, $3072$.. bit) and $c=5$ ($n=1280$..) are common. One reason for this is simply to limit the number of possibilitie...
In ASN.1, the X and Y values for a 256-bit elliptic curve key are stored as a single 66-byte ASN.1 BITSTRING. Are the values just the first and second half of this bitstring? To be clear, the private key is an OCTET STRING at the beginning of the DER private key and I know what to do with it; the public key is a BIT...
I'm curious about exploring uses for a distributing a single RSA private key with a passphrase instead of trying to secure the private key and distribute the public key. With the private key (and passphrase) the public key could be created as needed. What is the work effort to break the passphrase on an 1024 or 2048...
It is reasonably safe to leave a SSH private key with a 30+ character passphrase public?
I'm curious about exploring uses for a distributing a single RSA private key with a passphrase instead of trying to secure the private key and distribute the public key. With the private key (and passphrase) the public key could be created as needed. What is the work effort to [break the passphrase](http://leidecker...
I'm sure it can, because SRP (secure remote protocol) can be implemented everywhere where Diffie-Hellman works, but I need a proof to put this aspect into Wikipedia. --- Edit: ok, can it be partially moved to elliptic curves?
[Aumasson, Bernstein and Bosslet](http://media.ccc.de/browse/congress/2012/29c3-5152-en-hashflooding_dos_reloaded_h264.html) did an excellent job demonstrating fatal weaknesses in [MurmurHash](https://code.google.com/p/smhasher/wiki/MurmurHash3) and [CityHash](https://code.google.com/p/cityhash/), but what about [Spook...
If I have the following: E1 = RC4(M1, K); E2 = RC4(M2, K); If two different messages M1 and M2 are encrypted with the same key, K, can the key be recovered by doing: K = E1 XOR E2 I tried XORing the two streams and could not get the key. Does RC4 not work this way?
Can two rc4 encoded messages be XORed and decrypted if encrypted with the same key?
will HMAC survive Grover algorithm ? if not then which MAC scheme provide post-quantum security ?
Which MAC scheme is quantum resistant?
I'm curious about exploring uses for a distributing a single RSA private key with a passphrase instead of trying to secure the private key and distribute the public key. With the private key (and passphrase) the public key could be created as needed. What is the work effort to [break the passphrase](http://leidecker...
In a [paper about predicate encryption or attribute based encryption][1], the setup function is mentioned with the $setup(1^n)$ or $setup(1^l)$. I want to know what is meant here. Is it multiples of ones or representing something else? Also, why is this used here? [1]: http://www.cs.umd.edu/~jkatz/papers/ec...
What does the expression $1^n$ mean as a function argument?
Suppose I have two users who are issued two different [UProve][1] IDs. The Issuer has guaranteed that one UProve token bearer will never have more than one UProve token ID. * How can I use UProve to guarantee that two users are "different" without disclosing their actual private ID? Here is a scenario: An onlin...
The [U-Prove Technology Overview V1.1](http://research.microsoft.com/apps/pubs/default.aspx?id=166980) shows that this can be done. The `issuer` knows who the individual is but can't correlate that with `verifier` or `prover` use. Upon setup the `issuer` can have extra attributes available that upon request of autho...
In ASN.1, the X and Y values for a 256-bit elliptic curve key are stored as a single 66-byte ASN.1 BITSTRING. Are the values just the first and second half of this bitstring? The private key is an OCTET STRING at the beginning of the DER private key and I know what to do with it; the public key is a BITSTRING for so...
How do I unpack the x and y values from the BITSTRING in a DER ECDSA public key?
I'm sure it can, because SRP (secure remote protocol) can be implemented everywhere where Diffie-Hellman works, but I need a proof to put this aspect into Wikipedia. --- Edit: ok, can it be at least **partially** moved to elliptic curves?
I'm writing a simple **password manager** program that will encrypt/decrypt a single file (it's size will most likely stay under a few K). This is my initial file format design: 1. hmac plaintext 2. hmacSalt plaintext 3. keySalt plaintext ...
I'm writing a simple **password manager** program that will encrypt/decrypt a single file (it's size will most likely stay under a few K). This is my initial file format design: 1. hmac plaintext 2. hmacSalt plaintext 3. keySalt plaintext ...
I've been researching how to implement a post-quantum SSL-like connection authentication, especially correct identification&authentization of the server/client. Because good post-quantum digital signature algorithms are generally unavailable (McEliece-based CFS is slow, NTRUsign is impractical, MQ schemes are generally...
I'm working on software where multiple components will communicate with each other using SSL. There would be one central component acting as a server, which would also require the clients to present a certificate. So there is mutual trust between the clients and server. The software will be deployed internally withi...
Client and server using same SSL certificate - any issues?
If all the components share the same certificate, then they share the same private key. This raises the two following points: - When a secret is shared by more than two people, can it still be considered really secret ? Secrecy dilutes fairly fast. If all components share the same secret value, then breakage of any...
How to make a message into a polynomial on NTRU encryption? for example how we can conver 'hello world' to polynomial...
How to make a message into a polynomial on NTRU encryption?
How to make a message into a polynomial on NTRU encryption? for example how we can conver 'hello world' to polynomial... i have read the converting operation on IEEE Std 1363.1- 2008, but i can't understand the process without example, can anyone show for the small example?
I am not sure if I missed some subtlety in the definition of Attribute Hiding found in [this paper on Predicate Encryption][1], but isn't it possible to construct a scheme for Predicate Encryption supporting disjunctions that is both a lot less convoluted, and still supports Attribute Hiding? (I realize that "convo...
From [Wikipedia][1]: > A trapdoor function is a function that is easy to compute in one > direction, yet believed to be difficult to compute in the opposite > direction (finding its inverse) without special information, called > the "trapdoor". What's the difference between this and encryption functions like A...
What's the difference between Trapdoor Functions and Encryption Functions?
When i was dealing with an assistant of my bank through mobile call, she asked me to insert my bank login code after a beep. I was wondering if this procedure is secure against a Man In the Middle attack. In this case, EVE would be listening to the call and get the sensitive data. In Literature i found that GSM...
Are you defended against a MITM attack? Certainly you are not well-protected. First, you have no assurance that the phone number you dialed was answered by a bank employee. The phone call could have been intercepted by an attacker, impersonating the bank. GSM encryption can also be disabled by an attacker, especiall...
> From my understanding of crypto functions, a password is typically used to create a xxx-bit secret key... Given that typically something like an 8 digit alpha numeric case sensitive password would supply 30 bits of entropy, my assumption is that in almost all cases the password would have significantly less entropy t...
> From my understanding of crypto functions, a password is typically used to create a xxx-bit secret key... Given that typically something like an 8 digit alpha numeric case sensitive password would supply 30 bits of entropy, my assumption is that in almost all cases the password would have significantly less entropy t...
I want to provide both confidentiality and integrity for data at rest (many large files stored on disk). I plan to encrypt the data using AES, which will cover the confidentiality requirement. So the issue is how to provide integrity: 1. Instead of AES, use AES-GCM-SHA256 (authenticated cipher). My understandi...
> From my understanding of crypto functions, a password is typically used to create a xxx-bit secret key... Given that typically something like an 8 digit alpha numeric case sensitive password would supply 30 bits of entropy, my assumption is that in almost all cases the password would have significantly less entropy t...
I want to provide both confidentiality and integrity for data at rest (many large files stored on disk). I plan to encrypt the data using AES, which will cover the confidentiality requirement. So the issue is how to provide integrity: 1. Instead of AES, use AES-GCM-SHA256 (authenticated cipher). My understandi...
According to [this answer][1], "SHA-256d" was proposed in one of the Ferguson/Schneier books like so: SHA-256d(x) = SHA-256(SHA-256(x)) Apparently, the motivation for this construction is to avoid length extension attacks. Incidentally, SHA-256d is the hash function forming the core of Bitcoin. Accordin...
"Weaknesses" in SHA-256d?
I need to make a Skein hash's, specifically, Skein-1024; however, I only have access currently to Skein-512. Is there any way to utilize a Skein-512 function to get the result of a Skein-1024 hash? What's the difference between the two?
What's the difference between "HashX-512" and "HashX-1024"?
Internally, Skein-1024 uses the Threefish-1024 compression function and is extended to 1024 bits of internal state whereas Skein-512 uses the Threefish-512 compression function. There are a few additional changes but they are very similar (just like SHA-256 and SHA-512 are, for instance). The tweak handling is, howe...
Internally, Skein-1024 uses the Threefish-1024 compression function and is extended to 1024 bits of internal state whereas Skein-512 uses the Threefish-512 compression function. There are a few additional changes but they are very similar (just like SHA-256 and SHA-512 are, for instance). The tweak handling is, howe...
I understand how Mega's encryption works. For a quick summary of all those in the future looking for an answer on this... here is how it works: Upon first signing up for an account you make a username and password. It also generates a symmetric key which is used to encrypt your files and a RSA key pair to share secr...
How can mega store my login details and still be secure?
Only the people who work at Mega can tell you definitively how their system is designed, anything else would be an educated guess. So here goes... > If my symmetric key is encrypted with my password, no matter how > secure my key is would it not still be as weak as the hashing function > they use to store my pass...
For homework, I'm asked to find the private key, x, in a digital signature scheme. In the particular instance, we are give p, q, g, g^x, 3 messages (m1, m2, m3), their hash values (H(m1), H(m2), H(m3)) and the three signatures ([r1, s1], [r2,s3], [r3,s3]). **What is insecure about this particular instance is that the e...
For homework, I'm asked to find the private key, $x$, in a DSA digital signature scheme. In the particular instance, we are given the parameters $p$, $q$ and $g$, the public key $g^x$, 3 messages $(m_1, m_2, m_3)$, their hash values $(H(m_1), H(m_2), H(m_3))$ and the three signatures $([r_1, s_1], [r_2,s_3], [r_3,s_3])...
Suppose that we are given DSA parameters $p$, $q$, $g$, a public key $y = g^x$, and two signatures $(r_1,s_1)$ and $(r_2,s_2)$. We are told that $(r_1,s_1)$ and $(r_2,s_2)$ were produced by related nonces $k_1 = k$ and $k_2 = k+1$, but we do not know the value of $k$, and we do not know the payloads. (In practical t...
If we assume that the support for an irreducible binary Goppa code $\gamma_1, ..., \gamma_n$ is publicly known, when is it possible to efficiently decode the code? I know it's possible if one knows the generator polynomial $g(x)$, and also, if one can obtain a parity check matrix $H$ of the form $XYZ$, where $ X = \...
I'm trying to prove something and if I can show that there is a simple way to calculate (g^a(mod p))^k if I know both (g^k(mod p)) and (g^a(mod p)), then (I think) it will help me prove it, but I'm not able to see an obvious way to use the two expressions to calculate the other. Is there a property in modular arithmeti...
Even if the messages are not known, if the messages are low-entropy, then this can be broken. The basic method of attack is to guess candidate values for the messages. For each guess at the messages $m_1,m_2$, we can hash them, compute $h_1,h_2$, solve the system of equations using Gaussian elimination, and this gi...
I don't know what Mega is doing. They haven't published a design document that describes how their system addresses these threats. That's irresponsible on their part, and it doesn't invite trust. Cryptographers have [already criticized Mega](http://www.forbes.com/sites/andygreenberg/2013/01/21/researchers-warn-megas...
I know that you can create a ciphertext c' using c and then find the corresponding m' for c' which you can use to find m for c. So, doesn't this mean that it is not semantically secure? But I also read that it *is* semantically secure when it meets the DHH assumption. Is there some terminology I'm misunderstanding beca...
How is ElGamal not secure under chosen ciphertext attack, but semantically secure in some cases?
I know that you can create a ciphertext c' using c and then find the corresponding m' for c' which you can use to find m for c. So, doesn't this mean that it is not semantically secure? But I also read that it *is* semantically secure when it meets the DDH assumption. Is there some terminology I'm misunderstanding beca...
I understand the needs that lead to the development of cryptography and I am quite familiar with the uses we make of the cryptographic tools. But, as a programmer, I am conditioned to see them as "black boxes" with specific properties. To me, SHA-X (with X being 1, 2 or 3) is some dark magic, even though I understan...
Suppose that we are given DSA parameters $p$, $q$, $g$, a public key $y = g^x$, and two signatures $(r_1,s_1)$ and $(r_2,s_2)$. We are told that $(r_1,s_1)$ and $(r_2,s_2)$ were produced by related nonces $k_1 = k$ and $k_2 = k+1$, but we do not know the value of $k$, and we do not know the messages. (In practical t...
Why constrain the message lengths in indistinguishability in the presence of an eavesdropper?
When can a decryption function detect that the ECC key I use for decryption is incorrect? Is it possible to do that during initialization, or does the complete message have to be decrypted to do that?