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
1 answer
127 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 ...
user avatar
0 votes
0 answers
101 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$ = ...
Dario Blair's user avatar
1 vote
0 answers
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 ...
Dario Blair's user avatar
0 votes
1 answer
86 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 ...
Dario Blair's user avatar
1 vote
1 answer
473 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-...
tenepolis's user avatar
  • 113
0 votes
1 answer
347 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 = ...
OughtToPrevail's user avatar
1 vote
1 answer
827 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 ...
SEJPM's user avatar
  • 45.7k
1 vote
2 answers
2k 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 ...
voices's user avatar
  • 117
2 votes
1 answer
448 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?
randomjsmash's user avatar
1 vote
0 answers
138 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 ...
user67441's user avatar
0 votes
0 answers
280 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): ...
Loeli's user avatar
  • 111
5 votes
2 answers
1k 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 ...
Maarten Bodewes's user avatar
  • 91.9k
1 vote
1 answer
359 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 ...
user67220's user avatar
2 votes
1 answer
253 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 ...
Mick's user avatar
  • 23
0 votes
2 answers
123 views

Randomly initialised global counter used to encrypt the kth message with $\operatorname{IV} = \operatorname{IV} + k \hspace{5mm} mod \hspace{5mm} 2^n$ [duplicate]

The use of an increasing IV is not secure for a block cipher. That is, using a random IV for the first message then $\operatorname{IV} + 1$ for the second , $\operatorname{IV}+ 2$ for the 3rd etc. How ...
Kivi's user avatar
  • 1
1 vote
1 answer
374 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 ...
pavja2's user avatar
  • 111
4 votes
1 answer
5k views

Length of password requirement using openssl aes-256-cbc

I am using the following OpenSSL command to AES 256 encrypt a file: ...
Justin's user avatar
  • 143
11 votes
0 answers
2k 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 on its advantages against CBC ...
OughtToPrevail's user avatar
0 votes
0 answers
1k views

Aes brute force when part of data known [duplicate]

I have buffer of 16 bytes that encrypt with AES 128 cbc with IV =000000......(all IV is 0) I have the encrypted buffer, and I know 7 bytes from 16 bytes before the encryption , I dont know the key . ...
Keystone's user avatar
  • 101
0 votes
2 answers
4k 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 ...
Adri's user avatar
  • 1
2 votes
1 answer
931 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 ...
nachofest's user avatar
3 votes
1 answer
3k views

AES-CBC Padding: Why always attach 16x 0x10 pad?

Why do we have to always attach a 16x 0x10 pad even though the last block is already at block-length?
Nime's user avatar
  • 165
1 vote
1 answer
710 views

AES-256-CBC with random IV - storing same plaintext as same ciphertext

I am encrypting some information stored in a column of a MySQL database. The column can contain repeated values, let's say the table has 7 rows and the column to be encrypted has the following values:...
user65131's user avatar
2 votes
1 answer
570 views

Plaintext Size Limit for ECIES with AES-128 CBC mode

Using the ECIES (Elliptic Curve Integrated Encryption Scheme), is there a limit size of plaintext? (what is the maximum allowed number of bytes to be encrypted with ECIES).
SAliaMunch's user avatar
1 vote
1 answer
8k views

Decrypt simple CBC with XOR

I have searched and my problem is exactly the same as shown here: Decrypt simple CBC message with known IV using XOR encryption However, when I implement the solution it doesn't work, neither does ...
Akke's user avatar
  • 23
2 votes
2 answers
184 views

Safely erasing encrypted data

My secret message is encrypted in a byte buffer with AES-128 in CBC mode. The first 16 bytes are the IV and the message follows contiguously. If I want to securely delete this message is it enough ...
DrPhill's user avatar
  • 193
17 votes
1 answer
27k views

Bit Flipping Attack on CBC Mode

To perform a bit flipping attack, the previous block is modified by using XOR. This results in an altered plaintext. However, now the ciphertext of the previous block is altered, hence it will result ...
CXB's user avatar
  • 311
3 votes
1 answer
438 views

Security of AES after key expansion 4-MB with ECB and CBC

My question is, how does the security depend or change if I encrypt with AES-128 in total 4-MB of Data? With Electronic Code Book Mode and Cipher Block Chaining Mode ? Does an adversary still ...
barium borat's user avatar
2 votes
2 answers
1k views

The attacker model of the Lucky13 attack in TLS

Lucky13 is a timing attack against the MAC in the CBC MAC-then-encrypt ciphersuites. In the attack's page: The attacks involve detecting small differences in the time at which TLS error messages ...
user9371654's user avatar
2 votes
2 answers
875 views

Replacement for XOR in CBC?

In CBC mode, the XOR operation is used to combine the previous encrypted block with the current plaintext, to be used as the block to encrypt. Apart from other known disadvantages inherent to the mode ...
Pedro Gimeno's user avatar
1 vote
1 answer
1k views

What happens if CBC-mode uses the same IV for all processes?

