instruction
stringlengths
15
30k
Encrypt-then-Authenticate (EtA) seems to generally be considered the better option, compared to Authenticate-then-Encrypt (AtE) (see this [Crypto.SE][1] question, for example). The people writing the RFC for TLS 1.2 [seem to have been aware of this][2], but have chosen to use AtE anyway. Is there a reason why this i...
An alternative solution using one encryption, one cryptographic hash and one (possibly fast) non-cryptographic pseudorandom number generator operation per block. **Encryption:** 1. Take the last plaintext block, and use its value (or some part of it), to seed a (possibly non-cryptographic) random number generato...
An alternative solution using one encryption, one cryptographic hash and one (possibly fast) non-cryptographic pseudorandom number generator operation per block. **Encryption:** 1. Take the last plaintext block, and use its value (or some part of it), to seed a (possibly non-cryptographic) random number generato...
An alternative solution using one encryption, one cryptographic hash and one (possibly fast) non-cryptographic pseudorandom number generator operation per block. **Encryption:** 1. Take the last plaintext block, and use its value (or some part of it), to seed a (possibly non-cryptographic) random number generato...
In addition to Ilmari's excellent answer I would like to address your questions and clarify some points for you: > I am trying to understand why is bcrypt called a Key Derivation Function? Because it *derives a key* from given input. This key is then used as unique value for a password in the case it is used for ...
In addition to Ilmari's excellent answer I would like to address your questions and clarify some points for you: > I am trying to understand why is bcrypt called a Key Derivation Function? Because it *derives a key* from given input. This key is then used as unique value for a password in the case it is used for ...
An alternative solution using one encryption, one cryptographic hash and one (possibly fast) non-cryptographic pseudorandom number generator operation per block. **Encryption:** 1. Take the last plaintext block, and use its value (or some part of it), to seed a (possibly non-cryptographic) random number generato...
In addition to Ilmari's excellent answer I would like to address your questions and clarify some points for you: > I am trying to understand why is bcrypt called a Key Derivation Function? Because it *derives a key* from given input. This key is then used as unique value for a password in the case it is used for ...
Would this method allow fast authenticated encryption with only one encryption operation per block?
Would this method allow fast authenticated encryption using only a single encryption operation per block?
An alternative solution using one encryption, one cryptographic hash and one (possibly fast) non-cryptographic pseudorandom number generator operation per block. **Encryption:** 1. Take the last plaintext block, and use its value (or some part of it), to seed a (possibly non-cryptographic) random number generato...
An alternative solution using one encryption, one cryptographic hash and one (possibly fast) non-cryptographic pseudorandom number generator operation per block. **Encryption:** 1. Take the last plaintext block, and use its value (or some part of it), to seed a (possibly non-cryptographic) random number generato...
An alternative solution using one encryption, one cryptographic hash and one (possibly fast) non-cryptographic pseudorandom number generator operation per block. **Encryption:** 1. Take the last plaintext block, and use its value (or some part of it), to seed a (possibly non-cryptographic) random number generato...
[I added this approach to [a previous question I asked here](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] Assume $E$ is a block cipher, $C_0 = IV$ and $P_0=0$ (Consider both cases where the IV is in plaintext or encrypted) **Encryption:** 1. Add an additional block...
Would this method allow fast authenticated encryption using only a single encryption and RNG operation per block?
[I added this approach to [a previous question I asked here](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] Assume $E$ is a block cipher, $C_0 = IV$ and $P_0=0$ (Consider both cases where the IV is in plaintext or encrypted) **Encryption:** 1. Add an additional block...
In a substitution cipher, I recieve 3 bits and than I return another 3 bits. The key of this cipher could be a matrix represented as: (0) 0 0 0 => 1 1 1 (1) 0 0 1 => 1 1 0 (2) 0 1 0 => 1 0 1 (3) 0 1 1 => 1 0 0 (4) 1 0 0 => 0 1 1 (5) 1 0 1 => 0 1 0 (6) 1 1 0 => 0 0 1 (7) 1 1 1 => 0 0 0 So, wh...
In a substitution cipher, I recieve 3 bits and than I return another 3 bits. The key of this cipher could be a matrix represented as: (0) 0 0 0 => 0 1 1 (1) 0 0 1 => 1 0 1 (2) 0 1 0 => 1 1 1 (3) 0 1 1 => 0 1 0 (4) 1 0 0 => 0 0 1 (5) 1 0 1 => 1 0 0 (6) 1 1 0 => 0 0 0 (7) 1 1 1 => 1 1 0 So, wh...
In a substitution cipher, I recieve 3 bits and than I return another 3 bits. The key of this cipher could be a matrix represented as: (0) 0 0 0 => 0 1 1 (1) 0 0 1 => 1 0 1 (2) 0 1 0 => 1 1 1 (3) 0 1 1 => 0 1 0 (4) 1 0 0 => 0 0 1 (5) 1 0 1 => 1 0 0 ...
An alternative solution using one encryption, one cryptographic hash and one (possibly fast) non-cryptographic pseudorandom number generator operation per block. **Encryption:** 1. Take the last plaintext block, and use its value (or some part of it), to seed a (possibly non-cryptographic) random number generato...
[I added this approach to [a previous question I asked here](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] Assume $E$ is a block cipher, $P_0 = IV$ (Consider both cases where the IV is in plaintext or encrypted) **Encryption:** 1. Add an additional block to the mess...
In security, and specifically Block Cipher (AES, DES, etc), when we talk about pseudo random permutations, is the term "permutation" refer to the same meaning as in discrete mathematics. That is, the random shuffling of elements? So let's the input of DES has n 1s and m 0s, is the output gonna be n 1s and m 0s as we...
Are pseudorandom permutation really permutation in mathematical sense?
As I understand, ECB should not be used as encryption mode unless you are encrypting single blocks of data which are always unique and only are encrypted once. I have a collection of ids represented by integers that I encrypt and transmit (individually) with the same public key using RSA/ECB/PKCS1PADDING. Sometimes ...
Without knowing the exact implementation you are using, from the algorithm name, I think you are generating a random key for the symmetric cipher and encrypting that with the RSA key. This way your ciphertexts will be unique. I would recommend using a cipher mode that provides integrity protection, such as [AES-GCM]...
As I understand, ECB should not be used as encryption mode unless you are encrypting single blocks of data which are always unique and only are encrypted once. I have a collection of ids represented by integers that I encrypt and transmit (individually) with the same public key using RSA/ECB/PKCS1PADDING. Sometimes ...
$Z=(N-XY)^2$ is a surface with absolute minima ($0s$) anywere $Y=N/X$. I know this question is naiive, but shouldn't it be possible to apply a [lossy compression][1] filter to this function which preserves values only at discrete boundaries and then search for absolute minima? If the answer is no, is there any on...
I am studying [Merkle tree signature][1]. Let $\sigma=(s,Y_s,\sigma_{\text{OTS}},As)$ be a signature of certain document. Here $s$ is the index of leaf, $Y_s$ is the respectively OTS public key and $A_s$ is the authentication path. My questions are: 1) Is there any attack where an adversary changes part of the signa...
Name of this attack?
I am studying [Merkle tree signature][1]. Let $\sigma=(s,Y_s,\sigma_{\text{OTS}},As)$ be a signature of certain document. Here $s$ is the index of leaf, $Y_s$ is the respectively OTS public key and $A_s$ is the authentication path. My questions are: 1) Is there any attack where an adversary changes part of the signa...
[I added this approach to [a previous question I asked here](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] [This was modified from the original version to use a seed as $Key \oplus IV$ instead of just the key, $E(Key \oplus IV)$ and $H(Key \oplus IV)$ are other options] A...
My idea is to use a stream cipher encrypting 16 bytes at a time as a primative block cipher in a mode of operation such as CBC mode. Is this practical or useful in any way?
Is it practical to use a stream cipher in a block cipher mode?
[I added this approach to [a previous question I asked here](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] [This was modified from the original version to use a seed as $Key \oplus IV$ instead of just the key, $E(Key \oplus IV)$ and $H(Key \oplus IV)$ are other options] A...
[I added this approach to [a previous question I asked here](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] [This was modified from the original version to use a seed as $Key \oplus IV$ instead of just the key, $E(Key \oplus IV)$ and $H(Key \oplus IV)$ are other options] A...
Would this method allow fast authenticated encryption using only a single encryption and RNG operation per block? [updated to version 2]
[I added this approach to [a previous question I asked here](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] **Version 1:** [This was modified from the original version to use a seed as $Key \oplus IV$ instead of just the key, $E(Key \oplus IV)$ and $H(Key \oplus IV)$ are o...
[I added this approach to [a previous question I asked here](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] _Disclaimer: the algorithms I present here (and in other messages) are developed as a hands-on way to learn about developing crypto algorithms, (and might also be of in...
_Disclaimer: the algorithms I present here (and in other messages) are used as a hands-on way to learn about developing crypto algorithms, (and might also be of interest for other curious people), not for practical use (at least not after dozens of iterations and peer-review). I understand some people vote down not jus...
Would this method allow fast authenticated encryption using only a single encryption operation per block? [flawed]
[I added this approach to [a previous question I asked here, that presented a very flawed approach](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] _Disclaimer: the algorithms I present here (and in other messages) are used as a hands-on way to learn about developing crypto al...
Would this method deliver a perfectly non-malleable encryption for at least two blocks? [updated to version 4]
[I added this approach to [a previous question I asked here, that presented a very flawed approach](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] _Disclaimer: the algorithms I present here (and in other messages) are used as a hands-on way to learn about developing crypto al...
Would this method allow fast authenticated encryption using only a single encryption operation per block?
Would this method allow fast authenticated encryption using only a single encryption and RNG operation per block?
Would this method deliver a perfectly non-malleable encryption for at least two blocks?
[I added this approach to [a previous question I asked here, that presented a very flawed approach](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] _Disclaimer: the algorithms I present here (and in other messages) are used as a hands-on way to learn about developing crypto al...
[I added this approach to [a previous question I asked here, that presented a very flawed approach](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] _Disclaimer: the algorithms I present here (and in other messages) are used as a hands-on way to learn about developing crypto al...
[I added this approach to [a previous question I asked here, that presented a very flawed approach](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] _Disclaimer: the algorithms I present here (and in other messages) are used as a hands-on way to learn about developing crypto al...
Given the public key (*n*, *e*) and private exponent (*d*), how to calculate CRT parameters (*p*, *q*, *dP*, *dQ*, and *qInv*) of this RSA key pair?
[I added this approach to [a previous question I asked here, that presented a very flawed approach](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] _Disclaimer: the algorithms I present here (and in other messages) are used as a hands-on way to learn about developing crypto al...
[I added this approach to [a previous question I asked here, that presented a very flawed approach](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] _Disclaimer: the algorithms I present here (and in other messages) are used as a hands-on way to learn about developing crypto al...
Alice encrypts her data with HER secret key. Then she sends the encrypted data to Bob who should encrypt it with HIS secret key. Caroline should then eventually get this double encrypted data. Caroline only wants to receive pseudo-random (looking) data which would only be decryptable for her if Alice and Bob BOTH t...
[I added this approach to [a previous question I asked here, that presented a very flawed approach](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] _Disclaimer: the algorithms I present here (and in other messages) are used as a hands-on way to learn about developing crypto al...
I'm trying to create an algorithm to find the public exponent e given a plain (non-CRT) private key that doesn't include the public exponent. A question [has already been asked](http://crypto.stackexchange.com/q/19139/1172) how easy it would be to find the public key given a private key. The answer was that it was l...
I'm trying to create an algorithm to find the public exponent e given a plain (non-CRT) private key that doesn't include the public exponent, i.e. I've only got $n$ and $d$. A question [has already been asked](http://crypto.stackexchange.com/q/19139/1172) how easy it would be to find the public key given a private k...
I was reading 'Pinocchio Coin' paper by Danezis et al. where they have said, "If we use the efficient pairing groups of Pinocchio, computing discrete logarithms in the exponent field $\mathbb{F}_p$ with p ≈ 256 is easy. We could switch to non-standard and larger pairing groups, but this seems undesirable as it would...
**Edit**: *See the comments, this construction is not provably secure* After some more thought, the answer is "yes", you can construct a hash from a stream cipher. (My other answer from a few days ago was only negative, eg, how *not* to construct it.) Here is a construction. First build a block cipher $B$ from th...
The fastest way to solve your problem instance is as outlined in the above comments. First choose yourself a random message $m$ with $1<m<n$. Now compute $c\equiv m^d \pmod n$. Try if any of the following equations holds, if an equation does hold you've found the public exponent $e$. $m \equiv c^3 \pmod n$<br> ...
[I added this approach to [a previous question I asked here, that presented a very flawed approach](http://crypto.stackexchange.com/q/25891/24458) but was told I should ask it separately] _Disclaimer: the algorithms I present here (and in other messages) are used as a hands-on way to learn about developing crypto al...
The fastest way to solve your problem instance is as outlined in the above comments. First choose yourself a random message $m$ with $1<m<n$. Now compute $c\equiv m^d \pmod n$. Try if any of the following equations holds, if an equation does hold you've found the public exponent $e$. $m \equiv c^3 \pmod n$<br> ...
The fastest way to solve your problem instance is as outlined in the above comments. First choose yourself a random message $m$ with $1<m<n$. Now compute $c\equiv m^d \pmod n$. Try if any of the following equations holds, if an equation does hold you've found the public exponent $e$. $m \equiv c^3 \pmod n$<br> ...
Apple's [latest security documentation][1] indicates that it now uses CTR_DRBG for generating pseudo-random numbers (previously Yarrow instead of CTR_DRBG), using "timing variations during boot" and "interrupt timing once the device has booted" as seeds. Calls to the [iOS API SecRandomCopyBytes][2] will retrieve random...
How many bits of entropy can I expect from /dev/urandom in iOS?
Apple's [latest security documentation][1] indicates that it now uses CTR_DRBG for generating pseudo-random numbers (previously Yarrow instead of CTR_DRBG), using "timing variations during boot" and "interrupt timing once the device has booted" as seeds. Calls to the [iOS API SecRandomCopyBytes][2] will retrieve random...
Are ring signatures possible with elliptic curves? If so how. The original paper by Rivest, Shamir, Tauman seems to require an invertible trapdoor function. But I've only seen algorithms for secret agreement (ECDH for example) with elliptic curves. That doesn't seem to be adequate to complete the ring - don't you need ...
**_The most promising of the 4 approaches described here (version 4) [has been posted as a separate question](http://crypto.stackexchange.com/q/25917/24458). This post should be considered for archiving and historical purposes only._** _Disclaimer: the algorithms I present here (and in other messages) are used as a ...
The fastest way to solve your problem instance is as outlined in the above comments. First choose yourself a random message $m$ with $1<m<n$. Now compute $c\equiv m^d \pmod n$. Try if any of the following equations holds, if an equation does hold you've found the public exponent $e$. $m \equiv c^3 \pmod n$<br> ...
It really depends on the key schedule. IE, how is the key operated on to find the permutation to be used? Absent that knowledge, really the only way to know is to launch searches in parallel at different key lengths, and the one that finds the answer first had the right key length. Unfortunately anything more cl...
Aumann and Lindell defined covert adversaries in 2009 which is informally adversaries which have a epsilon-deterrence to cheat. Some authors (for ex. John R. Wallrabenstein) have defined similar adversaries and called it rational adversaries who act "rationally". I have not seen a simulation-based definition of rationa...
Are covert and rational adversaries same?
I what is the difference between simple hash and random oracle..how to implement. how this, H3 (M, s, IDA) implement? Here M is the message ,s is the key IDA is the identity of user A.
If one wants to set up a decentralized cryptographic enforcement scheme in which the level of 'confidentiality' of information is marked by its position in a poset, why not use Diffie-Hellman to derive the key of a node from its immediate parents? This is as opposed to the tree-based scheme described in [this paper]...
I'll take the question as: how to implement a secure hash function $H3$ with 3 arguments, from one hash function $H$ with 1 argument, all with argument(s) in $\{0,1\}^*$. For a concrete $H$, we could use [SHA3-512][1]. The construction $H3(M,s,I)=H(M\|s\|I)$ where $\|$ stands for concatenation of bitstrings is _not_...
I'll take the question as: how to implement a secure hash function $H3$ with 3 arguments, from one hash function $H$ with 1 argument, all with argument(s) in $\{0,1\}^*$. For a concrete $H$, we could use [SHA3-512][1] followed by a suitable function into $\mathbb Z_p^*$; for example, $x\to H(x)=g^{\operatorname{SHA3-51...
I'll take the question as: how to implement a secure hash function $H3$ with 3 arguments, from one hash function $H$ with 1 argument, all with argument(s) in $\{0,1\}^*$. Note: For a concrete $H$ with the destination set $\mathbb Z_p^*$ thought in the question, we could use [SHA3-512][1] followed by a suitable funct...
I'll take the question as: how to implement a secure hash function $H3$ with 3 arguments, from one hash function $H$ with 1 argument, all with argument(s) in $\{0,1\}^*$. Note: For a concrete $H$ with the destination set $\mathbb Z_p^*$ thought in the question, we could use [SHA3-512][1] followed by a suitable funct...
I'll take the question as: how to implement a secure hash function $H3$ with 3 arguments, from one hash function $H$ with 1 argument, all with argument(s) in $\{0,1\}^*$. Note: For a concrete $H$ with the destination set $\mathbb Z_p^*$ thought in the question, we could use [SHA3-512][1] followed by a suitable funct...
I'll take the [(previous version of the) question][1] as: how to implement a secure hash function $H3$ with 3 arguments, from one hash function $H$ with 1 argument, all with argument(s) in $\{0,1\}^*$. Note: For a concrete $H$ with the destination set $\mathbb Z_p^*$ thought in the question, we could use [SHA3-512][...
I have been searching about if it is more secure to use CBC mode in OTP but I can't find anywhere where people have sad that it is more secure. **Question:** Is CBC mode in OTP more secure? Because I have been reading articles like "https://stackoverflow.com/questions/22212407/how-to-alter-cbc-encrypted-text-to-c...
One time pad in CBC mode?
> Is CBC mode in OTP more secure? No. If your one time pad satisfies the required properties (it's truly random, the attacker has no information about it, and it's only used once), then OTP already has perfect secrecy; playing around with how it works can't make things better. If your one time pad doesn't satisf...
If one wants to set up a decentralized cryptographic enforcement scheme in which the level of 'confidentiality' of information is marked by its position in a poset, why not use Diffie-Hellman to derive the key of a node from its immediate parents? This is as opposed to the tree-based scheme described in [this paper]...
If one wants to set up a decentralized cryptographic enforcement scheme in which the level of 'confidentiality' of information is marked by its position in a poset, why not use Diffie-Hellman to derive the key of a node from its immediate parents? This is as opposed to the tree-based scheme described in [this paper]...
If one wants to set up a decentralized cryptographic enforcement scheme in which the level of 'confidentiality' of information is marked by its position in a poset, why not use Diffie-Hellman to derive the key of a node from its immediate parents? This is as opposed to the tree-based scheme described in [this paper]...
If one wants to set up a decentralized cryptographic enforcement scheme in which the level of 'confidentiality' of information is marked by its position in a poset, why not use Diffie-Hellman to derive the key of a node from its immediate parents? This is as opposed to the tree-based scheme described in [this paper]...
What is the difference between **H(M)** and **H3(M, s, IDA)**? I am aware of Hash function with a Message and a Key, but there are three parameters in: **H3(M, s, IDA)**. Here **M** is the message, **s** is the key, and **IDA** is the identity of user A.
What is the difference between H(M) and H3(M, s, IDA)?
For calculating accumulated values for set of elements chosen randomly from say $ { e_1 ,e_2,...e_n}\varepsilon X $ we use the formula $acc= g^{f(e,s)}$ where $ f(e,s)= (e_1+s)(e_2+s).....(e_n+s)$ then the witness for $e_k$ is calculated as $wit_{e_k} =$ $ g^ {\Pi(e_i+s)} $ where $i \ne k $ (ie accumulating all va...
The fastest way to solve your problem instance is as outlined in the above comments. First choose yourself a random message $m$ with $1<m<n-1$. Now compute $c\equiv m^d \pmod n$. Try if any of the following equations holds, if an equation does hold you've found the public exponent $e$. $m \equiv c^3 \pmod n$<br>...
I can precompute the key stream for the CTR mode operation and the encryption at that point is similar to a stream cipher. So why are there stream ciphers still used and proposed after RC4? Recently the ChaCha20 as part of the ChaCha20-Poly1305 AE cipher. Are there advantages to using a stream cipher especially?
What does a stream cipher provide that cannot be obtained with AES CTR mode operation?
AES-CTR _is_ a stream cipher, of a particular kind where the keystream is obtained by encryption of a counter. So the question reduces to: what are drawbacks of AES-CTR compared to other stream ciphers? The main ones compared to ChaCha20 are: 1. Without hardware support, AES can fail to [cache-timing attacks][1]....
First, AES-CTR isn't "similar to a stream cipher." It *is* a stream cipher. That means the real question is "why do we develop new stream ciphers when AES-CTR provides an acceptable one?" The answer is that newer stream ciphers tend to be superior to AES in some way or another. AES is a secure cipher, but it has som...
AES-CTR _is_ a stream cipher, of a particular kind where the keystream is obtained by encryption of a counter. So the question reduces to: what are drawbacks of AES-CTR compared to other stream ciphers? The main ones compared to ChaCha20 are: 1. Without hardware support, AES can fail to [cache-timing attacks][1]....
Without knowing the exact implementation you are using, from the algorithm name, I think you are generating a random key for the symmetric cipher and encrypting that with the RSA key. This way your ciphertexts will be unique. I would recommend using a cipher mode that provides integrity protection, such as [AES-GCM]...
Are there any practical limitations? Govt driving license, passport, SSN could be digitally signed making it easy for anyone to validate. They can have a qr code in them which can be easily validated using an android or ios app offline if the corresponding public key is pre installed. This will make fake ids impossible...
Why is public key cryptography not widely used in governments?
"Before round 1 begins, all 64 bits of an incoming message and all 56 bits of the secret key are seperately permuted (shuffled)" My question is this : Is the shuffling of the bits performed randomly? If it is performed randomly then how does the reciever decrypt the message successfully even though he/she does not k...
Does the encryption algorithm DES perform random permutations? If so how is information not lost?