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

learn more… | top users | synonyms

0
votes
0answers
21 views

Message length for aes 256 in ctr, ecb and cbc mode

I want to encrypt a message that have values between 0 and 50. So message have maxim 1 byte. Is possible to encrypt with aes256 in ctr, ecb and cbc mode, messages from 1 byte, not necessary 32 bytes? ...
3
votes
2answers
244 views

CBC mode with same plaintext

I'm working on a file encryption system where multiple versions of the same file might exist. The filenames are encrypted using AES in CBC mode with a random IV and stored in metadata. Since versions ...
5
votes
1answer
83 views

Generating an IV for AES-CBC

I am faced with the task of generating a secure 256-bit IV for AES-CBC. I possess the following resources: A 32-bit microprocessor A 32-bit PRNG (can read/reseed) A 64-bit clock counter (can read) ...
1
vote
0answers
21 views

MAC-then-encrypt: Using one-time-MAC with randomized CTR

The Coursera cryptography 1 course says: If you want to use MAC-then-encrypt mode then you should either use randomized-CTR or randomized-CBC. And if you use randomized-CTR then one-time-MAC ...
0
votes
0answers
12 views

Fixed initialization vector in aes cbc [duplicate]

What are the pros and cons of using fixed iv in aes-cbc encryption? I've read somewhere that it said using fixed iv doesn't really matter?
0
votes
1answer
44 views

CPA on theoretical OTP with CBC mode

Body of question Note: this is THEORETICAL exercise. I understand OTP and CBC does not get along. I have to find a CPA on CBC enc-mode using OTP as the encryption algorithm, s.t a new key is ...
-1
votes
0answers
29 views

Block Cipher vs PRP in CBC?

What is the difference between using a Block cipher and a Pseudorandom Permutation in Cipher Block Chaining mode, which is better?
24
votes
1answer
17k 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 seen code ...
10
votes
2answers
4k 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 ...
0
votes
1answer
84 views

Is double AES-CBC encryption with the same key and IV unsafe?

If some plaintext encrypted twice with the same AES function (CBC-mode), same IV and same key, is it possible to retrieve either the key or the plaintext?
0
votes
2answers
349 views

mode of operation in cryptography

We need to choose a mode of operation for a Telnet like application where the average message size is between 7 and 1024 bytes. What is the best mode of operation in this case? a. CBC b. CFB c. ...
1
vote
1answer
591 views

Precisely how does CBC mode use the initialization vector? [duplicate]

As I understand it, AES in CBC mode does an XOR of the 128-bit initialization vector and the first 128 bits of plain text. Is this correct? I am using the PHP 5.3 openssl extension in aes-256-cbc ...
0
votes
2answers
111 views

DIY over-encryption with a related key

I know next to nothing about cryptography, which is bad because I'm a programmer. I was exploring some code the other day and the encryption part of it seemed a little strange to me. I'd like the ...
1
vote
1answer
70 views

Alter plaintext in block cipher AES in CBC mode

How can I alter the plaintext before decryption by changing the IV? I know what the value of the plaintext should be. I also know the value of the IV (initial vector). The IV and the AES block are ...
1
vote
1answer
25 views

Question about Cipher Block Chaining(CBC)

I'm studying at the moment the CBC Encryption method,and I was asked in an excercise how many bits would be wrong after decryption if during the transmission 2 bits are interchanged. My guess is that ...
4
votes
2answers
270 views

Implementing CBC Encryption Using Decryption

I've implemented this algorithm, which, working from the end of the message backwards, creates a valid CBC ciphertext from any plaintext, using the block cipher's decryption operation instead of the ...
5
votes
4answers
1k views

Security proofs for CBC mode

I'm looking for different approaches to proofs for the security of CBC mode encryption. What are the best sources of information about this subject?
0
votes
2answers
52 views

Parallel file encryption and authentication for large files