In Cipher Block Chaining (CBC) mode, each block of plaintext is XORed with the previous ciphertext block before being encrypted. What happens if I use the same IV instead of the previous ciphertext ...
Anh Đức Lương's user avatar
1 vote
2 answers
2k views

CBC related TLS cipher suites to be disabled in the server side

I understand the TLS cipher suites using CBC mode are susceptible to timing attacks. From that understanding it seems that the cipher suites using GCM (CTR-based) are safe to use considering they don'...
Saptarshi Basu's user avatar
1 vote
1 answer
441 views

With DES, is ECB encryption mode equivalent to CBC with null IV for short data blocks?

I got to this by experimentation, but can someone maybe provide an explanation for this?
bbozo's user avatar
  • 277
1 vote
1 answer
1k views

How is a PRP different from PRF? Both can be inverted to get the same input

PRP is said to be a bijective function which means that there is a one-to-one mapping with the output. And hence the output can be inverted using the decryption algorithm to get the same input. ...
Saptarshi Basu's user avatar
-5 votes
1 answer
391 views

AES without mode operation

i have field in database. ex: field name. this field maybe more than 16 byte. how to encrypt data more than 16 byte without cbc, etc? any function or another ways to do this?
Clarys's user avatar
  • 9
5 votes
1 answer
4k views

Is DES secure under CBC?

I know DES is outdated, but will is is secure in CBC mode? Can anyone help me understand why not?
Jorge's user avatar
  • 51
3 votes
1 answer
4k 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 ...
Kazh's user avatar
  • 33
1 vote
1 answer
89 views

What happens if the plaintext $m1$ from the first block of CBC is known to adversary?

The adversary is has unlimited access to the encryption oracle. My thinking is that upon receiving the ciphertext C = $<c_0,c_1,c_2...,c_n>$ it will just use $c_0$ to XOR it with $F_k(m_1)$ to ...
Awesoemness Yeah's user avatar
0 votes
1 answer
880 views

Recovery of private key in AES-CBC from two ciphertexts with different IV, but identical plantext

I have a system that encrypts messages for a given user using key K using AES-CBC in response in an external stimulus. Each message has a randomly generated IV. The user never decodes these messages,...
Anonimoak's user avatar
1 vote
1 answer
1k views

Which block cipher mode to use?

I am working on securing a chat application, and I am not sure about which block cipher mode I should use. I am aware that I should avoid ECB as it's insecure, but what about CBC? I have watched ...
Bana's user avatar
  • 11
1 vote
1 answer
3k views

Decrypting an encrypted aes 256 cbc text with random IV, decrypts the string [duplicate]

This may be a basic question but bear with me. I started encrypting a text with aes 256 cbc mode generating a random iv of 16 bytes and a key. ...
Suman Lama's user avatar
2 votes
1 answer
4k views

Is AES-CBC mode not secure against chosen cipher-text attacks even if the IV is not predictable?

I've seen questions where people have asked if AES-CBC mode is vulnerable to chosen cipher-text attacks if the IV is predictable. But is it guaranteed to be secure against chosen cipher text attacks ...
Timal Peramune's user avatar
2 votes
2 answers
267 views

Encrypting current time using 3DES as a signature

I came across a peculiar system for generating "signatures" ("signatures" is within quotes because this is a bad use of 3DES) in the wild. It works as follows: a symmetric key is generated and used ...
Kyb3r's user avatar
  • 33
2 votes
1 answer
726 views

Cipher Block Chaining (CBC) encryption in SSL

Is cipher block chaining (CBC) mode used in SSL encryption? If block reordering is already protected by SSL and TCP sequence numbers, what added advantage does CBC provide?
user2896215's user avatar
2 votes
2 answers
2k views

Cipher Block Chaining Ciphertext Alteration

I am new to cryptography. My professor's slides say that "Disadvantage: altered ciphertext only influences two blocks" for the CBC. However, since we xor the ciphertext from the previous block and the ...
Ninja Bug's user avatar
  • 319
6 votes
2 answers
2k 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 ...
amad-person's user avatar
1 vote
2 answers
119 views

How to provide partial confidentiality and full integrity for a protocol message?

I want to provide confidentiality and integrity for a protocol. I don't want to encrypt the entire protocol message. I do not want to encrypt the header and timestamp of the protocol message, but I ...
Aymn Alaney's user avatar
0 votes
1 answer
335 views

Can I use PKCS#5 with CBC? [duplicate]

As far as I know there are two padding mechanisms, which are PKCS 5 and 7. Which one should be used for CBC?
Aymn Alaney's user avatar
5 votes
3 answers
6k views

When do I need to use CBC and HMAC?

As I know CBC does not provide integrity for the message, thus HMAC is used to provide integrity for CBC message. Also, I hear about CBC-MAC which can provide integrity and confidentiality. Which one ...
Aymn Alaney's user avatar
1 vote
1 answer
434 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, ...
dragonroot's user avatar

1 2 3
4
5
10