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
2 votes
0 answers
42 views

Looking for a way to enlarge a message so that any modification to the "enlarged" message makes recovering the original message impossible

Let's say we have a message m of small size. I am looking for a system $S$ so that $S(m)$ is arbitrarily large, we can easily compute the inverse $I(S(m)) = m$, and any modification to $S(m)$ makes it ...
MATHIEU SERAPHIM's user avatar
2 votes
0 answers
82 views

Is it okay to have no IV when using AES-CBC with unique keys, that are however derived from one shared key?

Given $\operatorname{AES-CBC}$ (128-bit), with $IV=0$ and unique encryption keys $$K_{Enc} = \operatorname{CMAC}(MK, \text{known_text})$$ where $MK$ is a shared symmetric 128-bit key and $\text{...
jschw's user avatar
  • 121
1 vote
1 answer
2k views

Does AES-CBC always use PKCS#7?

I need to add AES decryption with a 256 bit key to our software, and of course I won't do it myself; rather, I chose a library that works fine for our needs. It supports various modes of operation, ...
wujek's user avatar
  • 175
1 vote
1 answer
2k views

Encryption & decryption in AES CBC mode - Which is faster?

I wrote a small code to compute the time consumption by the AES in CBC mode, I noticed that the encryption is faster than the decryption, my question: Is my result correct? If yes, why is the ...
Eng.sh's user avatar
  • 11
4 votes
1 answer
1k views

CBC encryption + CBC MAC reusing key in MAC-then-Encrypt

I'm reading the Handbook of Applied Cryptography by ‎Alfred J. Menezes et al. Especially, I'm stuck with the case that reusing key for CBC encryption and CBC-MAC in MAC-then-encrypt structure. My ...
pioneer's user avatar
  • 315
0 votes
1 answer
410 views

DES-CBC with random IV - how big is the keyspace? Can COTS tools crack it?

I've spent the night reversing the implementation of the 'Basic Text Encryptor' from Jasypt [1]. The algorithm is defined in documentation as 'PBEWithMD5AndDES'. The implementation is this: A ...
testUser12's user avatar
1 vote
1 answer
250 views

Crypto system design : How to design Encryption for Zero width characters

Zero width character's can be used to hide text in plain sight.I am building a system where user's can provide their secret message , cover message and a password (key) which I would encrypt and give ...
Mohan Sundar's user avatar
3 votes
1 answer
700 views

How are initialization vectors used in TLS 1.1?

From my understanding, TLS 1.0 can use CBC to encrypt data. To do so, it creates one initialization vector (IV), and then uses the previous ciphertext block as the IV for the next record. I made this ...
Shnick's user avatar
  • 133
2 votes
2 answers
274 views

Weakness in a CBC-like XOR cipher

A simple symmetric encryption algorithm can be written as follows: Input message M and 64 bit key $K$ Divide M into 64 bit size blocks $B_1...B_n$ Get first block $B_1$ and perform bit-wise $\oplus$ ...
Tom Riddle's user avatar
2 votes
1 answer
151 views

Is there any way to find out two numbers such that the XOR between them is a given number?

I have the following operation I took from a cryptanalysis I'm performing for a specific CBC encryption where the challenger has provided the key: ...
Maf's user avatar
  • 261
2 votes
1 answer
112 views

When using CBC-ESSIV for disk encryption, why does the generation of IV require a hash then encryption instead of only one hash?

The CBC-ESSIV algorithm specifies how to calculate the IV to use for a given key (K) and sector number (S) as the following: $$\text{IV} = \operatorname{Enc}(\operatorname{Hash}(K) , S)$$ https://en....
cookiecipher's user avatar
2 votes
2 answers
1k views

How do I find out whether a message in CBC has padding?

When a program is decrypting a message encrypted by CBC mode, what does it find out, whether the last bytes of the last block is part of the padding or part of the plaintext? Example: Use CBC mode ...
coding4live's user avatar
0 votes
0 answers
222 views

Another cut-and-paste attack on CBC mode

I am trying to see specific cases of attacks in the CBC mode, in particular, I am investigating some attacks such as Example of a cut-and-paste attack on CBC. Here I have posted something similar and ...
user424241's user avatar
3 votes
1 answer
1k views

How to break CBC cipher with partly known plaintext?

I'm learning some IT security and during practice I found an exercise I couldn't solve. I have an encrypted message with block cipher in CBC mode. The blocks are one byte long and the first block is ...
user312442's user avatar
1 vote
2 answers
494 views

Cipher Block chaining but with encrypting the plain text first then xor with IV

I have just learned about the CBC mode of operation and that it gives the cipher by xoring the plaintext m0 with random IV and then encrypt it with random key and I found out that the CBC is not CPA-...
joan's user avatar
  • 11
1 vote
1 answer
1k views

TDES (Triple DES) DUKPT decryption

We have a POS (Ingenico) that uses DES3-CBC encryption using a derived key. It sends encrypted data, and 10 bytes size Key Serial Number (KSN). I tried to use ...
onesick1's user avatar
2 votes
1 answer
47 views

Longer IV generation from a single block IV for ICBC

I was reading a question about ICBC here and it mentioned that you would need a $s \cdot n$-bit $IV$ if you would use $s$ "stripes", where $n$ is the blocksize. Say that we don't like transmit that ...
Maarten Bodewes's user avatar
  • 91.7k
33 votes
2 answers
11k views

7zip : Why does encrypting the same file with AES-256 not give the same output?

Using 7-zip 19.00, on Windows 10 1909, build 18363.592, I encrypted a text file with the contents "hello there" using AES-256 and the password "123". I did this two times, the exact same procedure, ...
super's user avatar
  • 463
1 vote
2 answers
134 views

Why is it difficult to encrypt large amounts of information using quantum key distribution?

An article last month claimed that Toshiba Corp. and Tohoku University recently broke the record for the amount of data encrypted using quantum key distribution by transmitting "a few hundred ...
tparker's user avatar
  • 163
1 vote
1 answer
2k views

AES-128-CBC padding size [closed]

I'm trying to figure out how padding works by seeing what happens when I try to encrypt a 16 byte file with AES-128-CBC. My understanding was if I encrypt a file of size, say, 28, then there would ...
Alyssa June's user avatar
2 votes
1 answer
123 views

Reusing IV but still generating different code?

I'm in a beginner's cryptography class and I'm trying to figure out if I'm doing something wrong, or if I just don't understand why something is the way it is. I created a simple .txt file of 124 ...
Alyssa June's user avatar
3 votes
3 answers
3k views

Example of a cut-and-paste attack on CBC

I am reading the cryptography book by Stamp and there is a cut-and-paste attack on $ECB$ and this is easy to follow because $ECB$ is relatively simple, the problem is that I would like to see an ...
user424241's user avatar
2 votes
1 answer
1k views

Is CTR really equally secure than CBC?

Here is a typical cryptographic situation: A secret key exists that is only known to a sender and a receiver of messages. As it is hard to replace that key, since you either need a secure channel for ...
Mecki's user avatar
  • 187
-1 votes
1 answer
58 views

Parallelizabilty and prepocessing in Modes of operation (with example)

I have a doubt about parallelizability and preprocessing in modes of operation. I understand that these two technologies are able just when the "block" is independent. In another way, ad example in ...
theantomc's user avatar
  • 189
5 votes
2 answers
3k views

During padding oracle attack (CBC), how is first byte of plaintext block is obtained?

Imagine conducting a padding oracle attack against CBC mode with 16-byte length blocks, and PKCS#5 used for padding. You start, as always, revealing the last byte of plaintext. Then you iteratively ...
bleg's user avatar
  • 51
1 vote
1 answer
298 views

What are easy yet fool proof ways of ensuring that AES encryption algorithm works like it should and no bugs/developer mistakes have sneaked in?

As a developer when it comes to encryption, there is an insane amount of weakness/mistakes/bugs that the programmer can add to the encryption algorithm. So a pretty general question to the crypto pro’...
CoffeDev's user avatar
  • 123
1 vote
2 answers
463 views

AES CBC in need of multiple IV's, possible to avoid creating duplicate iv's by using resulting cipher text 16 bytes as next iv?

I saw a little close to these questions but not exactly. Encryption method AES-256-Rijndael-CBC: if we have multiple cipher chunks that look like this: {iv}{cipheredchunk}{chiphered chunk}{chiphered ...
CoffeDev's user avatar
  • 123
3 votes
2 answers
4k views

Given the key, the plain text and the cipher text can I calculate the IV used in CBC mode?

If I have the plain text, the ciphertext and the key for an AES-128 CBC operation, can I determine the IV, even if I don't know the padding (assuming the padding follows one of the more common formats)...
user avatar
0 votes
1 answer
539 views

How does AEAD guarantee authenticated encryption and plain AES does not?

This is a follow up to my earlier question. This is more out of curiosity in how AEAD (like CCM or GCM) works compared to encryption in other modes (like CBC or ECB). Suppose you have AES-256-CBC ...
Marek's user avatar
  • 123
0 votes
0 answers
47 views

Error propagation in CBC [duplicate]

I am doing an error propagation experiment with the CBC mode.I have encrypted a 100 byte text file with openssl. I made the 55th bytes of my encrypted file corrupted.As per theory the corresponding ...
Aneek 's user avatar
1 vote
1 answer
2k views

128 bit AES CBC bit flipping on second block

I have a 128 bit AES cipher in CBC Mode with the IV prepended to the message. I am aware of the security issues here, but that is exactly the point of my example. I would like to change the plain text ...
nullchimp's user avatar
  • 113
1 vote
2 answers
3k views

AES 256 CBC - Storing local data, how to save IV vector?

I want to use AES256 CBC for protecting small data (<100kb) against misusage for my application in the local store folder. I'm not an expert at data encrypting so I'm to try to understand it step ...
Filip Procházka's user avatar
0 votes
1 answer
435 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 ...
brian chan's user avatar
2 votes
1 answer
220 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 ...
Alex's user avatar
  • 21
2 votes
2 answers
2k 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, the ...
Omer Enes's user avatar
2 votes
3 answers
770 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 ...
user avatar
2 votes
1 answer
455 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}...
Aish2410's user avatar
0 votes
1 answer
132 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 ...
Crypto_dxb's user avatar
1 vote
1 answer
397 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.
Anan's user avatar
  • 65
2 votes
1 answer
873 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 ...
Anan's user avatar
  • 65
6 votes
2 answers
8k 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-...
TJCLK's user avatar
  • 477
0 votes
0 answers
33 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 ...
Rocco Mancin's user avatar
7 votes
2 answers
15k 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 ...
GarlicCheese's user avatar
0 votes
1 answer
159 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 ...
Mitchell Stevenson's user avatar
2 votes
1 answer
350 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 ...
Mr_Antivius's user avatar
0 votes
1 answer
340 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 ...
user67441's user avatar
0 votes
0 answers
73 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 ...
S. L.'s user avatar
  • 421
-1 votes
1 answer
868 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?
qwevd's user avatar
  • 1
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 2
3
4 5
10