Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [cbc]

Cipher block chaining (CBC) is a method for encrypting large amounts of data with a block cipher that can only encrypt fixed length plaintexts. When used with an unpredictable initialization vector (IV), it is secure against chosen plaintext attacks (CPA-secure).

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

Finding key for AES-128-CBC knowing plaintext, ciphertext, IV, and a long list of possible keys

I have an extra credit assignment in school and I am having a lot of trouble trying to figure this one out. I'm new to cryptography and this is the first class that I've really been exposed to it. I ...
2
votes
3answers
383 views

AES-CBC with zero IV and a unique first block

Is it safe to generate the IV for AES-CBC as the following? It's like the real IV is all zeros. The first block of data will be a low-entropy but unique data. Once the first block is encrypted, the ...
0
votes
2answers
129 views

Is it required to use a random IV for AES-CBC with random key per message? [duplicate]

I'm developing a program to encrypt and decrypt a file with AES-256/CBC in Java. And I want it to be safe enough. In my case, I generated random AES key for each file to encrypt and decrypt them. My ...
0
votes
1answer
39 views

For CBC, if the initialization vector is corrupted, can we still decrypt the message?

Actually, I think IV (initialization vector) is random number which is same size as the other block of plaintext. But if the IV is corrupted, message cannot be decrypted because original IV used to ...
1
vote
1answer
36 views

Is it possible to narrow down the possible keys used for AES CBC encryption, knowing a given plaintext and its ciphertext, where IV=0? [duplicate]

I'm brute forcing a ciphertext with a given dictionary to figure out which key was used. However, it's been hinted at that there is a way to narrow down the dictionary to a smaller subset of ...
2
votes
2answers
53 views

using different IV and SALT with AES-CBC but same KEY

I'm working on this project where a client can send a message, now obviously sending it in plainText is not very smart. So I decided to Encrypt it with AES-CBC. Now, each time I encrypt something, ...
0
votes
0answers
31 views

Initialization Vector in CBC/DES encryption [closed]

How can i prove that the Initialization Vector is always set to zero in the Cryptool when using CBC or ECB/DES mode?
3
votes
2answers
941 views

Choice of padding scheme to prevent CBC padding oracle attacks?

I was watching a lecture about the padding oracle attack on CBC mode block ciphers, where the padding scheme used was PKCS#7. My question is can padding oracle attacks be prevented (without any use ...
1
vote
3answers
66 views

AES Cipher Block Chaining 128 bit message

I understand that for AES CBC you need to split the plaintext up into blocks and perform XOR'ing using the previous blocks calculations etc. However, if your message is exactly 128 bits long, do you ...
2
votes
1answer
70 views

In CBC mode if 2 cipher blocks are same then is CBC still secure?

I was going through this question Why is it said that if we have a duplicate ciphertext block it can leak our information? and I was just wondering if there is a $P_i \oplus P_j= C_{i−1}\oplus C_{j−1}...
0
votes
0answers
61 views

Encrypt AES with 2 different keys but the same IV [on hold]

Let's say I have 2 messages like hi and bye. I will encrypt hi with ...
0
votes
1answer
44 views

AES key vs sector key

I have read about AES and different modes of operation (CBC, ECB etc) and have 2 questions related to disk encryption: -AES data block is 16 bytes - how does it relate to sector sizes on the drive ...
3
votes
2answers
216 views

What's the reason for Monte Carlo tests for block ciphers?

NIST specifies that implementations were required to create Monte Carlo test vectors for ECB and CBC mode for the AES competition. What's the reason for these tests? The only thing I can think of is ...
1
vote
1answer
31 views

XCBC Authentication

So XCBC was made to counteract lengths attacks against CBC-MAC, but how exactly does the modification made defeat this attack? All I can find are a few papers on why 2-key XCBC isn't actually secure.
1
vote
1answer
50 views

Block cipher linearity (in relation to hill ciphers)

