Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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).

0
votes
1answer
53 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 ...
1
vote
2answers
172 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 ...
1
vote
1answer
60 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
45 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
42 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): ...
4
votes
2answers
97 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
115 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 ...
2
votes
1answer
62 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 ...
0
votes
1answer
35 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
46 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
68 views

Length of password requirement using openssl aes-256-cbc

I am using the following OpenSSL command to AES 256 encrypt a file: ...
4
votes
0answers
173 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 ...
0
votes
0answers
36 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 . ...
0
votes
2answers
80 views

Question about IV from CBC/AES-256

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 ...
1
vote
1answer
101 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 ...
3
votes
1answer
567 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?
1
vote
1answer
67 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:...
1
vote
1answer
62 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).
1
vote
1answer
169 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 ...
2
votes
2answers
97 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 ...
5
votes
1answer
943 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 ...
3
votes
1answer
328 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 ...
2
votes
2answers
526 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 ...
2
votes
2answers
176 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 ...
1
vote
1answer
329 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'...
1
vote
1answer
194 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?
0
votes
1answer
197 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. ...
-5
votes
1answer
89 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?
3
votes
1answer
747 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?
3
votes
1answer
921 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
64 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 ...
0
votes
1answer
115 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,...
-1
votes
1answer
249 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 ...
1
vote
1answer
518 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. ...
1
vote
1answer
634 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 ...
1
vote
2answers
80 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 ...
1
vote
1answer
226 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?
1
vote
2answers
377 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 ...
3
votes
2answers
690 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
2answers
57 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 ...
0
votes
1answer
180 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?
3
votes
3answers
1k 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 ...
1
vote
1answer
108 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, ...
0
votes
1answer
74 views

Encryption / Decryption method secure

I was wondering whether this encryption / decryption flow is very solid / secure. I encrypt the data using AES CBC 256 bit with an static IV. When the user logs in with his Firebase account (first ...
0
votes
2answers
174 views

TLS1.2 AES 128 CBC Encrypted Data size is not a multiple of block size [closed]

I know that TLS ciphers such as TLS_RSA_WITH_AES_128_CBC_SHA transmit data as shown https://tools.ietf.org/html/rfc5246#section-6.2.3.2. From my understanding the ciphertext MUST be a multiple of the ...
4
votes
0answers
175 views

AES key reuse between CTR and CBC

The question Given the same plaintext content that is encrypted two times. One time with AES-CTR and the other time with AES-CBC. Both times with the same AES key but with different IVs. What are ...
2
votes
1answer
198 views

Is it safe to use unauthenticated AES CBC when encrypting random bytes?

I am studying an application with an AES crypto implementation that works that like the following: PBKDF2 is used with X iterations and SHA-256 to generate a 256-bit "master key" from a user-provided ...
-1
votes
1answer
526 views

How can you change this message which is in block cipher AES-256 in CBC?

Given is the secret message encrypted with AES-256 in CBC mode 5a04ec902686fb05a6b7a338b6e07760 14c4e6965fc2ed2cd358754494aceffa The first 16 Byte is the initial ...
3
votes
1answer
82 views

Propagating CBC insecure Authenticated Encryption

why is Propagating CBC (PCBC) insecure for authenticated encryption? I received the hint that I should feed a message of length $n$ and a message of length $n-1$ to it, but I don't really get what the ...
2
votes
2answers
81 views

How much data do I leak if I use the first bytes of a file as AES-CBC IV?

I found a piece of code that uses the first 16 bytes of the input file as IV. This immediately set off some flags in my head, but I have no idea how bad it really is. So, how bad is it? Obviously we'...