instruction
stringlengths
15
30k
Suppose party $A$ has two pieces of data, $X$ and $Y$, either of which may change separately, or they may change together. Given the following constraints: 1. $A$ has no memory - it knows its current $X$ and $Y$ but not the previous values, nor can it store anything else 2. There is only one-way communication, f...
Suppose party $A$ has two pieces of data, $X$ and $Y$, either of which may change separately, or they may change together. Given the following constraints: 1. $A$ has no memory - it knows its current $X$ and $Y$ but not the previous values, nor can it store anything else 2. There is only one-way communication, f...
Suppose party $A$ has two pieces of data, $X$ and $Y$, either of which may change separately, or they may change together. Given the following constraints: 1. $A$ knows its current $X$ and $Y$ but has no further knowledge about its previous or future values, nor can it store anything else 2. There is only one-wa...
Suppose party $A$ has two pieces of data, $X$ and $Y$, either of which may change separately, or they may change together. Given the following constraints: 1. $A$ knows its current $X$ and $Y$ but has no further knowledge about its previous or future values, nor can it store anything else 2. There is only one-wa...
Suppose party $A$ has two pieces of data, $X$ and $Y$, either of which may change separately, or they may change together. Given the following constraints: 1. $A$ knows its current $X$ and $Y$ but has no further knowledge about its previous or future values, nor can it store anything else 2. There is only one-wa...
I didn't understand how ECDH actually works. Disclaimer: I know very little about elliptic curves. Here is how DH works: 1. Alice and Bob agree on a prime number P and a Generator G. (They use one from [RFC 3526][1]) 2. Alice generates a long-enough (how long?) secret S and calculates G^S mod P and sends the res...
How does Diffie Hellman differs from Elliptic curve-Diffie Hellman?
I didn't understand how ECDH actually works. Disclaimer: I know very little about elliptic curves. Here is how DH works: 1. Alice and Bob agree on a prime number P and a Generator G. (They use one from [RFC 3526][1]) 2. Alice generates a long-enough (how long?) secret S and <br>calculates G^S mod P and sends th...
How does Diffie Hellman differ from Elliptic curve-Diffie Hellman?
How to detect changes in data while preserving confidentiality (under constraints)?
I'm starting to study about visual cryptography, but I am stuck with the following problem. On paper Visual Cryptography by Moni Naor and Adi Shamir, on page 6. How to read/what is the meaning of [![vector][1]][1] and [![vectork][2]][2] where 1 <= i <= k Can someone explain how to read it? Because I t...
I didn't understand how ECDH actually works. Disclaimer: I know very little about elliptic curves. Here is how DH works: 1. Alice and Bob agree on a prime number $P$ and a generator $G$. (They use one from [RFC 3526][1]) 2. Alice generates a long-enough (how long?) secret $S$ and <br>calculates $R = G^S \pmod{P...
I didn't understand how ECDH actually works. Disclaimer: I know very little about elliptic curves. Here is how DH works: 1. Alice and Bob agree on a prime number $P$ and a generator $G$. (They use one from [RFC 3526][1]) 2. Alice generates a long-enough (how long?) secret $S$ and calculates $R = G^S \pmod{P}$ a...
How does Diffie–Hellman differ from elliptic curve Diffie–Hellman?
I have been searching if Mersenne Twister generate homogeneous distribution of numbers but I don't find nothing. I have found a lot of test and proprieties but I do not know if any of those proprieties/tests refers to the homogeneity. Can you explain me if the algorithm generates homogeneous numbers, why and what ar...
Does Mersenne Twister generate homogeneous numbers?
I didn't understand how ECDH actually works. Disclaimer: I know very little about elliptic curves. Here is how DH works: 1. Alice and Bob agree on a prime number $P$ and a generator $G$. (They use one from [RFC 3526][1]) 2. Alice generates a long-enough (how long?) secret $S$ and calculates $R = G^S \pmod{P}$ a...
I have been asigned to generate 15000+ homogeneus and uniform random numbers for a work. I have been searching if Mersenne Twister generate homogeneous distribution of numbers but I don't find nothing. I have found a lot of test and proprieties but I do not know if any of those proprieties/tests refers to the homoge...
Before we get into the key storage and management issues, I wanted to clarify the scheme that is proposed in the linked article, to make sure it is clear what we are talking about.<br> Let's assume we get `pw` for authentication from the user and retrieve [`salt`][1] and `tag` from the database and we get `sk` from th...
Recently, I was reading: [Are there any specific requirements for the function F in a Feistel cipher?](http://crypto.stackexchange.com/a/1353/17887), and the answer posted mentions a Feistel Cipher named [Turtle](http://www.crypto.com/papers/turtle.pdf), which uses a four-round Feistal scheme as a round function for a ...
What level of security is provided when a Feistel Cipher is used as a round function of another Feistel Cipher?
I have a question. If you receive a DES encrypted message for which you would NOT recognize the plaintext if it were decrypted, is there any way to potentially determine the key if all keys are likely? What about for AES?
I'm working on a communication protocol where a client sends encrypted data to a server. What happens is that in some point, the client creates a symmetric key used to create data digests through the HMACSHA256 algorithm. Then, the idea is that data is sent to the server along with its digest, so the server can calcula...
This question might seem silly, but how true is the fact that the round function $F$ does not have to be invertible? I am curious to know this, because non-invertible functions can be very lossy, i.e., can lose much of the information related to the input, hash functions for example.
Can the round function $F$ in a Feistel Network be practically any non-invertible function?
<p>Please criticize the (homebrew?) mode described below; to point out a single major defect/uncertainty or the link to (the analysis of) an equivalent construction is quite enough. Assume the performance is ignored in favor of security.</p> <p>This scheme looks like something that emerges from time to time. Here is...
<p>Please criticize the (homebrew?) mode described below; to point out a single major defect/uncertainty or the link to (the analysis of) an equivalent construction is quite enough. Assume the performance is ignored in favor of security.</p> <p>This scheme looks like something that emerges from time to time. Here is...
After reading this [article][1], I started wondering how should I approach the problem of choosing p and g params in 1024bit DHKE. In my project, I am going to establish keys between many users, should I create different p and g for every one or e.g. every 100? Is there any tool that would generate me random and goo...
What Diffie-Hellman KE p ang g parameters should I use?
I have been assigned to generate 15000+ homogeneous and uniform random numbers for a work. I have been searching if Mersenne Twister generate homogeneous distribution of numbers but I don't find nothing. I have found a lot of test and proprieties but I do not know if any of those proprieties/tests refers to the homo...
After reading this [article][1], I started wondering how should I approach the problem of choosing p and g params in 1024-bit Diffie-Hellman key exchange. In my project, I am going to establish keys between many users. Should I create different p and g for every one or e.g. every 100? Is there any tool that would ge...
What Diffie-Hellman parameters should I use?
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 exponent? To generate a private key of 1024 b...
Is RSA key size the size of private key exponent?
Consider the following two authentication schemes. In both cases the server knows the public key of the client. ### Scheme A Server presents a randomly generated plaintext to the client, and asks the client to hash-and-encrypt (sign the message). The server can verify the signature using the public key. ### Sc...
Is there a difference between asking for a decryption and asking for an encryption in challenge-response?
I can't find anywhere details on how to fingerprint a public RSA key in PKCS1 format. There are a lot of examples on the internet on how to fingerprint an RSA public key in openssh format using `ssh-keygen -lf id_rsa.pub` but in my application I am receiving a public key in PCKS1 format and even if I can remove the ...
Consider the following two authentication schemes. In both cases the server knows a public key of the client (for a signature system in the first and an encryption system in the second case). ### Scheme A Server presents a randomly generated plaintext to the client, and asks the client to sign the message. The se...
Is there a difference between asking for a signature and asking for a decryption in challenge-response?
Is there a difference between asking for a signature and asking for a decryption in challenge-response authentication?
[@Thomas has a great answer](http://crypto.stackexchange.com/a/1200/12164) and I don't want to detract from it. However I wanted to better highlight how, as he notes, you are just exploiting the homomorphism of Elgamal. The variant of Elgamal with the message in the exponent is often called exponential Elgamal[ \[CG...
Why do testing suites calculate $\pi$ (pi) using the Monte Carlo method to determine if a series of numbers are random? As far as I can tell, the Monte Carlo method can be used to estimate $\pi$ itself (as a numeric means of calculating it). It just so happens to use random numbers. Why does it have to be $\pi$ if...
This may seem like basic crypto knowledge, but why do hash functions like SHA2 and Whirlpool have round constants that are absorbed into their respective states? I can understand that in a cipher you need some way to incorporate a variable secret key, but there are no such user keys for hash functions. All the roun...
I've read about the possibility of inverting the Mersenne Twister after 624 numbers of output. 624 matches the state size of my implementation of the Twister. Coincidence? If the generator only output 623 numbers, i.e. less than the state size, might inversion still be possible with really clever maths? Or is this ...
I want to manage authorization, as 3rd-party permissions, through asymmetric cryptography. I'm concerned about how it is possible to share access of encrypted data with N entities, be able to revoke any of them at anytime, and do this securely. I've thought about a cryptography function that I'm asking here some ...
Most block cipher implementations expect users to pad so that the message matches the cipher block size. I understand the purpose of the padding is to make the input match the cipher block size. It also has a the possibly beneficial effect of hiding the actual message length from the observer. With [NaCl secretbox][...
Why is it OK for secretbox to leak the length?
According to the [Dell SecureWorks link][1] from the comments, CryptoWall used/uses RSA encryption directly on the files: > File encryption begins after CryptoWall successfully retrieves the RSA public key from an active C2 server. Therefore, using network-based controls to block this communication can prevent compr...
This may seem like basic crypto knowledge, but why do hash functions like SHA-2 and Whirlpool have round constants that are absorbed into their respective states? I can understand that in a cipher you need some way to incorporate a variable secret key, but there are no such user keys for hash functions. All the rou...
Yes you could use a hashfunction as round function, but if you are using the "same key" over all rounds, you are vulnerable to slide attacks. Using a hashfunction is not a very good idea. Your round function should not introduce biases, should not lead to special differences (attack: differential cryptanalysis), an...
I've been thinking a bit lately about how to get quantum resistant signatures fast and (relatively) small. One idea I've been keen on exploring is finding a PRNG that allows fast-forwarding, e.g. Calculating what the hash will be N states in the future, without going back The grand idea being, with a large fast-f...
I've been thinking a bit lately about how to get quantum resistant signatures fast and (relatively) small. One idea I've been keen on exploring is finding a PRNG that allows fast-forwarding, e.g. Calculating what the hash will be N states in the future, without going back The grand idea being, with a large fast-f...
I've been thinking a bit lately about how to get quantum resistant signatures fast and (relatively) small. One idea I've been keen on exploring is finding a crypto PRNG that allows fast-forwarding, e.g. Calculating what the hash will be N states in the future, without the ability of moving backwards. The grand id...
Assume I have to implement a secure channel protocol by myself. Assume further that for some obscure reasons (library restrictions?) I can't use any of the pre-made libraries for SSH, TLS and such. Assume even further that there are only few algorithms available namely the neccessary ones, such as AES, GCM, ECDH, ECDSA...
What is the lightweight key exchange protocol of choice?
[Shamir secret sharing][1] techniques rely on polynomials for splitting and reconstructing. It's security properties are very good, i.e. it is impossible to reconstruct the secret when $t-$ shares are given. The coefficient for the highest term of a polynomial should be non-zero. But is it mandatory for other co-...
We have multiple VMs sharing the same physical hardware. We use `/dev/urandom` for session key generation. But a question comes up: if `/dev/urandom` utilizes metrics from the physical hardware for entropy, isn't there increased risk of duplicates for VMs on shared hardware if calls are made at the same exact time?
[Shamir secret sharing][1] techniques rely on polynomials for splitting and reconstructing. It's security properties are very good, i.e. it is impossible to reconstruct the secret when $t-$ shares are given. The coefficient for the highest term of a polynomial should be non-zero. But is it mandatory for other co-...
Most block cipher implementations expect users to pad so that the message matches the cipher block size. I understand the purpose of the padding is to make the input match the cipher block size. It also has a the possibly beneficial effect of hiding the actual message length from the observer. With [NaCl secretbox][...
Why is it OK for secretbox to leak the message length?
I understand that bigger ciphers show more recurring patterns and therefore should be easier (or at least faster) to decrypt as you'll have a better statistical analysis, being However if we use a evenly grown key, would this still be true? I've been wondering as I'm trying to decrypt a Vigenére cipher which seem...
How to overcome issues with big ciphers? E.g. with small vs. big Vigenére Ciphers
I understand that bigger ciphers show more recurring patterns and therefore should be easier (or at least faster) to decrypt as you'll have a better statistical analysis, being However if we use a evenly grown key, would this still be true? I've been wondering as I'm trying to decrypt a Vigenére cipher which seem...
We have multiple virtual machines sharing the same physical hardware. We use `/dev/urandom` for session key generation. But a question comes up: if `/dev/urandom` utilizes metrics from the physical hardware for entropy, isn't there an increased risk of duplicates for VMs on shared hardware if calls are made at the same...
I understand that bigger ciphers show more recurring patterns and therefore should be easier (or at least faster) to decrypt as you'll have a better statistical analysis, being However if we use a evenly grown key, would this still be true? I've been wondering as I'm trying to decrypt a Vigenére cipher which seem...
I understand that bigger ciphers show more recurring patterns and therefore should be easier (or at least faster) to decrypt as you'll have a better statistical analysis, being However if we use a evenly grown key, would this still be true? I've been wondering as I'm trying to decrypt a Vigenére cipher which seem...
When designing SMPC protocols using secret-sharing, it is a common technique to compose a protocol from several sub-protocols (each proven secure under the formal definition of security w.r.t. semi-honest or malicious adversaries) by applying the sequential composition theorem. These sub-protocols obtain shared input a...
When designing SMPC protocols using secret-sharing, it is a common approach to compose a protocol from several sub-protocols (each proven secure under the formal definition of security w.r.t. semi-honest or malicious adversaries) by applying the sequential composition theorem. These sub-protocols obtain shared input an...
This is the _Strong-DDH: strong decision Diffie-Hellman problem_. See [Final Report on Main Computational Assumptions in Cryptography][1]. Assumption number 19. If the DDH is hard then this implies that it must also be hard to calculate the discrete log. [1]: http://www.ecrypt.eu.org/ecrypt2/documents/D.MAYA....
[Shamir secret sharing][1] techniques rely on polynomials for splitting and reconstructing. It's security properties are very good, i.e. it is impossible to reconstruct the secret when $t-1$ shares are given. The coefficient for the highest term of a polynomial should be non-zero. But is it mandatory for other co...
From the ECDH demo [here][1], if I generate a private key for Alice I can get _ P = 1175846487558108474218546536054752289210804601041 Which gives the following public key point. X = 583857549063195252150226340830731484791130788759 Y = 1195037839477751118658084226553581900533276838164 For ECDSA ...
When designing SMPC protocols using secret-sharing, it is a common approach to compose a protocol from several sub-protocols (each proven secure under the formal definition of security w.r.t. semi-honest or malicious adversaries) by applying the sequential composition theorem. These sub-protocols obtain shared input an...
I'm looking for a toy hash function, where the idea is to have high school students break (i.e. find a collision) a hash function by hand, in order to teach them how one way functions and hashing works. Do you happen to know some function like that? As for How hard I want it to be to breakable: Ideally a "sizeabl...
>Since the keys are fixed from beginning (the sub-protocols input are ciphertexts), isn't it possible to give the secret key to the (non-uniform) distinguisher as an extra advice (the only restrictions for the advice is that its bitlength is polynomial in the security parameter), and thus allowing the distinguisher to ...
I'm looking for a toy hash function, where the idea is to have high school students break (i.e. find a collision) a hash function by hand, in order to teach them how one way functions and hashing works. Do you happen to know some function like that? As for how hard I want it to be to breakable: Ideally a "sizeabl...
When designing SMPC protocols using secret-sharing, it is a common approach to compose a protocol from several sub-protocols (each proven secure under the formal definition of security w.r.t. semi-honest or malicious adversaries) by applying the sequential composition theorem. These sub-protocols obtain shared input an...
I am trying to figure this one out: What would be the encrypted output for an input x if the same key K is used in all three boxes of 3DES? The encryption scheme for 3DES with three different keys, and k3 = k1, is: >y=ek3(ek2(ek1(x))) So if the key is the same 3 times, then the encrypted output of x would be ...
I am trying to figure this one out: What would be the encrypted output for an input x if the same key K is used in all three boxes of 3DES? The encryption scheme for 3DES with three different keys, and $k_3 = k_1$, is $y=ek_3(ek_2(ek_1(x)))$. So, if the key is the same 3 times, then the encrypted output of x would ...
Yes you could use a hashfunction as round function, but if you are using the "same key" over all rounds, you are vulnerable to slide attacks. Using a hashfunction is not a very good idea. Your round function should not introduce biases, should not lead to special differences (attack: differential cryptanalysis), an...
Yes you could use a hash function as round function, but if you are using the "same key" over all rounds, you are vulnerable to slide attacks. Using a hash function is not a very good idea. Your round function should not introduce biases, should not lead to special differences (attack: differential cryptanalysis), ...
I need a set of seeds $S=\{s_1,..., s_n\}$, for pseudo-random function where seed $s_i$ is used to generate a set of pseudo-random values. Obviously I need to be able to **regenerate** the sets of pseudo-random values, but I do not want to keep the seeds. **Question**: Would it be secure if I generate a seed for ps...
I need a set of seeds $S=\{s_1,..., s_n\}$, for pseudo-random function where seed $s_i$ is used to generate a set of pseudo-random values. Obviously I need to be able to **regenerate** the sets of pseudo-random values, but I do not want to keep the seeds. Thus, I'd like to use a master seed to generate the other seeds....
Can I assume this? Specifically, I want to know if the following two cases are valid. Suppose $prf_k(m)=c$ 1. One-wayness: Only given $c$, we cannot reveal $m$. 2. Without key $k$, even given $m$, cannot get $c$. They seem intuitive, but I want to be assured of their validity when I say that. Thank you.
Is pseudorandom function also a one-way function?
Are there any frequency analysis tools for analyzing non-text data (eg image and audio formats encoded with a substitution cipher)?
SSL implementation in windows?
I've decided to remove a previous unanswered question of mine and break it down into smaller pieces so it's not such a loaded question. For this question I need to prove that I've committed to a number, and that same number is the plaintext of some ElGamal ciphertext, without opening the commitment or decrypting the...
How to prove that a commitment hides the decryption of an ElGamal ciphertext?
Is frequency analysis a viable attack on non-text data encoded by substitution (eg image and audio formats encoded with a substitution cipher)?
Is frequency analysis a viable attack on non-text data encoded by substitution?
So I'm trying to find a method of encryption that not only obfuscates text, but also compresses the result. For example, if I encrypted **`ninechars`**, the ideal result would be **less than nine characters**. **Otherwise**, if this is not possible, is there a method where I can set a limit on the amount of chara...
Is there an existing cryptography algorithm / method that both encrypts AND compresses text?
So I'm trying to find a method of encryption that not only obfuscates text, but also compresses the result. For example, if I encrypted **`ninechars`**, the ideal result would be **less than nine characters**. **Otherwise**, if this is not possible, is there a method where I can set a limit on the amount of chara...
If the $plaintext$ is $n$ bits the $ciphertext$ should be atleast $n$ bits, otherwise there would be information loss and you cannot get the $plaintext$ back !In simpler terms , encryption is randomized mapping from $plaintext$ to $ciphertext$ if both are $n$ bits its a random permutation of bits. Ideally it is suggest...
So I'm trying to find a method of encryption that not only obfuscates text, but also compresses the result. For example, if I encrypted **`ninechars`**, the ideal result would be **less than nine characters**. **Otherwise**, if this is not possible, is there a method where I can set a limit on the amount of chara...
So I'm trying to find a method of encryption that not only obfuscates text, but also compresses the result. For example, if I encrypted **`ninechars`**, the ideal result would be **less than nine characters**. **Otherwise**, if this is not possible, is there a method where I can set a limit on the amount of chara...
As we all know, if $E()$ is an additively homomorphic encryption, we can multiply $E(a)$ by an integer $b$, then we will get $E(ab)$. But what if $a$ is a float number? Can we still get $E(ab)$? Which scheme can support this?
How can I multiply an additively homomorphic encrypted value by a float number?
If one can prove that a large amount of image and audio data doesn't exhibit a frequency patter, only then can we consider frequency analysis as a non-viable attack. For a modified simple example, let us say each *guitar* chord is encoded as a byte of audio data. If you analyse about 70+ songs, you will see that 4 c...
I am learning cryptography by myself and I am not able to understand the meaning of probabilistic encryption algorithms. How is it different from deterministic encryption algorithms ? How can the output of probabilistic algorithm be different for same pair of plaintext and key when used two different times ? Doe...