49
votes
Accepted
7zip : Why does encrypting the same file with AES-256 not give the same output?
This is expected behavior since 7zip uses Cipher Block Chaining (CBC) mode for encryption. For which you need the Initialization Vector (IV) to be unique and unpredictable.
It was using 64-bit IV but ...
48
votes
Accepted
Why was AES CBC removed in TLS 1.3?
Short: CBC mode in context of TLS protocol has had security issues, and would have had to be reworked.
AES-CBC mode combined with decent HMAC can be as secure as AES-GCM. However, combining the ...
22
votes
Accepted
Why does "2xAES-256" provide "99.99%" security strength whereas "1xAES-128" provides "40%"?
It's meaningless nonsense. I would be inclined to avoid spending any money with these people. If you scroll down on this page, you'll find a table labelled key size vs. time to crack, according to ...
21
votes
Accepted
Is there any area where AES-CBC cannot be used ? If so, why?
CBC does not perform authentication
This property makes it less suitable for places where authentication is required, basically any transport protocol. TLS uses CBC, but by default performs ...
Community wiki
20
votes
Why is CBC with predictable IV considered insecure against chosen-plaintext attack?
If your IV is predictable this is as (in)secure as assuming that you have a zero vector IV.
And a zero vector IV allows you to perform a so-called Adaptive Chosen Plaintext Attack (ACPA).
Why?
...
20
votes
7zip : Why does encrypting the same file with AES-256 not give the same output?
Encrypting the same input multiple times, normally, is supposed to produce different outputs each time. This is so that an eavesdropper not only cannot tell that the input was ...
18
votes
Accepted
Why is padding used in CBC mode?
So, I'll answer the theoretical part of your question, since we need a key to address the practical part.
Why is padding used in CBC?
Blockcipher such as AES are encrypting blocks of a fixed given ...
17
votes
Why not authenticate full-disk encryption?
Authentication and probabilistic encryption are two desirable features which each take up a small amount of extra space. And you are absolutely right that the percentage of space consumed is of no ...
17
votes
Why was AES CBC removed in TLS 1.3?
TLS 1.3 is a reboot of the TLS protocol which focused on up to date cryptography rather than backwards compatibility.
Now CBC is not as secure as you make it to be, and the way that it was used in TLS ...
16
votes
Accepted
Bit Flipping Attack on CBC Mode
The Bit Flipping attack
Decryption process in CBC mode is performed as
\begin{align}
P_1 =& Dec_k(C_1) \oplus IV\\
P_i =& Dec_k(C_i) \oplus C_{i-1},\;\; 1 < i \leq nb,
\end{align}
where $nb$...
14
votes
Why should I use an Initialization Vector (IV) when I have unique keys?
You should use random IV even when unique keys are used.
This prevents key-collision attack where the attacker collects number of cryptograms that have been encrypted with unique keys and brute-...
14
votes
Why not authenticate full-disk encryption?
So, are there reasons for not using authentication that I'm missing?
I believe that the real reason is not actually space, but time.
As you said, storing the tags would not require that much space. ...
13
votes
Difference between a nonce and IV
With CBC mode the initialization vector is referred to as IV, because it is not nonce. There are ways to construct nonce so that it does not meet the needs of CBC mode. Random IV is one generation ...
13
votes
Accepted
Why not authenticate full-disk encryption?
With 4096-byte sectors, space is a complete non-issue, less than 1 %
Problem 1: 10GB per TB is not a "complete non-issue" for many people.
Problem 2:
If the checksums are inside of their data ...
13
votes
Accepted
Are there any benefits to using ECB over CBC?
ECB benefits:
It's a tiny bit easier to implement.
It allows for parallel encryption and decryption (CBC only decryption).
A single corrupted cipher block corrupts only one block of plain text(in ...
13
votes
Is DES secure under CBC?
No, it will be insecure. There are two reasons;
Due to the smaller key size 56-bit; DES was tested for brute-force attack since published.
DES_CHALL, 96 days to find the CES challenge key in 1997.
...
12
votes
Accepted
Error propagation in CBC mode
In CBC mode the decryption equation is $P_i = D_k(C_i) \oplus C_{i-1}$. If you received a corrupted $C_i$, $P_i$ and $P_{i+1}$ will be decrypted wrong, but $P_{i+2}$ no longer depends on $C_i$ and ...
12
votes
Accepted
Why can't we use the first block of AES-CBC as MAC
The MAC value should be calculated over all of the input, not just the first block. The chaining of CBC makes sure that the bits in the last block of ciphertext depends on all the previous blocks.
12
votes
Predictable, but private IV in CBC
If a nonce $N_i$ is even, then the binary numeral for it its increment $N_{i+1} = N_i + 1$ differs from $N_i$ only in its least significant bit; and if $N_i$ is odd, its increment is even. This means ...
12
votes
Accepted
What is the correct way to implement PBKDF2 + AES CBC + HMAC?
You'll find there's a lot of splitting hairs regarding this topic, especially key derivation. But yes, your pseudocode is fine, although you may want to revise (0, 128) => (0, 127) and (129, 256) => (...
12
votes
Random data CBC padding scheme?
Padding is dangerous. CBC mode with padding is secure against chosen-plaintext attacks, where the adversary can convince the legitimate party to encrypt messages and obtain the ciphertexts. But it is ...
11
votes
Accepted
Modes of operation that allow padding oracle attacks
In the padding oracle attack you have an oracle that only tells you whether a particular chosen ciphertext decrypts to a correctly padded plaintext. That oracle is used to build a last word oracle, ...
11
votes
Why is CBC with predictable IV considered insecure against chosen-plaintext attack?
The answer by mwhs is very wrong about CBC-MAC and its use of IV!! It is perfectly fine and secure to use the same IV for CBC-MAC! In fact, Jonathan Katz and Yehuda Lindell recommend using zero vector ...
11
votes
Accepted
Why is Fernet only AES-128-CBC?
This seems to me to be less secure...
Do you have a plausible adversary that can break AES-128? AES-128 is believed (to the best of knowledge) to require $O(2^{...
11
votes
Accepted
CBC-Mode Infinite Garble Extension
The infinite garble extension makes sure that if a ciphertext block is changed that this block and each block after it doesn't decrypt correctly. The way that additional plaintext is affected when the ...
11
votes
Are there any benefits to using ECB over CBC?
From a theoretical point as a mode of operation ECB mode has only one advantage over all of the other modes: it doesn't require an IV. That means that the ciphertext doesn't expand if the message is a ...
10
votes
AES key equal to IV (CBC mode)
In this answer I'm assuming that a key is used to encrypt more than one message.
The first weakness is that CBC with fixed IV leaks if messages share a common prefix.
The second weakness is that it ...
10
votes
mode of operation in cryptography
I would pick e) none of the above. None of those modes offers integrity protection, so unless integrity is handled elsewhere, your application is wildly insecure. An attacker could modify bits in ...
10
votes
mode of operation in cryptography
You would not just need a mode of operation for what you're asking. What you need is a secure transport protocol. Probably the best well known one for TCP connections is TLS of course. For UDP ...
10
votes
Why was AES CBC removed in TLS 1.3?
from what I know CBC is the most secure Mode of operation for the AES block cipher
I'm not exactly sure why you say this; however, there has been a couple of practical problems with CBC mode in the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
cbc × 459aes × 226
encryption × 106
initialization-vector × 98
block-cipher × 70
modes-of-operation × 52
cbc-mac × 39
ecb × 35
padding × 34
tls × 29
hmac × 23
padding-oracle × 23
ctr × 21
mac × 19
symmetric × 16
gcm × 16
chosen-plaintext-attack × 14
des × 13
openssl × 12
xor × 12
cryptanalysis × 11
authenticated-encryption × 11
keys × 10
attack × 10
rsa × 8