The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
1answer
650 views

NIST's Methods for Key Wrapping?

NIST has specified a full Mode of Operation for Key wrapping. What are the pros and cons of key wrapping mode of operation as compared to CBC, CTR or authenticated encryption mode?
0
votes
2answers
654 views

Recover key given partial key, IV and cipher text using CBC mode

Given a known IV and a small part of the key (not enough to use brute force) is there are any way to break CBC encryption with only one cipher text?
0
votes
1answer
684 views

Is it possible to obtain AES-128 key from a known ciphertext-plaintext-iv tuple used the encrypt the plaintext? [duplicate]

i have a file, which was encrypted with AES-128 in CBC mode. I know the content of original file and know the iv used to encrypt that file.So, just wondering if it's possible to recover the key used ...
0
votes
1answer
49 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
2answers
161 views

Modification of block cipher in CBC mode

I know that CBC is not secure against data modification. Can someone explain to me by illustrating at an example how I could change the last block if I have the encryption of "0"? Thanks in advance
0
votes
1answer
114 views

CBC first block malleability

Let $m_1 = \underbrace{ \{0,1\}^n \times \cdots \times \{0,1\}^n }_{L\text{ times}}$ be a message of space $\mathcal{M}^L$, where $\mathcal{M} = \{0,1\}^n$. Let $c_1$ be the encryption of $m_1$ ...
0
votes
1answer
220 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 ...
0
votes
1answer
66 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: HMAC(64Bytes),IV(16Bytes),...
0
votes
2answers
787 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 ...
0
votes
1answer
386 views

If PRF is non invertible, why does Ctr-mode work?

I am currently taking Dan Boneh's Cryptography I course online. I have just finished the segment discussing the Cipher Block Chaining and Counter-Mode. I am having difficulty understanding why Ctr-...
0
votes
2answers
1k views

Remove padding (CBC) from decrypted text [closed]

I have a bit problem with padding. Everything goes fine when I encrypt the text BUT when I decrypt I see some extra characters. Sometime's one character sometimes more and I dont know how to remove ...
0
votes
1answer
23 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
1answer
56 views

Symmetric encryption construction (meet-in-the-middle attack)

This is a question I had from an exercise session. First we do DES in CBC encryption mode using a key $K_1$ and $IV_1 = O^n$. Then we do DES in ECB decryption mode using $K_1$. And then DES in CBC ...
0
votes
2answers
113 views

Question about IV from CBC/AES-256

I'm developing a program to encrypt and decrypt a file with AES-256/CBC in Java. And I want it to be safe enough. In my case, I generated random AES key for each file to encrypt and decrypt them. My ...
0
votes
1answer
158 views

Recovery of private key in AES-CBC from two ciphertexts with different IV, but identical plantext

I have a system that encrypts messages for a given user using key K using AES-CBC in response in an external stimulus. Each message has a randomly generated IV. The user never decodes these messages,...
0
votes
1answer
215 views

Can I use PKCS#5 with CBC? [duplicate]

As far as I know there are two padding mechanisms, which are PKCS 5 and 7. Which one should be used for CBC?
0
votes
1answer
78 views

Encryption / Decryption method secure

