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
1 vote
1 answer
3k views

Use of CBC-AES-256 to encrypt usernames

I came across some code in our project that encrypts usernames (limited to 50 chars, most are less than 10) using the following parameters: IV size is 16 bytes Key size is 32 bytes Algorithm is CBC-...
amaterasu's user avatar
2 votes
1 answer
3k views

AES CBC with fixed or predictable IV, what are the risks?

I am making a call with parameters from application "A" to a web application "B". Parameters are in the query string of the URL. They don't need to be hidden. But I want to be sure that nobody can ...
user687254's user avatar
2 votes
1 answer
2k views

Understanding padding oracles - is an attack plausible in my scenario?

I have a scheme that, long story short, uses AES in CBC mode to encrypt third-party credentials for user accounts with a password-derived key. It's been mentioned that the use of CBC mode is a ...
KeithS's user avatar
  • 530
3 votes
0 answers
138 views

CBC with fixed IV but changing data [duplicate]

Possible Duplicate: Using CBC with fixed IV I am using AES in CBC mode. For some reasons I have some issues for transmiting the IV. So I am using a fixed IV. If the first 128bits of the message,...
user687254's user avatar
47 votes
2 answers
75k 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?
mary's user avatar
  • 1,031
2 votes
0 answers
213 views

Why not use CBC, not send IV, and assume first plaintext block is garbage? [duplicate]

Possible Duplicate: Using CBC with fixed IV Forgive me if this has been asked before, I looked but haven't seen any answers that suit. Is there any danger in using CBC, encrypting a message plus ...
Joshua's user avatar
  • 121
36 votes
1 answer
49k views

What is the advantage of XTS over CBC mode (with diffuser)?

