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
20 views

OPA attack with IV || ciphertext1 || ciphertext2

I know this is a kind of a very un-specific question. But I cannot figure it out where I am doing it wrong implementing an Oracle Padding attack. So What I'm supposed to do is to send a iv || ...
1
vote
1answer
55 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, ...
1
vote
1answer
72 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 ...
2
votes
1answer
61 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 ...
0
votes
1answer
56 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 ...
1
vote
1answer
77 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 ...
3
votes
1answer
122 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 ...
2
votes
2answers
79 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$ ...
2
votes
1answer
55 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: ...
1
vote
1answer
45 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....
2
votes
2answers
139 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 ...
0
votes
0answers
59 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 ...
3
votes
1answer
98 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 ...
1
vote
2answers
115 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-...
1
vote
1answer
95 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 ...
2
votes
1answer
36 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 ...
31
votes
2answers
7k 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, ...
1
vote
2answers
85 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 ...
1
vote
1answer
169 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 ...
2
votes
1answer
46 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 ...
2
votes
3answers
767 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 ...
1
vote
1answer
147 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 ...
-1
votes
1answer
31 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 ...
5
votes
2answers
871 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 ...
1
vote
1answer
130 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’...
1
vote
2answers
94 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 ...
3
votes
2answers
665 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)...
0
votes
1answer
95 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 ...
0
votes
0answers
39 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 ...
0
votes
1answer
132 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 ...
1
vote
2answers
170 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 ...
0
votes
0answers
32 views

Blockwise-adaptive RoR-CPA Attack against CBC

I know that the security from CBC stems from the fact that since each message block is randomized by xoring it with a block cipher output, each new call to $E_{K}$ is independent from the previous ...
0
votes
1answer
55 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
57 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
257 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, ...
2
votes
3answers
190 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
121 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
1answer
53 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 ...
1
vote
1answer
50 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
103 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 ...
5
votes
2answers
2k 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
0answers
20 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 ...
4
votes
1answer
1k 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 ...
0
votes
1answer
64 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
89 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
78 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 ...
0
votes
0answers
43 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 ...
-1
votes
1answer
170 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?
0
votes
1answer
30 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 ...
0
votes
0answers
56 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
2 3 4 5
8