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
2answers
144 views

Padding Oracle Attack CBC Mode: If the set of characters of plaintext is known, then can you speed up the process

Consider AES-256, 128-bit blocks, and PKCS#5 Padding. During a Padding Oracle Attack, a manipulated byte of cipher text is sent to the oracle and we eventually hope to find out what that respective ...
3
votes
1answer
2k 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
80 views

Block Cipher Mode of Operations

I am studying for a test and I don't seem to understand the Block Cipher and its different modes of operations especially when it comes to encrypting and decryption. Could anyone please help solve ...
2
votes
0answers
42 views

Decrypting first byte of plain-text for AES CBC Padding Oracle Attack

I'm working on padding oracle attack and I have a 16 byte cipher on which I need to perform the attack. I've been able to successfully decrypt all the bytes of the plain-text except first byte and I'm ...
0
votes
1answer
29 views

Is it safe to use the CBC-MAC as a Initial Vector and Key Check Value in deterministic encryption?

I want to deterministically encrypt a short message <50 bytes with AES-128 CBC. I also want to be able to detect if the correct key is being used. Ciphertext and IV integrity will be guaranteed by ...
1
vote
0answers
23 views

CBC-MAC variable-length weakness with MAC size greater than the encryption block size

The title mostly explains it; CBC-MAC variable-length weakness with MAC size greater than the encryption block size I've seen that by having the pairs $(M,T_m)$ and $(N,T_n)$, we can generate a ...
-1
votes
0answers
32 views

Finding Collisions on CBC-MAC with known IV and key

Given a message $m$ which is encrypted using a known IV and known key in CBC mode which gives MAC $t$ which is 20 bytes. How can we create a message $m'$ which produces the same MAC $t$? Using the ...
0
votes
1answer
42 views

How to alter text that was encrypted with AES CBC using PKCSPadding7

Assuming, I had a ciphertext along with its decrypted plain text result but not the IV or the Secret Key. (keep in mind that the text was encrypted with AES/CBC/PKCSPadding7). How would I go about ...
3
votes
1answer
144 views

AES Padding (Nullbytes vs PKCS7)

I currently implement the AES(128,192,256)(ECB,CBC). Does the type of padding affect security? I just want to fill the blocks with null bytes.
0
votes
0answers
51 views

Can I and How Decrypt this Online

Although I had a security course in school a long time ago, I am effectively new to cryptography. I have an encrypted text, the encryption key of 44 characters, the encryption method, (Fernet, which ...
0
votes
0answers
58 views

Decrypting an AES string

I'm dealing with a website that loads a javascript file which eventually sets an AES hash/value (whatever it's called) as a cookie. The file is heavily obfuscated making it hard to understand certain ...
37
votes
3answers
7k views

Why was AES CBC removed in TLS 1.3?

I don't quite understand why AES CBC was removed in TLS1.3. From what I know CBC is the most secure Mode of operation for the AES block cipher (if you can say it like that). It only needs a TRND IV ...
0
votes
1answer
44 views

In CBC mode of encryption, what happen if the IV is changed when it arrives at the receiver end? [duplicate]

What will happen if the Initialiazation Vector (IV), i.e, the initial randomness fed in to the first block arrives mangled at receiver end? How will this affect the decryption? Will the receiver be ...
0
votes
1answer
75 views

Find first two blocks of plaintext given a final plaintext block, the IV and ciphertext for CBC?

I have the following: complete ciphertext; iv; last block of plaintext including the padding which is 04040404. The encryption was made using AES-CBC-256. I can ...
4
votes
1answer
575 views

How is it possible that these two encryption functions yield the same result?

I opened this post in stackoverflow some time ago where I explained a problem I had about not finding a way that would allow to successfully get the result of a string encrypted with a "aes-256-...
0
votes
2answers
87 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 ...
5
votes
2answers
1k 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 ...
2
votes
1answer
113 views

Quadruple DES vs AES-128 security

I came across this question regarding the security of Quadruple DES (hypothetically DES done four times) in CBC encryption mode vs security of AES-128 in CBC encryption mode. What parameters help to ...
31
votes
2answers
8k 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
49 views

Multiple IV CBC

CBC's encryption is not paralelizable but I could divide a 64 block message in 4 16 block parts and encrypt those 4 parts separatly in parallel using a diferent IV for each one. Is this unsecure ? Is ...
22
votes
3answers
33k views

How can Cipher Block Chaining (CBC) in SSL be attacked?

I am trying to understand how CBC-mode in SSL/TLS can be attacked. I have been looking around online but all examples and explanations are very hard to understand and follow. Can you give a simple ...
3
votes
1answer
85 views

AES-256, CBC, plaintext length is multiple of block size: Does PKCS #7 padding weaken the encryption?

Of course, padding is superfluous when AES with CBC is used if you know that the plaintext length is a multiple of the block size. But does the padding precipitate a weakness in the encryption? ...
2
votes
0answers
35 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 ...
2
votes
1answer
421 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 ...
2
votes
0answers
47 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{...
1
vote
1answer
113 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 ...
0
votes
0answers
22 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 || ...
80
votes
9answers
117k views

Should I use ECB or CBC encryption mode for my block cipher?

Can someone tell me which mode out of ECB and CBC is better, and how to decide which mode to use? Are there any other modes which are better?
1
vote
1answer
110 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, ...
2
votes
2answers
233 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 ...
1
vote
1answer
246 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 ...
0
votes
1answer
79 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 ...
2
votes
1answer
123 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 ...
82
votes
1answer
141k views

What is the difference between CBC and GCM mode?

I am trying to learn more about GCM mode and how it differs between CBC. I already know that GCM provides a MAC which is used for message authentication. From what I have read, and from the code ...
2
votes
2answers
101 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$ ...
3
votes
1answer
158 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
1answer
57 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: ...
17
votes
3answers
16k views

Can CBC ciphertext be decrypted if the key is known, but the IV not?

Let's say that there is a binary file encrypted with AES in CBC mode (i.e. using a key and initialization vector). If key is known, but IV is not, is it easy to fully decrypt the file? How hard is it?...
33
votes
4answers
33k views

Why is CBC with predictable IV considered insecure against chosen-plaintext attack?

I just learned that using CBC encryption with an IV which is predictable is not secure. From what I understand, using certain plain texts, and then guessing the IV that it uses, the attacker can ...
5
votes
3answers
4k views

Validating successful decryption in AES

I have a program which uses AES-256 in CBC mode to encrypt and decrypt files. As I have quickly realized, AES will even use an incorrect passphrase to decrypt data, which leaves me with no way to ...
1
vote
1answer
55 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....
15
votes
2answers
2k views

Is CBC really dead?

I developed a p2p-app in C# which sends and receives encrypted text messages (50kB). For encryption, my app uses 128-bit AES in CBC cipher mode. For each message it uses a new randomly-generated IV. ...
1
vote
1answer
348 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
0answers
79 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 ...
1
vote
1answer
445 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 ...
3
votes
1answer
181 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 ...
0
votes
1answer
898 views

CMAC Generation : If input payload length is not aligned in 16 bytes, what are the possible side effects?

While searching for answers ,I understand that RFC AES-CMAC 4493 is suggested by NIST to overcome if payload is not aligned in 16 bytes. I would like to know what drawbacks/insecure caused by AES-...
1
vote
1answer
200 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 ...
1
vote
2answers
144 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-...
2
votes
1answer
37 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 ...

1
2 3 4 5
9