Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [initialization-vector]

Unique data used by block cipher modes of operation to randomize the output in order to achieve semantic security. Also for other similar constructs in other iterative algorithms.

0
votes
0answers
23 views

Maximum key stream sequence per key/IV pair in communication protocols

In the paper "LIZARD – A Lightweight Stream Cipher for Power-constrained Devices", one of the design rational of Lizard cipher is key stream size per key/iv pair. A5/1 produces only 228 keystream ...
1
vote
1answer
50 views

AES-GCM cipher tag and IV size, while attempting to render encrypted ciphertext useless by removing them

I'm using AES in GCM mode of operation for encryption/decryption & authentication of segments of data in a file. The layout of each segment can be summerized by this diagram. Each segment is ...
0
votes
1answer
36 views

how to compute IV with AES CTR if key, plaintext and ciphertext are known?

Given $E_k$, which a block-cipher using the (known) key $k$, and a plaintext-ciphertext pair $(p,c)$ where $c$ is the encryption of $p$ using CTR mode, can the initialization vector be recovered using ...
0
votes
2answers
61 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 ...
1
vote
1answer
69 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
2answers
355 views

AES256 GCM IV guidelines

If I use for example AES256 (GCM), and my message is bigger than 256bit (breaked into smaller 256bit blocks for encryption), should the IV change every 256bit of the message?
1
vote
1answer
45 views

AES-256-CBC with random IV - storing same plaintext as same ciphertext

I am encrypting some information stored in a column of a MySQL database. The column can contain repeated values, let's say the table has 7 rows and the column to be encrypted has the following values:...
1
vote
2answers
58 views

Why can´t an attacker find the key if he has the plain text, the IV and the ciphertext? [duplicate]

I am reading a book about web security and they are now talking about AES CBC. After reading the chapter I was wondering, can an attacker compute my secret key if he has access to the IV, the plain ...
1
vote
1answer
48 views

With AES-GCM, may I use multiple tags per key?

In my implementation of AES-GCM, the key might change only once per minute. However, I wish to calculate a new tag every 6us, to reduce latency (since you have to buffer up a GCM "packet" before ...
2
votes
2answers
95 views

Safely erasing encrypted data

My secret message is encrypted in a byte buffer with AES-128 in CBC mode. The first 16 bytes are the IV and the message follows contiguously. If I want to securely delete this message is it enough ...
2
votes
1answer
118 views

Is an IV useless for encrypting database IDs?

In my scenario I need to build a pseudo-anonimization service: a machine that given a plainID return a chiperID and vice-versa. <...
4
votes
1answer
170 views

Crypto-shredding a file by erasing the IV instead of erasing the Key

Imagine an authenticated, encrypted file system, which uses AES-256-CTR to encrypt a 64 KB file sector, then uses HMAC-SHA256 to authenticate the 64 KB file sector (including the IV). IVs are 128-bit, ...
1
vote
1answer
94 views

Simulation of Chosen Plaintext Attack on CBC, Predictable IV with OpenSSL

I would like to simulate the CBC IV attack where the IV is predictable. It's described in the answer to this question: chosen plaintext attack on CBC, predictable iv (Only "Yes" and "No" are valid ...
0
votes
1answer
59 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,...
1
vote
2answers
72 views

Encryption using deterministic CSPRNG as secure as CSPRNG

As a beginner it seems that a scheme derived from a CSPRNG should be as secure as that CSPRNG. Is this a correct assumption? Are there restrictions or known special cases? A rough outline would be: ...
2
votes
1answer
106 views

Does it matter how the IV and XOR are applied for a single AES-128 block?

I want to encrypt 128 bits of data. I understand the problem with ECB, so I generate a 128-bit Initialization Vector to use for encryption and send with the encrypted data. Is there a "best" way to ...
0
votes
2answers
110 views

Can I find the IV of a single block of SHA256, given the plaintext and digest?

Each 512-bit block of SHA256 takes an initialization vector (IV) and message schedule and returns a digest. Knowing the message schedule and resulting digest, is it feasible to reverse the algorithm ...
1
vote
1answer
446 views

Decrypting an encrypted aes 256 cbc text with random IV, decrypts the string [duplicate]

This may be a basic question but bear with me. I started encrypting a text with aes 256 cbc mode generating a random iv of 16 bytes and a key. ...
1
vote
2answers
77 views

Encrypting current time using 3DES as a signature

I came across a peculiar system for generating "signatures" ("signatures" is within quotes because this is a bad use of 3DES) in the wild. It works as follows: a symmetric key is generated and used ...
1
vote
1answer
302 views

Does an IV need to be used in AES CTR mode?

If I encrypt a message once using AES CTR, will I need an IV? Additionally, if I do use an IV, will I need to send with with the cipher text?
4
votes
1answer
170 views

Is it ok to transmit an IV as a custom HTTP header?

Considering an AES OFB encryption algorithm, suppose that I'm sending a message over HTTP (not HTTPS) and my message body contains the cyphertext. I'd like to know if transmitting a random ...
1
vote
0answers
52 views

Help decrypting AES-256-CBC data with bad initialization vector of 0xC0FFEE

For a game I am trying to decrypt data that was originally encrypted using AES-256-CBC given a key and the following initialization vector: 0xC0FFEE The initialization vector appears to be short, ...
0
votes
1answer
120 views

Is encrypting multiple message with same key and iv secure for this case? [duplicate]

AES256, CBC IV is sha512 of key. Ek[random padding | message | random padding] How much information would be leaked from the use of the same IV & key in this way, assuming the adversary has ...
8
votes
2answers
410 views

Which attacks are prevented by the different initial hash values for SHA-2 with truncated output?

NIST specified SHA-2 hash functions with truncated output. Those hashes use different initialization values than SHA-256 or SHA-512. SHA-224 is based on SHA-256. SHA-384, SHA-512/224 and SHA-512/256 ...
0
votes
1answer
69 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
158 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 ...
3
votes
1answer
149 views

Would it be safe to use the message hash as the IV in ChaCha?

This seemed like an option if the hash is unpredictable. It could be the hash of the message or the hash of the message + some common secret (apart from the key). The only circumstance in which the ...
0
votes
1answer
69 views

Sending the nonce in ChachaPoly1305 with the ciphertext

I am trying to implement a ChachaPoly1305 encryption with authentication scheme over a network. I am using a counter to derive the nonce as suggested by the rfc. Is it secure to send the nonce over ...
-1
votes
1answer
395 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 ...
4
votes
3answers
406 views

Reusing IV in AES for encrypting file

Everyone says that you shouldn't use the same IV and Key. Is it safe to use the same IV and Key on only one file. EDIT: I will be using CBC or CFB encryption modes so the IV will be updated based on ...
3
votes
2answers
118 views

Generate $J_0$ for GCM cipher when $\operatorname{len}(IV) \neq 96$ bits

I have the following questions about the construction of J0 when is not equal to 96 bits, $s= 128\big\lceil \operatorname{len}(\text{IV})/128\big\rceil-\operatorname{len}(\text{IV})$ For example if ...
0
votes
2answers
64 views

Does selecting a set of random numbers for the key and IV insure security?

For AES 256 - if I use a random 32 byte sequence for the 256 bit key and another 16 byte for the 128 bit initialization vector, does this insure that my cipher text cannot be broken in any short ...
2
votes
1answer
230 views

Do aes_256_gcm IVs just need to be unique for that key?

I'm using GCM (via openssl's EVP_EncryptInit_ex(ctx, EVP_aes_256_gcm(), NULL, NULL, NULL))). The IV's default length is 12 bytes. It says that the IV must be ...
-1
votes
4answers
237 views