For a cloud storage upload client I want to encrypt files during upload, so that they cannot be read by the cloud service provider or anyone who gains access to the account. I would like to use some ...
1
vote
2answers
149 views

How to crack unknown 8-bit encryption algorithm?

Can anyone tell me how to crack the encryption of 8 bit algorithm, when you have some clue that CBC mode is used, but the algorithm is secret. You also have some encrypted data (chosen plain text), ...
3
votes
2answers
545 views

Why can't we use the first block of AES-CBC as MAC

As per topic, why can't we use the first block as MAC instead of using the last block? what's the rationale?
0
votes
2answers
90 views

How to show that this modification of CBC-MAC is insecure?

I'm working on some cryptography problems, found this and I'm not sure how to solve it: Modify CBC-MAC so that all blocks $t_1,\dots,t_l$ are output rather than just $t_l$ and prove it is not ...
1
vote
1answer
52 views

Disk encryption using AES-CBC: is reliance on previous block data a downside?

I have seen drives that boast that they use AES with CBC mode, which doesn't really make sense in my opinion, sure it's more secure than ECB (but actually, leaving security aside, ECB is better suited ...
3
votes
0answers
28 views

Does length prepending fix the key reuse problems with CBC and CBC-MAC?

As I hope everybody is well-aware, re-using the key for CBC-MAC and CBC is a really bad idea. Now, there's also the paradigm to prepend the message length to the CBC-MAC (as "associated data") to ...
0
votes
1answer
51 views

File using same key on XOR cipher. Using CBC [closed]

I have some files that are encrypted using an unknown key and it's using the CBC method to encrypt the files. When I XOR two files together the first two bytes are always the same, but different for ...
1
vote
1answer
78 views

Is it safe to use the same IV for multiple encryptions in AES CBC mode when you are always encrypting random bytes?

I am generating random bytes (16 or 32 bytes at a time), and I want to encrypt them using a 128 bit AES key in CBC mode. Am I really weakening this horribly if I am reusing the same IV and key each ...
0
votes
1answer
41 views

Proper authenticated encryption

I am using AES-CBC, authenticating using HMAC-SHA512 and I was wondering whether my thought process and implementation are correct. The message send over the network is: ...
1
vote
0answers
28 views

TLS padding format

My question is about how the padding is formated in TLS1.0, 1.1, 1.2, 1.3 I came across the PKCS7 format for the padding: ...
2
votes
2answers
393 views

Why can the last block contain a full block of padding in CBC Encryption?

I'm trying to understand the SSL Poodle Attack and I'm wondering why the last block of a CBC Record can be full of padding? Wouldn't that mean that the useful data was already a multiple of the key ...
0
votes
0answers
20 views

What is the benefit of artificially padding messages?

For ECB, CBC, and CFB, padding is required when the plaintext does not fill out a complete multiple of the block size. However, I have heard that is good practice to pad all messages, even if the ...
1
vote
0answers
19 views

Which protocols / file formats use CBC with a random IV and without a MAC?

Disclaimer: I am a noob so this may well be a stupid question or one that's been asked before. I didn't see it come up after searching, though, so I'm going to assume it hasn't been asked here. The ...
0
votes
0answers
26 views

Using Counters instead of MAC in CBC mode

I am wondering what are the implications of using a session counter appended to the end of a plaintext and then use a cipher in CBC mode to encrypt it vs. adding a HMAC or some form of keyed MAC to ...
6
votes
1answer
162 views

Is there any benefit to verifying PKCS#7 padding when using AES CBC and HMAC?

As I'm using HMAC to ensure integrity and authenticity of the ciphertext, is there any additional security benefit to verifying PKCS#7 padding when decrypting using AES CBC? A previous question asked ...
5
votes
1answer
116 views

Fixed-prefix IV in CBC mode

I know the Initialization Vector needs to be unpredictable. Does it apply to the IV as a whole, or to every bit in the IV? I have multiple devices with poor entropy sharing the same key and I want to ...
0
votes
1answer
42 views

What about using AES-ECB with random IV?

Let P1P2...Pn be n blocks plaintext, and M0 be a random IV. Then a n+1 blocks message M0M1...Mn can be constructed by setting Mi+1 = Mi xor Pi+1. Finally, we use AES-ECB to encrypt this message. Is it ...
1
vote
0answers
29 views

Does extra encryption improve the security of CBC and CTR?

I am learning about cryptography and during my research and reading I had a question. When looking at information leakage and CBC mode, I asked if there is a way to improve this with by using the ...
0
votes
1answer
178 views

What happens when cbc+hmac get a replay attack?

If it use AES-CBC and HMAC-SHA256 for message send online, and someone try to replay attack on this message. Can the attack be successful? what will be happen when attacking?
1
vote
2answers
214 views

AES128 Decryption in Objective-C just slightly off

I have been asked to integrate a home-grown CRM system with a 3rd-party data service provider (DSP). The DSP has encrypted the information they are providing. I only have their decryption ...
5
votes
2answers
100 views

Is reusing keys for CBC and CBC-MAC secure when using encrypt-then-MAC?

I know reusing keys is a bad idea, especially for CBC and CBC-MAC, but the example for why on Wikipedia seemed to use encrypt-and-MAC. It seems obvious that the last block of encryption will be equal ...
9
votes
1answer
17k views

AES CBC mode or AES CTR mode recommended?

What are the benefits and disadvantages of CBC vs. CTR mode? Which one is more secure?
0
votes
2answers
112 views

Why IV does not have to be secret yet has to be random [duplicate]

The IV used in schemes such as CBC has to be random and unpredictable. But at the same time it does not have to be kept secret. If the IV does not have to be secret, why does it have to be random ...
3
votes
1answer
109 views

Should I be concerned about padding oracle attacks if the lifespan of my key is ~1 minute?

I'm using 4096-bit RSA to encrypt a 256-bit AES key generated client-side. The RSA ciphertext is then sent to the server, and the server decrypts the RSA ciphertext to acquire the AES key. ...
1
vote
2answers
144 views

AES key equal to IV (CBC mode)

Application uses AES in CBC mode with 128 bit key. In this implementation key is always same and is equal to IV. Can attacker get the key or decrypt data? If he knows: First and second blocks of ...
3
votes
2answers
98 views

Is it safe to use cipher block sizing instead of padding?

I'm using this kind of technique instead of padding of cipher buffer (here goes pseudo-code): ...
42
votes
7answers
49k 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? Edit: This question was asked long back when I was ...
2
votes
1answer
131 views

Guessing the IV for CBC

If I have the key, the ciphertext under AES-CBC and the plaintext, then how can I guess the initialisation vector?
4
votes
3answers
878 views

Is there any area where AES-CBC cannot be used ? If so, why?

I would like to know the domains or specific applications where using AES-CBC is not advised due to any drawbacks like sequential encryption of AES-CBC ?
3
votes
1answer
167 views

Is it bad design to reuse an AES key?

The company I work for needs to develop a simple system where, for each client, we encrypt a token on our server, which is then transmitted to the client. The decryption is performed by the server ...
1
vote
1answer
136 views

Implementing AES-CBC (Matasano Crypto Challenge 10)

I am currently doing the Matasano Crypto Challenge to learn a bit about cryptography. In that specific challenge one had to implement AES in CBC mode. I did that and verified that encryption and ...
1
vote
0answers
479 views

bank websites using AES_256_CBC vs AES_128_GCM/CBC [duplicate]

Hello i have just recently started learning about cryptography, so i was doing some little research on what kind of encryption techniques and modes that were used in bank web pages. I have noticed ...
4
votes
1answer
154 views

What are the steps to decrypt a TLS 1.1 record?

My question is related to another question in Cryptography about TLS 1.1 and 1.2. I have read both RFC 2246 The TLS Protocol Version 1.0 and RFC 4346 The TLS Protocol Version 1.1. What I know is that ...