I have some problems in understanding the "advantage" of AES-XTS compared to CBC with diffuser. I read something about FileVault, in this paper they mention the two modes of operations XTS and CBC (...
tommynogger's user avatar
22 votes
5 answers
9k views

Using CBC with a fixed IV and a random first plaintext block

What if, instead of using CBC mode in the normal way with a random IV, I used this approach: Use a fixed IV (like a block of 0's). Before encrypting, generate a random block and prepend it to the ...
danieltorres's user avatar
11 votes
3 answers
5k views

Relative merits of AES ECB and CBC modes for securing data at rest

I need to store several million Payment Card Numbers (PCNs) securely in a mainframe database (that is, 'at rest'). I assume that any attacker will have access to all of the stored data. I assume the ...
Brent.Longborough's user avatar
9 votes
1 answer
9k views

Why, or when, to use an Initialization Vector?

i'm trying to figure out when an Intialization Vector (IV) should be used. There are anecdotal reports that WEP was broken because of weak IV's. It's also claimed that if two pieces of plaintext are ...
Ian Boyd's user avatar
  • 1,001
4 votes
2 answers
2k views

Modifications of CBC-MAC

I'm preparing myself to exam, but I have a lot of troubles with rigorous proofs. This post is very long, but this is because I remind here 2 long definitions. At the beginning I want to remind the ...
BiggBen1989's user avatar
21 votes
3 answers
22k views

Is AES in CBC mode secure if a known and/or fixed IV is used?

I have a need to encrypt credentials for a third-party app used by a secured internal app. Over on ITSec.SE, I was helpfully shown a scheme to encrypt the third-party credentials based on a hash of ...
KeithS's user avatar
  • 530
39 votes
3 answers
47k 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 ...
asudhak's user avatar
  • 491
2 votes
1 answer
7k views

How to decrypt AES in CBC

i am having problems understanding how CBC works! I know that it is a chain and the IV is XORed with the PT but then what? I mean we encrypt it with key k and the result is the CT which we use for the ...
angelo's user avatar
  • 23
2 votes
2 answers
2k views

Secure Hash Function based on AES

How secure would a hash function be which appends an extra block of 16 zeroed out bytes to the end of the message and then AES-encrypts it with a well-known password (say the first 128 bits of pi) ...
dspyz's user avatar
  • 167
10 votes
3 answers
7k views

Malleability attacks against encryption without authentication

Suppose there is a message that is encrypted with AES-128-CBC. The message is as follows, new lines are used to delimit the 16 byte boundary for each block: ...
Rook's user avatar
  • 1,486
3 votes
1 answer
2k views

How do I calculate the maximum plain text length allowable for a certain cipher text length?

I am encrypting and storing sensitive values in the database. I have a set max length in the database, but in order to provide useful user feedback, I'd like to know the max input I should allow for a ...
Josh's user avatar
  • 133
7 votes
3 answers
1k views

Why is a MAC needed with CBC?

I agree that for certain encryption systems or modes of operation, a MAC is indispensible. The best example are probably stream ciphers (and therefore also block ciphers in OFB or CTR mode) that ...
lxgr's user avatar
  • 1,778
6 votes
3 answers
6k views

Why does CBC decryption with a wrong IV still give readable results?

While developing some code that uses the .NET AesManaged algorithm, I made some mistakes but was surprised at the results. My encryption was correct. I was generating a random IV block and writing ...
JoelFan's user avatar
  • 295
20 votes
2 answers
8k views

Why do new versions of TLS use an explicit IV for CBC suites?

SSL 3.0 and TLS 1.0 used an insecure scheme to generate implicit IVs when encrypting records in CBC mode: they used the last part of the previous record, a value that can be predicted by the attacker. ...
CodesInChaos's user avatar
  • 24.8k
1 vote
2 answers
12k views

Initialization vector length insufficient in AES

I use AES with AES/CBC/PKCS5Padding with the following encryption and decryption code sections in Java: ...
Rubi Sharmax's user avatar
8 votes
2 answers
1k views

Practical necessity of semantic security under chosen plain text attack (CPA) in CBC mode

I was not able to understand why we practically need a CPA security in Cipher Block Chaining, which insist on having a random IV. Let's say if the encryption is not CPA secure, i.e. the adversary can ...
David's user avatar
  • 443
9 votes
1 answer
1k views

CBC key lifetime, or, "how big is too big?"

IPSec recommends rekeying SA's figuring in both time and amount of data sent. Even when using AES-256 in CBC mode, the key and IV commonly get re-negotiated after 100MB. My case isn't using IPSec, ...
bmedward's user avatar
7 votes
2 answers
7k views

How can I do a brute force (ciphertext only) attack on an CBC-encrypted message?

Given a CBC ciphertext and IV, how can I find the encryption key? We are limited with an 8 chars key, each char in the range of [a..h], so I can generate every possible key (these are only $8^8 = 2^{...
user avatar
91 votes
2 answers
170k views

What is the difference between CBC and GCM mode?

I am trying to learn more about GCM mode and how it differs from CBC. I already know that GCM provides a MAC, which is used for message authentication. From what I have read and from the code snippets ...
Bob Bryan's user avatar
  • 1,273
5 votes
3 answers
12k views

Which one of the Block Cipher modes is the best?

I have two questions regarding the Block Cipher Modes: Which one of the modes is considered the best? I know CBC has a problem of IV since the next block of the plain text is XORed with the result of ...
MR.NASS's user avatar
  • 241
4 votes
1 answer
491 views

Undecrypt using the OpenSSL EVP API?

I'm writing a client-server encryption scheme for homework, and I've stumbled upon what might be a fatal blow to my current implementation. When using AES-256-CBC on the two sides, it's important ...
alexgolec's user avatar
  • 141
9 votes
1 answer
14k views

How do I correctly derive a Key and IV?

Mainly I'm trying to understand how to correctly create the Key and IV for use with the .NET Implementation of AES (AesManaged class). This encryption code will be used in conjunction with existing ...
John B's user avatar
  • 193
6 votes
1 answer
3k views

Encrypting (CBC) identical files with same key and different IV, is it less secure?

I would like to learn more about cryptography. Let's say you encrypt multiple files with CBC encryption using the same key, but each file has a unique (and pseudorandom) IV. Does this weaken the ...
Ben's user avatar
  • 365
20 votes
4 answers
21k 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?...
Ben's user avatar
  • 365
24 votes
3 answers
38k 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 ...
antonpug's user avatar
  • 341
5 votes
3 answers
1k views

Does the XML Encryption flaw affect SSL/TLS?

A "practical attack against XML's cipher block chaining (CBC) mode" has been demonstrated: XML Encryption Flaw Leaves Web Services Vulnerable. Does this weakness of CBC-mode which is used here also ...
zimdanen's user avatar
  • 153
15 votes
3 answers
2k views

Is the CBC weakness in XML Encryption a new discovery? Are other applications vulnerable?

The RUB in Germany reports that XML encryption is broken. This is essentially the W3C standard for protecting XML documents from prying eyes. Does this mean that an attacker can only see a single ...
makerofthings7's user avatar
15 votes
2 answers
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. ...
Mike's user avatar
  • 315
6 votes
1 answer
2k views

What causes first block of AES decryption to be garbled, even with correct IV?

I am attempting to duplicate wireshark's packet capture decryption for a TLS HTTP session, where I control the private key of the server. The cipher suite number is 0x00002f, TLS_RSA_AES_128_CBC_SHA ...
madczar's user avatar
  • 63
13 votes
3 answers
4k views

Is it okay to use a hash of a timestamp as the IV for AES?

The message format includes a datetime field in the clear. Is it okay to also use this field (or some hash thereof) as the initialization vector? In this case, CBC is the mode being used.
Ed Thomas's user avatar
  • 233
83 votes
9 answers
137k 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?
midhunhk's user avatar
  • 1,151
10 votes
1 answer
8k views

What are the details of the DES weakness of reusing the same IV in CBC mode with the same key?

I think I once faced the recommendation, that the initialization vector should always be random and never be used twice with the same key. How serious is this weakness? Also, is AES less effected ...
Vladislav Rastrusny's user avatar

1
6 7 8 9
10