So while I knew hill ciphers were a form of block cipher (I'm assuming all the ones I have solved to date were ECB or something similar), so that got me thinking. Is it possible to use hill ciphers in ...
0
votes
2answers
284 views

DIY over-encryption with a related key

I know next to nothing about cryptography, which is bad because I'm a programmer. I was exploring some code the other day and the encryption part of it seemed a little strange to me. I'd like the name/...
0
votes
0answers
14 views

Are there any specific weakness in this crypto implementation?

I am reverse engineering the firmware of a particular router/modem. I am focusing on the functionality to export the router configuration. I an searching for a way to decrypt the configuration backup ...
5
votes
2answers
1k views

Why does error propagation in CBC mode encryption affect two blocks?

From Wikipedia: Error propagation It was common to discuss the "error propagation" properties as a selection criterion for a mode of operation. It might be observed, for example, that a one-...
0
votes
1answer
42 views

Randomly initialised global counter used to encrypt the kth message with IV = IV + k mod 2^n

The use of an increasing IV is not secure for a block cipher. That is, using a random IV for the first message then IV + 1 for the second , IV + 2 for the 3rd etc. How can I construct an attack to ...
1
vote
1answer
174 views

Is the Java function AES/CBC/PKCS5Padding vulnerable to padding oracle?

I have an application that stores data on the devices. Currently AES/CBC/PKCS5Padding from javax.crypto.Cipher(see reference) is ...
5
votes
1answer
571 views

AES CBC with unique key per message, but fixed IV

I'm working on a project with a scheme in which c[i] = AES-CBC-Encrypt(msg_key[i], IV, msg[i]), and two distinct plaintexts never have identical keys. ...
0
votes
1answer
50 views

Make AES CBC more secure by destroying each block? [duplicate]

Assume AES in CBC mode is used to encrypt an arbitrary file. The key and the IV are generated out of secure random data and are both different for each file and of proper length and strength. Then the ...
2
votes
1answer
44 views

Is AES-GCM suitable for per chunk encryption?

I was looking through Google's encryption flow and noticed that they split each file into chunks and then encrypt each chunk individually with AES-GCM with its own key. Since AES-GCM starts to get ...
0
votes
1answer
50 views

It is the IV shared in CBC mode?

I don't know if the IV in CBC mode is equal in both sides of the encryption and decryption operations. I know that the IV must be unpredictable, but has it to be MACed in the encryption side to be ...
1
vote
1answer
170 views

Alter plaintext through IV in block cipher AES in CBC mode

IV: 69bb375aa919c72aa561dd7b7ffacf66 Ciphertext: "c28ea025d10186510855d083747d6435c808d9857075abd9bfc54b094e60eaf3" Plaintext: "SEND ENCRYPTED DATA" I want to be able to change the resulting ...
4
votes
1answer
2k views

Encrypting (CBC) identical files with same key and different IV, is it less secure?

I would like to learn more about cryptography. Let's say you encrypt multiple files with CBC encryption using the same key, but each file has a unique (and pseudorandom) IV. Does this weaken the ...
0
votes
0answers
40 views

Alter CBC plaintext by altering IV [duplicate]

I am building on this answer. Essentially I have an initialisation vector $iv$, a ciphetext $c$ and a plaintext $p$. The plaintext was encrypted using AES CBC. The aim is to modify the first 4 ...
0
votes
1answer
57 views

Symmetric encryption construction (meet-in-the-middle attack)

This is a question I had from an exercise session. First we do DES in CBC encryption mode using a key $K_1$ and $IV_1 = O^n$. Then we do DES in ECB decryption mode using $K_1$. And then DES in CBC ...
0
votes
1answer
23 views

Collision Security

Question concerning collision issue in CBC-mode: If we are using CBC mode with AES for 1 message, the birthday paradox indicates that we risk a collision after 2^(n/2) so 2^64 plaintext of 128 bits of ...
-1
votes
1answer
113 views

Retreive secret key and IV knowing the plaintext and ciphertext?

If I use AES-128 in CBC mode, and I know the plaintext, ciphertext, and length of the plaintext padding, which is 15, can I retrieve the key and IV, using brute force or some special techniques?
5
votes
1answer
3k views

AES in CBC Mode Is totally unsecure if no defense is provided for padding oracle attack, right?

Based on a lot of reading here on crypto.stackexchange.com and around the web, it seems like AES in CBC Mode is totally unsecure if no defense is provided for oracle padding attack. And it’s not just ...
1
vote
1answer
129 views

How does the CBC Padding Oracle Attack work in General?

Right now we don't have a single generalized question asking how the CBC padding oracle attack works. We have e.g. this one and this one but the former is distracted by the concrete values being ...
0
votes
0answers
40 views

Meet-in-the-middle attack (different block cipher modes)

Does a meet-in-the-middle attack on depend on the used modes for block ciphers? encryption: $C_i$ = $D_{K2}$($D_{K1}$($E_{K1}$($P_i$ $\oplus$ $C''_{i-1}$))) $\oplus$ $C'_{i-1}$ and $IV_1$ = $C''_0$ = ...
1
vote
0answers
31 views

Meet-in-the-middle attack (on custom encryption scheme) [duplicate]

This is a question I had from an exercise session. Exercise: First we do DES in CBC encryption mode using a key $K_1$ and $IV_1 = O^n$. Then we do DES in ECB decryption mode using $K_1$. And then DES ...
0
votes
0answers
29 views

Does the oracle have to have access to the encryption key to the padding oracle attack to work (CBC & PKCS#7)?

Does the oracle have to have access to the encryption key to the padding oracle attack to work (CBC & PKCS#7)? I tried much to get a attach to work, but the oracle doesn't have access to the ...
1
vote
1answer
180 views

Cipher Block Chaining - How do you change the plaintext of all blocks?

I've just read about CBC encryption and decryption and was wondering how you can change every plaintext block? Let's say you have an initialization vector, 3 ciphertext blocks, know each block-cipher-...
0
votes
1answer
70 views

Signal Protocol Header key encryption initialization vector

In Signal Protocol when you use a Double Ratchet you have 2 options: Normal encryption = header + ciphertext Encrypted header encryption = ...
1
vote
2answers
218 views

What are the implications of XORing ciphertext with plaintext?

I was intrigued by this question: Does adding complexity mean a more secure cipher? And it led me to wonder: What are the implications (if any) of XORing a ciphertext with the original plaintext ...
3
votes
1answer
372 views

How does padding oracle attack work with bytes larger than possible length?

I am trying to understand how the POODLE attack would actually be implemented. In the original security advisory from Möller, Duong and Kotowicz [POODLE 14] the following example is presented: ...
3
votes
1answer
2k views

Why can't decrypt with OpenSSL if salt changed (for CBC and ECB)

A file encrypted with OpenSSL (with, for example, AES 256-bit mode CBC) using the Linux command openssl enc -aes-256-cbc -in texte -out encrypted_texte -k password ...
1
vote
1answer
126 views

What is the Risk of Rotating Keys

This may be a difficult question So, $C_1$ = AES-GCM($k_1$, nonce, message) where nonce = HMAC(key,message). $C_2$ = AES-CBC($k_2$, iv, $C_1$). Now, a security breach occurs. The adversary obtains ...
1
vote
1answer
149 views

Can blocks in AES-CBC ciphertext be manipulated in such a way that plaintext becomes shuffled?

Say we have a sequence of N 16-byte plaintext blocks encrypted using AES in CBC mode, with an IV, resulting in N+1 16-byte ciphertext blocks. Can this ciphertext be manipulated in such a way that, ...
1
vote
1answer
86 views

Reverse the order of encryption and decryption in CBC mode. Does this work?

To encrypt a message, one uses the algorithm for doing a CBC decryption. To decrypt a message, one uses the algorithm for doing a CBC encryption. Does this work?
1
vote
0answers
62 views

How to implement correctly a “secure” authentication protocol? [closed]

Due to my lack of knowledge in this matter I am facing some problems to identify which features are sign of a bad implementation of a symmetric authorization application. As I am concerned the system ...
0
votes
0answers
54 views

How to change the known ciphertext so the known plaintext is changed in AES CBC mode?

I already read a blog about the padding oracle and also some posts about how to change the plaintext but it didn't work out. So I have the encrypted cookie (AES_CBC): ...
2
votes
1answer
73 views

How do i approach file encryption using encrypt-then-mac? [duplicate]

I'm programming a cryptographic application that encrypts files, locked with the password the user supplies. It's not intended to be used in production. It's a project for me to learn more about ...
1
vote
1answer
90 views

IV Re-use and Chosen Plaintext against 56bit Blowfish (CBC)

I am looking at a very old protocol which uses Blowfish to encrypt packets with a constant 8-byte IV in CBC mode. Assuming I have: The ability to arbitrary encrypt known plaintexts The IV I know ...
2
votes
1answer
450 views

Length of password requirement using openssl aes-256-cbc

I am using the following OpenSSL command to AES 256 encrypt a file: ...
6
votes
0answers
315 views

Why does the Signal protocol use AES/CBC instead of AES/GCM?

AES/GCM has obviously proved itself to be better than AES/CBC. Unless the key is re-used with the same initialization vector (see disadvantages of GCM). More information of its advantages against CBC ...
2
votes
1answer
154 views

Why is a one-time MAC secure for MAC-then-encrypt with randomized-CTR but not randomized-CBC?

The Coursera cryptography 1 course says: If you want to use MAC-then-encrypt mode then you should either use randomized-CTR or randomized-CBC. And if you use randomized-CTR then one-time-MAC ...