instruction
stringlengths
15
30k
$m$ is arbitrary value in $Z_n$, where n is RSA modulo. Then we do: $r_2=r_1 . m (modn)$, where $r_1$ is a random value such that $r_1\in Z^*_n$. ** Question(1): is $r_2$ a uniformly at random value in $Z_n$? **Question(2): Would this be secure: $r_2=r_1 . m (modn)$ (where $m\in Z_n$ and $r_1\in Z^*_n$ )?
Does google's Crypto.JS AES encryption use PBKD2 as default? Some references, but I can't figure out the answer myself: https://code.google.com/p/crypto-js/#The_Cipher_Algorithms https://code.google.com/p/crypto-js/source/browse/tags/3.1.2/src/aes.js
Does google's Crypto.JS AES encryption use PBKD2 as default?
Does google's Crypto.JS AES encryption use PBKDF2 as default? Some references, but I can't figure out the answer myself: https://code.google.com/p/crypto-js/#The_Cipher_Algorithms https://code.google.com/p/crypto-js/source/browse/tags/3.1.2/src/aes.js
Does google's Crypto.JS AES encryption use PBKDF2 as default?
I came across the following quotes in reading papers on obfuscation: >The next result follows from the fact that point functions are not exactly learnable (since a uniformly chosen point function is statistically indistinguishable from the all-zeroes function given a polynomial number of membership queries). and ...
I came across the following quotes in reading papers on obfuscation ([1][1] and [2][2]): >The next result follows from the fact that point functions are not exactly learnable (since a uniformly chosen point function is statistically indistinguishable from the all-zeroes function given a polynomial number of membersh...
What does "learnable with oracle queries" mean?
I came across the following quotes in reading papers on obfuscation ([1][1], ibid, and [2][2]): >The next result follows from the fact that point functions are not exactly learnable (since a uniformly chosen point function is statistically indistinguishable from the all-zeroes function given a polynomial number of m...
I know counter mode can be CPA secure, when used with block ciphers modeled as random permutations. If we use pseudorandom permutations, is it still cpa secure? could anyone show me the prove? How about CBC mode? when used with block ciphers modeled as pseudo-random permutations, will it be CPA secure? anyone can...
Standard security proofs for CTR and CBC deal with pseudo-random permutations (or pseudo-random functions). Relevant references can be found in Sections 4 and 5 of [Rogaway's survey][1]. However, it is unclear what you mean by a proof with *random* permutations. Where is the key then? [1]: http://web.cs.ucdavis....
I know counter mode can be CPA secure, when used with block ciphers modeled as random permutations. If we use pseudo-random permutations, is it still CPA secure? Is there a proof? How about CBC mode? When used with block ciphers modeled as pseudo-random permutations, will it be CPA secure? Again, is there a proof?
Proof that counter mode of operation and CBC mode are CPA secure when pseudorandom permutations?
If random data is prepended to a file encrypted with GNUPG's symmetric encryption, how may an attacker find out if the input file is deliberately corrupted or the passphrase is wrong? If it is not easily ascertainable from which offset the actual encrypted data starts, is there any added security in always prependin...
There are some strong studies which [support][1] the use of pronounceable passwords and [multiple][2] [tools][3] which provide generation of such passwords. According to [this question][4] the entropy of a password depends on its method of generation but how can I be sure that my generated pronounceable password has...
How Secure is a Pronounceable Password? In means of entropy
I've read [Bellare and Rogaway 2004](http://www-sop.inria.fr/members/Benjamin.Gregoire/Cours/game_playing.pdf) and [Shoup 2004](http://www.shoup.net/papers/games.pdf) about game-based cryptography proofs, but I lack precisions about how should be built the *"learning"* and *"challenge"* phases, since my games will prob...
Where is defined the fact of having a "learning" and "challenge" phase in cryptography proofs?
There is an international search for Mersenne Primes. The project is huge. But what is the use of Mersenne Primes in cryptography? Do they have any other properties other than the 2^n-1 form?
How to make a message into a polynomial? I saw many answers to this question and yes, i know that here are some questions. But i did not get it. I think that i am making some mistakes. I took a word and just convert to binary-and here is my polynomial. I this that it is not correct, i am working with utf-8 (so example ...
There is an international search for Mersenne Primes. The project is huge. But what is the use of Mersenne Primes in cryptography? Do they have any other properties other than the $2^n-1$ form?
It's much easier to add a cost factor to the key derivation from the password than to add a lot of data to an encrypted container. See the PBKDF's PBKDF2, bcrypt and scrypt for more information, or see [this Q/A for GPG](http://crypto.stackexchange.com/q/3252/1172). In general, an iteration to derive the key is of cour...
I want to derive a 256 bit encryption key and a 256 bit MAC key from a single 256 bit master key for an authenticated encryption scheme. I was considering the following construction to derive the two keys using a secure 256 bit hash algorithm e.g. Keccak: 1. Key 1 for encryption = H(master key | '0') 2. Key 2 ...
Most secure way to derive separate encryption and MAC keys from a single master key?
Does somebody know a cryptographic/mathematic operation, that needs much computing power to be "encrypted"/"created" but don't much power to be "decrypted"/"solved"? Thanks in advance, stereo_
Operation which needs much computing power to be created, but just a little to be solved?
Does somebody know a cryptographic/mathematic operation, that needs much computing power to be "encrypted"/"created" but doesn't need much power to be "decrypted"/"solved"? Thanks in advance, stereo_
If a database stores password encrypted by using salt values, how are they stored? I read somewhere, it uses timestamps. So timestamp is also stored? How about user tries to login next time, then how timestamps are considered?
How salt values are more secure?
If a database stores password encrypted by using salt values, how are they stored? <br> I read somewhere, it uses timestamps. So is the timestamp also stored? <br> How about when a user tries to login next time, then how are timestamps considered?
How are salt values more secure?
I have a situation in RSA like this. Charles sends same message $m$ to Alice and Bob encrypted with $e_A$ and $e_B$ respectively. It happens that he they are under same modulus $n$ and $gcd(e_A, e_B)=1$. Now Eve intercepts two messages $c_A$ and $c_B$. The claim is that Eve can easily get $m$ in this situation. M...
Hint: if $c_A$ is not invertible, what does that say about $gcd(c_A, n)$? How can you exploit that to obtain $m$ in another way?
I have a point in affine coordinates: $(x,y)$. What should I do when I want to convert to $(X,Y,Z)$ in Jacobian coordinates? I need it for calculating ECC in a prime field.
How can convert affine to Jacobian coordinates?
Does somebody know a cryptographic/mathematic operation, that needs much computing power to be "encrypted"/"created" but doesn't need much power to be "decrypted"/"solved"?
Is the [parity of the permutation][2] of the set $\{0,1\}^{128}$, defined by AES encryption for a certain fixed key, dependent on this key? DES, and any pure Feistel cipher, has even parity for any key. That's less clear for AES, and of no practical importance since parity of an arbitrary permutation can not be dete...
Is AES's parity key-dependent?
Secure way to derive separate encryption and MAC keys from a single master key?
I am a bit lost in understanding what I read on authentication, signature, etc. Is the size of the ECDSA keys produced by `ssh-keygen -t ecdsa -b 256` linked to the hash used (SHA256) when computing the signature?
Does"ssh-keygen -t ecdsa -b 256" produced what is called a ECDSA SHA256 key pair?
LibSodium, (https://github.com/jedisct1/libsodium), has a function **crypto_box_detached()** which does authenticated encryption using the public key of the recipient and the private key of the sender (using **Curve25519**). I believe this function is compatible with Daniel J. Berinstein's corresponding function in NaC...
What can be learned from the ciphertext of LibSodium's crypto_box_easy()?
It's still common to come across implementations of KDF1 and KDF2. Basically these are KDF's that simply derive multiple keys from the key seed and a counter: $K_i = KDF(K_{master}, i) = H(K_{master} | c)$ In this function $|$ means concatenation and $c$ is the encoded value of $i$ in 4 bytes using an unsigned bi...
What can be learned from the ciphertext of LibSodium's crypto_box_detached()?
LibSodium, (https://github.com/jedisct1/libsodium), has a function [`crypto_box_detached()`](http://doc.libsodium.org/public-key_cryptography/authenticated_encryption.html) which does authenticated encryption using the public key of the recipient and the private key of the sender (using Curve25519). I believe this func...
It's still common to come across implementations of KDF1 and KDF2. Basically these are KDF's that simply derive multiple keys from the key seed and a counter: $K_i = KDF(K_{master}, i) = H(K_{master} | c)$ In this function $|$ means concatenation and $c$ is the encoded value of $i$ in 4 bytes using an unsigned bi...
![enter image description here][1] [1]: https://i.stack.imgur.com/vfLpV.png The passage said that ther computational load to attack DES-X can be reduced to approximately 2^(56+64)=2^120 steps,and the storage of data sets should be 2^64. But I can't figure why it is time complexity 2^120 and the (space co...
Does the size of a SSH ECDSA key determine the hash algorithm?
Actually, because of DESX works, the meet-in-the-middle attack can be optimized to take $2^{120}$ $DES$ (and no $DES^{-1}$ operations), and **no** additional storage. Here is how it works: let us assume that we have three known plaintext/ciphertext pairs $(P_1, C_1)$, $(P_2, C_2)$ and $(P_3, C_3)$. We know that: ...
Actually, because of DESX works, the meet-in-the-middle attack can be optimized to take $2^{120}$ $DES$ (and no $DES^{-1}$ operations), and **no** additional storage. Here is how it works: let us assume that we have three known plaintext/ciphertext pairs $(P_1, C_1)$, $(P_2, C_2)$ and $(P_3, C_3)$. We know that: ...
>![enter image description here][1] [1]: https://i.stack.imgur.com/vfLpV.png The passage said that the computational load to attack DES-X can be reduced to approximately $2^{(56+64)}=2^{120}$ steps,and the storage of data sets should be $2^{64}$. But I can't figure why it is time complexity $2^120$ and t...
>![enter image description here][1] [1]: https://i.stack.imgur.com/vfLpV.png The passage said that the computational load to attack DES-X can be reduced to approximately $2^{(56+64)}=2^{120}$ steps,and the storage of data sets should be $2^{64}$. But I can't figure why it is time complexity $2^{120}$ and ...
Actually, because of DESX works, the meet-in-the-middle attack can be optimized to take $2^{119}$ $DES$ (and no $DES^{-1}$ operations), and **no** additional storage. Here is how it works: let us assume that we have three known plaintext/ciphertext pairs $(P_1, C_1)$, $(P_2, C_2)$ and $(P_3, C_3)$. We know that: ...
As a preface, I have to say that I am a noob in this area. Having said that, I will ask the question. I have a situation where I need to validate and protect against tampering a handful of large binary files (~1GB each with ~10GB total) distributed on an embedded system (think Android Tablet). These original files...
I have now studying the RSA , but I think that is it possible to have some probabilistic version like random bit string "r" XOR with key? Is there ny probabilistic version of RSA? Thak you so much
Any probabilistic version of RSA?
I have now studying the RSA, but I think that is it possible to have some <br> probabilistic version like a random bit string "r" XORed with the key? Is there any probabilistic version of RSA? Thak you so much
Is there any probabilistic version of RSA?
What do you call one time pad with pseudo-random nos. used?
There are some strong studies which [support][1] the use of pronounceable passwords and [multiple][2] [tools][3] which provide generation of such passwords. According to [this question][4] the entropy of a password depends on its method of generation but how can I be sure that my generated pronounceable password has...
What is the encryption method called when pseudo-random numbers are used instead of true random numbers?
What do you call one time pad where pseudo-random numbers are used?
Say I start with a 26-letter keyword and convert the letters into 26 integers (A=0, B=1...Z=25) nr[0] to nr[25]. Then I create a stream, nr[26] onwards, with a lagged fibonacci sequence where nr[n]= (sum of nr[n-26] to nr[n-1] )mod 26. And I use the stream to encipher a brief message (no longer than 200 letters) in su...
How secure is a lagged fibonacci sequence for encrypting brief messages?
Say Alice publishes (i.e. all parties in the universe) a key or certificate $x$ and sends a secret $s$ to Bob. Bob then publishes some data $d$ (his identity or a message or smt.) and an authentication of the data using the secret, $auth = MAC(d,s)$. Dave can now verify the authenticity of $d$ and must not be able to...
I discovered the CRT version of RSA cryptosystem which is used in many crypto libraries (openSSL, Java...). The use of the Chinese Remainder Theorem improves the speed of decryption so why it's not always applied ? What are the disadvantages of this version due which it's not always implementable ? Thank you very...
Say Alice publishes (i.e. all parties in the universe) a key or certificate $x$ and sends a secret $s$ to Bob. Bob then publishes some data $d$ (his identity or a message or smt.) and an authentication of the data using the secret, $auth = MAC(d,s)$. Dave can now verify the authenticity of $d$ and must not be able to...
Say Alice publishes (i.e. all parties in the universe) a key or certificate $x$ and sends a secret $s$ to Bob. Bob then publishes some data $d$ (his identity or a message or smt.) and an authentication of the data using the secret, $auth = mac(d,s)$. Dave can now verify the authenticity of $d$, $verify(auth,x)$, and ...
Assuming salt is public and is MAC'd with message. Attacker can modify salt. $k = KDF(password, salt)$ $tag = MAC_k(salt || message)$ Is it safe to salt MAC's key, which is derived with KDF?
Is it safe to salt MAC's key?
A one way Function provably reversible at N applications with the same seed?
Say Alice publishes (i.e. all parties in the universe) a key or certificate $x$ and sends a secret $s$ to Bob. Bob then publishes some data $d$ (his identity or a message or smt.) and an authentication of the data using the secret, $auth = mac(d,s)$. Dave can now verify the authenticity of $d$, $verify(auth,x)$, and ...
F can be evaluation of the degree-at-most-(N-1) [polynomial over a finite field](https://en.wikipedia.org/wiki/Finite_field_arithmetic) s at A. $\:$ N input-output <br> pairs would allow one to efficiently find s by [Lagrange interpolation](https://en.wikipedia.org/wiki/Lagrange_polynomial). $\:$ Observe that for all...
The key to a monoalphabetic substitution cipher is a substitution table. Thus you already have (most of) the key for that cipher, it is a b c d e f g h i j ? D E F G H I ? K L k l m n o p q r s t M N O P Q R S B T U ...
Let $(n,d)$ be an RSA private key and $(n,e)$ the corresponding public key. 1. Generate a secret random $r$ from $(\mathbb{Z}/n\mathbb{Z})^*$ 2. Compute $C’ = C (r^e) \bmod n$ 3. Submit $C’$ as a chosen ciphertext and receive back $M’ = C’ ^ d \bmod n = M r$, since $C’ = (C \bmod n) \times (r^e ...
Infer encoding mechanism from $n$-grams distance?
The key to a mono-alphabetic substitution cipher is a substitution table. Thus you already have (most of) the key for that cipher, it is a b c d e f g h i j ? D E F G H I ? K L k l m n o p q r s t M N O P Q R S B T U ...
My teacher stated that… > The number of possible keys (E) in a monoalphabetic cipher is $26$! My thinking: > Every letter in the alphabet can be $25$ different letters hence it the number of possible keys should be $26^{25}$. What is wrong with my way of thinking, and how did she come to a conclusion ...
Assuming salt is public and is MAC'd with message. Attacker can modify salt. $k = KDF(password, salt)$ $tag = MAC_k(salt || message)$ Is it safe to salt MAC, by deriving key from password and salt with KDF?
Is it safe to salt MAC?
Your teacher is right, and here's why: What happens if you encrypt `A` with `G` and `B` with `G`? You can't decipher it, because you have no idea if the `G` in the ciphertext was an `A` or a `B`. So… - For the plaintext letter `A` you can use the ciphertext letter `A`, `B`, `C`, … , `X`, `Y`, or `Z`. ($26$ pos...
My teacher stated that… > The number of possible keys (E) in a monoalphabetic cipher is $26$! My thinking: > Every letter in the alphabet can be $25$ different letters hence it the number of possible keys should be $26^{25}$. What is wrong with my way of thinking, and how did she come to a conclusion of...
I am learning about [**Hill Cipher**](http://en.wikipedia.org/wiki/Hill_cipher) and know that it is a block cipher where each block of n letters (considered as an $n$-component vector) is multiplied by an invertible $n \times n$ matrix, again modulus $26$. The article did not touch on what happens if the the block...
I was reading up on [**keystream**](http://en.wikipedia.org/wiki/Keystream) when I came upon the definition of it: > A keystream is a stream of random or pseudorandom characters that are combined with a plaintext message to produce an encrypted message (the ciphertext). > The "characters" in the keystream can be...
For Vigenere cipher, I understand 1. Find period first (say we have p = 6) 2. Find highest frequency of letter in each group (from 1 to 6) and assume it is "e" in plaintext What if we have more than one letter with same frequency. For example, "j" and "y" having same frequency in p1 group. Which one should we c...
Your teacher is right, and here's why: What happens if you encrypt `A` with `G` and `B` with `G`? You can't decipher it, because you have no idea if the `G` in the ciphertext was an `A` or a `B`. So… - For the plaintext letter `A` you can use the ciphertext letter `A`, `B`, `C`, … , `X`, `Y`, or `Z`. ($26$ pos...
Say that I define a scheme where the salt is public and is MAC-ed with the message: $k = KDF(password, salt)$ $tag = MAC_k(salt || message)$ Is it safe to salt the MAC this way? Assume that the salt is public and can be modified by an attacker.
Is it safe to salt a MAC?
Classical paper by Groth-Sahai on NIZK proof system is titled as "*Efficient Non-interactive Proof Systems for Bilinear Groups*". To my understanding, only PPE are defined over groups which induces Bilinear map. But, what about MSME/QE? Aren't those applicable to generic groups, too? In that sense, isn't the tile of th...
Isn't Groth-Sahai proof system applicable beyond Bilinear groups?
F(s,A) can be a [prefix-free encoding](https://en.wikipedia.org/wiki/Prefix_code) of the number of elements in the finite field encoded by s <br> [||](https://en.wikipedia.org/wiki/Concatenation) $\:$ the polynomial R (as described at [this link](https://en.wikipedia.org/wiki/Finite_field_arithmetic#Effective_poly...
The base scenario goes as follows: A program stores some user's confidential data encrypted on their disk. The user is most probably clueless and the disk might get stolen, but these are the classical problems. Now there's a requirement to allow a sort of remote access without increasing the risk too much. The progr...
Classical paper by Groth-Sahai on NIZK proof system is titled as "*Efficient Non-interactive Proof Systems for Bilinear Groups*". To my understanding, only (Pairing Product Equation) PPE are defined over groups which induces Bilinear map. But, what about (Multi-Scalar Multiplication Equation) MSME/ (Quadratic Equation)...
I've seen the term "$q$-type assumption" used in a few papers without a definition. A google search doesn't seem to come up with anything useful either (except the same papers without a definition). Could someone elaborate on what they are and how they compare to static assumptions? Are there some other typical "typ...
What is a q-type assumption?
I've seen the term "$q$-type assumption" used in a few papers without a definition. A google search doesn't seem to come up with anything useful either (except the same papers without a definition). Could someone elaborate on what they are and how they compare to static assumptions? Are there some other typical "typ...
I am trying to understand the Boneh-DeMillo-Lipton fault attack on RSA CRT signature. Suppose that we sign a message $m$ with RSA-CRT : $d_p = d \mod p-1$ and $d_q = d \mod q-1$ $s_p = h(m)^{d_p} \mod p$ and $s_q \not= h(m)^{d_q} \mod q$ where $h$ is a hash function By CRT we get $s$ the signature modulo $n...
I am trying to understand the Boneh-DeMillo-Lipton fault attack on RSA CRT signature. Suppose that we sign a message $m$ with RSA-CRT : $d_p = d \bmod (p-1)$ and $d_q = d \bmod (q-1)$ $s_p = h(m)^{d_p} \bmod p$ and $s_q \not= h(m)^{d_q} \bmod q$ where $h$ is a hash function By CRT we get $s$ the signature m...
I am reasonably new to the cryptography. For my use-case I need a method where in I would need a receiver to accept encrypted messages from a range of senders (each having their own, say, public key). My use-case also needs that some of these users only have temporary access which can be revoked externally i.e. without...