I was wondering whether this encryption / decryption flow is very solid / secure. I encrypt the data using AES CBC 256 bit with an static IV. When the user logs in with his Firebase account (first ...
0
votes
2answers
221 views

TLS1.2 AES 128 CBC Encrypted Data size is not a multiple of block size [closed]

I know that TLS ciphers such as TLS_RSA_WITH_AES_128_CBC_SHA transmit data as shown https://tools.ietf.org/html/rfc5246#section-6.2.3.2. From my understanding the ciphertext MUST be a multiple of the ...
0
votes
1answer
243 views

CBC-MAC using predictable IV

Imagine you have a string of plaintext (a), IV (ai) and the MAC (am) for the plaintext (<...
0
votes
1answer
520 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-...
0
votes
1answer
296 views

Given an AES-CBC encrypted string, IV, and plain text, how can I compute the key?

If I have the AES-CBC encrypted string along with the IV and the plain text before encryption, how can I compute the key which was used for encryption?
0
votes
1answer
297 views

How to use CPA on AES128-CBC with constant Key and IV to leak info?

I'm doing a challenge in which I need to login to a server as an admin to capture a flag. I can enter an $id$ and a $password$ only consists of 'a-z', '0-9','-', '_' characters. The flow is as follows:...
0
votes
1answer
156 views

Is CBC still better than ECB if the key and a large part of the texts are random?

I am doing protection for my software, which involves storing a part of the crucial algorithm inside a smart-card based dongle. I will supply the input to the dongle, and I will expect the output of ...
0
votes
3answers
759 views

AES CBC mode is good for encrypting 15-20mb files and then sending it in parts?

I want use CBC mode for sending and receiving files (avi, mp3, docx, jpeg) max up to 20mb. But also I want cut this file after encryption on sending site for example on 2mb size and send each file ...
0
votes
1answer
219 views

Random unique key per message, safe to use key as IV?

The overall setup is that I am using RSA public key encryption, and because the messages are big instead of encrypting the entire message via RSA I am encrypting a random AES-128 key with the PK and ...
0
votes
1answer
512 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 ...
0
votes
1answer
777 views

what problem happen if we always use IV Zero in CBC Mode? [duplicate]

i have a question about CBC operating mode. what problem happen if we always use IV Zero in CBC Mode?
0
votes
1answer
1k views

Keeping the key and IV safe when AES256 encrypting publicly known data

I am encrypting some publicly known data, and some private data using the same key, using AES256 with CBC. An attacker does not have the ability to choose what the public data is. Is this safe? (It ...
0
votes
1answer
535 views

Implications of reversing CBC encryption

What would be the security implications if we reverse CBC encyption? Here is a picture of CBC encryption: Here is a picture of CBC decryption: My guess is that the encryption would work if we ran ...
0
votes
1answer
66 views

if using cbc+hmac dealing with small size of data(less than 128bit) , will it cause any problem?

if use AES-cbc,HMAC-SHA256, and there is some txt needed to be enc, and I divide this txt into small packages with variable length, then enc them. some of these package can be less than 128bit. Is ...
0
votes
1answer
298 views

AES CBC encoding of decomposable OAuth2 tokens

We're building a stateless RESTful API that relies on the content of OAuth2 tokens to identify users and what they have access to. Users authenticate with other means and are given a token, which they ...
0
votes
0answers
27 views

Initialization Vector in CBC/DES encryption [on hold]

How can i prove that the Initialization Vector is always set to zero in the Cryptool when using CBC or ECB/DES mode?
0
votes
0answers
60 views

Encrypt AES with 2 different keys but the same IV

Let's say I have 2 messages like hi and bye. I will encrypt hi with ...
0
votes
1answer
44 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 ...
0
votes
0answers
14 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 ...
0
votes
1answer
50 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 ...
0
votes
0answers
40 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 ...
0
votes
0answers
39 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$ = ...
0
votes
0answers
29 views

Does the oracle have to have access to the encryption key to the padding oracle attack to work (CBC & PKCS#7)?

Does the oracle have to have access to the encryption key to the padding oracle attack to work (CBC & PKCS#7)? I tried much to get a attach to work, but the oracle doesn't have access to the ...
0
votes
0answers
54 views

How to change the known ciphertext so the known plaintext is changed in AES CBC mode?

I already read a blog about the padding oracle and also some posts about how to change the plaintext but it didn't work out. So I have the encrypted cookie (AES_CBC): ...
0
votes
1answer
42 views

Randomly initialised global counter used to encrypt the kth message with IV = IV + k mod 2^n

The use of an increasing IV is not secure for a block cipher. That is, using a random IV for the first message then IV + 1 for the second , IV + 2 for the 3rd etc. How can I construct an attack to ...
0
votes
0answers
48 views

Aes brute force when part of data known [duplicate]

I have buffer of 16 bytes that encrypt with AES 128 cbc with IV =000000......(all IV is 0) I have the encrypted buffer, and I know 7 bytes from 16 bytes before the encryption , I dont know the key . ...
0
votes
1answer
735 views

Decrypt simple CBC message with known IV using XOR encryption

I've been given a ciphertext message, encrypted using CBC. I know that the block size is 12 bytes and I know the plaintext value of the first block. I also know that the encryption function is a ...
0
votes
0answers
165 views

NRPAD and FPAD padding schemes (Korean Seed?)

I've got an API spec that specifies NRPAD and FPAD as possible padding schemes. I see these being used together with the Korean SEED algorithm. The SEED specification however is void of any padding ...
-1
votes
1answer
337 views

Which block cipher mode does the experts use? [closed]

I want to know which "block cipher mode of operation" does the experts use? I don't want to use ECB or CBC because add padding and padding mess up my code. So which one does the experts use. /Thanks
-1
votes
1answer
722 views

How can you change this message which is in block cipher AES-256 in CBC?

Given is the secret message encrypted with AES-256 in CBC mode 5a04ec902686fb05a6b7a338b6e07760 14c4e6965fc2ed2cd358754494aceffa The first 16 Byte is the initial ...
-1
votes
1answer
111 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?
-1
votes
1answer
1k views

Problems implementing AES in CBC+CTS mode

I'm trying to implement an AES cipher in CBC+CTS mode, but I'm unable to get the second last plaintext block to decrypt properly. I've attached my code, it's based on the steps listed under CBC ...
-1
votes
1answer
1k views

How to perform the padding oracle attack on AES CBC?

Assume I am the attacker. I want to break the plaintext by performing the padding oracle attack on AES CBC mode. I know the following information: ...
-2
votes
2answers
551 views

ciphertext stealing and CTR

Why Does CTR mode encryption not use ciphertext stealing?