Questions tagged [ecb]

Electronic Code Book (ECB) is a mode of operation for a block cipher, with the characteristic that each possible block of plaintext has a defined corresponding ciphertext value and vice versa.

Electronic Code Book (ECB) is a mode of operation for a block cipher, with the characteristic that each possible block of plaintext has a defined corresponding ciphertext value and vice versa.

The same plaintext value will always result in the same ciphertext value. ECB is used when a volume of plain text is separated into several blocks of data, each of which is then encrypted independently of other blocks. Because of this, ECB has the ability to support a separate encryption key for each block type.

154 questions
83
votes
9 answers

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
  • 1,151
  • 2
  • 13
  • 19
71
votes
3 answers

Why shouldn't I use ECB encryption?

I'm using Java to generate encrypted strings, and I get this warning at build time: ECB encryption mode should not be used So I'm wondering why I shouldn't use ECB and what I can use instead?
Rogue
  • 836
  • 1
  • 7
  • 6
30
votes
2 answers

Can someone explain the ECB Penguin?

I've seen the ECB Penguin used to demonstrate why ECB is not a recommended method of encryption, but I do not understand how this translates to text or passwords. Aren't the people who create these images comparing apples and oranges?
Josh Bond
  • 411
  • 1
  • 4
  • 5
19
votes
3 answers

Modes of operation that allow padding oracle attacks

It seems to me that padding oracle attacks are mainly a concern for users of CBC mode encryption. Question: are any other modes of operation vulnerable to padding oracle attacks? And if so, why? There was some discussion in the comments section of…
Maarten Bodewes
  • 96,351
  • 14
  • 169
  • 323
18
votes
2 answers

Is it possible to obtain AES-128 key from a known ciphertext-plaintext pair?

I have a file, which was encrypted with AES-128 in ECB mode. I know the format of the original file and know that all files in this format have the same headers. So, I have an encrypted block and the original block. Can I get the encryption key,…
Denis Bezrukov
  • 183
  • 1
  • 1
  • 4
18
votes
2 answers

Using ECB as RSA encryption mode when encrypted messages are unique?

As I understand, ECB should not be used as encryption mode unless you are encrypting single blocks of data which are always unique and only are encrypted once. I have a collection of ids represented by integers that I encrypt and transmit…
user3685322
  • 181
  • 1
  • 1
  • 4
14
votes
2 answers

Chosen Plaintext attack on AES in ECB mode

I am familiar with the following method for an chosen-plaintext injection attack on ECB ciphers, where I am allowed to append a block of bytes to the packet being encrypted: I inject a string with known bytes one less than the blocksize and try…
11
votes
3 answers

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 availability of a secure device that can: Store a…
10
votes
4 answers

Are there any benefits to using ECB over CBC?

From what I have understood about ECB and CBC, CBC is far better as it doesn't reveal any pattern. There have been several questions here about how ECB is bad: Should I use ECB or CBC encryption mode for my block cipher? Can someone explain the ECB…
Kepotx
  • 203
  • 2
  • 11
9
votes
3 answers

Is it possible to find the key for AES ECB if I have a list of plaintext and corresponding ciphertext?

Assume I have a list of plaintext text and its corresponding ciphertext which was created using a specific key with AES in ECB mode. Can I recover that key? If, how big does the list of plaintext and matching ciphertext have to be to be able to…
Richard Jones
  • 201
  • 1
  • 2
  • 3
8
votes
2 answers

Is ECB mode secure if plaintexts are guaranteed to be unique?

I've got a scenario where I need to encrypt many small (16-byte) plaintexts. I want to use AES-128 in ECB mode. Notably, each plaintext is guaranteed to be unique, though each may differ by only a few bits. In this scenario, is ECB secure?
Reid Rankin
  • 652
  • 3
  • 12
7
votes
2 answers

Implement AES-CTR on top of AES-ECB

I using a microcontroller which only support AES-ECB encryption i.e. no decryption-mode, CBC, GCM or similar modes. However, I'm wondering if it's possible to implement AES-CTR or similar on top of AES-ECB? I'm grateful for help, tips, similar…
7
votes
2 answers

Is it feasable to combine ECB and CTR block modes of operation?

Both ECB and CTR block modes have advantages over other block modes. They both support parallel encryption and decryption and random reads/writes. Yet both have major disadvantages: (I'm assuming AES block sizes) ECB produces repeating patterns for…
7
votes
2 answers

Is ECB mode safe to use with RSA encryption?

Firstly, bear with me, I'm relatively new to cryptography. In a recent static analysis scan of our application, one of the findings complained that we are using ECB: A mode of operation of a block cipher is an algorithm that describes how to…
Chris Knight
  • 181
  • 1
  • 1
  • 5
7
votes
2 answers

What does it mean if second half of 8-char string encrypted in 3DES is always identical?

In the recent Adobe passwords leak, presumably encrypted in 3DES ECB, second half of all 8-character passwords is identical: ioxG6CatHBw== Source: http://pastebin.com/iDTFARwq (guesses based on obvious password hints) L8qbAD3jl3jioxG6CatHBw==…
Adam
  • 81
  • 4
1
2 3
10 11