IV vector is not random. Is it critical?

Reading the spec of one of the IoT protocols, I found that IV for it one isn't actually random, it consist of $n$ bytes that represents manufacter-specific string; the same for all devices plus 6 ...
4
votes
4answers
699 views

Text partially decrypted regardless of IV

I'm trying to work out which AES cipher is best to use. I'm working with the OpenSSL ruby gem. While testing the various options I noticed that most of the ciphers result in partial or even full ...
6
votes
4answers
6k views

Is using the same IV in AES similar to not using an IV in the first place?

So if I understand how an IV works with AES, I'm supposed to generate a different IV for every message because using only a key, I will get the same encryption if the message was encrypted twice (...
0
votes
1answer
407 views

AES in OFB mode and IVs

I'm trying to understand cryptosystems and their implementations to understand how to properly implement them. I have a function implementing AES-128 in OFB mode. Let's call it ...
0
votes
1answer
70 views

WEP - Vulnerable IV

When performing a FMS attack, why does the attacker have to look for a specific IV, namely, in the form of (A+3, N-1, X)? Why can't he just use any IV? This might be a naive question but I really can'...
3
votes
2answers
794 views

What is the role of IV in Stream Cipher? Why is it needed and what is it's importance?

I ran into this problem when I read the stream ciphers and did not find a satisfactory answer. Why is an IV needed in stream ciphers, and what is the importance of using it?
0
votes
1answer
223 views

AES in CTR mode, with a single key, and an IV derived from the plaintext

We need a system to compare cipher-texts for equality, without (the checking system) having access to the plaintext. We found a library that uses AES in CTR mode, with a single key, and an IV based ...
0
votes
1answer
492 views

When it is safe to reuse IV? (or not using at all)

This is my case: I don't have padding oracle (the server provide the data and users never able to execute the encryption function), I never encoding the same text twice. The text is always short - ...
1
vote
1answer
363 views

Security of a sha-256 based stream xor cipher?

Provided that I have some data I want to cipher and a password to do it: I generate a random IV I define c = sha256(password) I generate an infinite stream where <...
2
votes
0answers
277 views

Seekable cipher, is AES CTR a good solution?

I'd like to create a simple file-cipher, which provides seekable encryption (so I can decrypt any part of the encrypted message, without the need of decrypt from the start). Here's my current idea: I ...
0
votes
1answer
717 views

The IV for AES-128

I'm trying to understand this: [AES_128] REQUIRES the same 16-octet Initialization Vector (IV) to be supplied when encrypting and decrypting. Varying this IV increases the strength of the ...
4
votes
1answer
439 views

In a AES-CBC + HMAC architecture, Is it secure to send a second IV in a message to a device incapable of producing satisfactory random numbers?

There are many threads here explaining the need of a random and unpredictable IV for the AES-CBC. I am building a home automation system with security for a school project where a Raspberry Pi ...
1
vote
1answer
738 views

Get IV from Key, Clear and Cipher text in AES-256 CBC

Newbie question here but can I get the IV if I know the Key, plain text and chiper text ? (I thought that if I encrypt 16 first bytes of clear with the key and 16 first bytes of cipher text as IV it ...
0
votes
1answer
249 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?
7
votes
1answer
831 views

Deterministic Encryption with AES GCM - how to choose the IV (nonce)

I have not a very large background in cryptography so I hope these questions are not very dumb. I don't want to reinvent the wheel, I'm just looking for advise on the best practices about how to build ...
2
votes
1answer
77 views

calculate ESS IV initialization vector for aes- bc essiv encryption

I want to do block level encrypton on my ext4 image file system with aes-cbc-essiv How can I find/calculate the the ESSIV needed for encryption?