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 [initialisation-vector]

The tag has no usage guidance.

-1
votes
1answer
416 views

Reuse of IV for AES CTR stream cipher [closed]

Wikipedia describes the following about IV reuse for stream cipher: For OFB and CTR, reusing an IV completely destroys security. This can be seen because both modes effectively create a bitstream that ...
0
votes
0answers
149 views

Problem using padding oracle attack on this base64 - url coded message (AES CBC 256)

I'm supposed to write a script that will get the plaintext of a message which is firstly coded in base64, then URL coded (encoded ciphertext in AES-256-CBC). Padding is used as well such that the ...
3
votes
1answer
308 views

How can you change the plaintext of the given secret message which is in AES-256 CBC

Say you have the secret message encrypted with AES-256 in CBC mode 5a04ec902686fb05a6b7a338b6e07760 14c4e6965fc2ed2cd358754494aceffa where the first 16 Byte is the initial vector, the second 16 Byte ...
1
vote
0answers
127 views

Security of “queryable” encryption?

Spring Security has a utility method called Encryptors.queryableText. The explanation for it is: The difference between a queryable TextEncryptor and a standard TextEncryptor has to do with ...
1
vote
1answer
159 views

Should I store my encrypted password's salt and initialization vector as clear text?

I'm encrypting some file with AES-256-CBC, and I'm planning to store the cipher text in a json file, with something like: { "data": "0123456789ABCDEF...", "salt": "00123ABCAABBCCDD...", "...
0
votes
1answer
134 views

Is it safe to include the IV at the end of a hash?

I have a PHP function I have written that uses a 64 bit binary string and a random initialization vector to encode data using the following basic principal: $encrypted = openssl_encrypt($...
0
votes
2answers
2k views

How to store an AES Key? an Initialization Vector(IV)?

I'm currently developing an authentication service for our company. I somehow understand how to store a salt used in hashing a password in that it should be stored together with the hashed password. ...
11
votes
0answers
607 views

OpenSSL EVP aes_256_cbc Initialization Vector Size

I'm looking at the crypto library examples (programmed in c) provided for OpenSSL EVP on OpenSSL Wiki. Their example for a 128 bit Initialization Vector is as follows: /* A 128 bit IV */ ...
1
vote
1answer
911 views

Is it secured to store the encrypted key in the database (encrypted by other cipher)?

I want to improve the encryption flow used by my application. Today I use the AES cipher while its key and its IvBuffer are hardcoded in the code. I know it is not secured and I want to improve this. ...
0
votes
2answers
5k views

AES-256-CBC encryption IV vs salt when encrypting files with a secret key

I am writing a small class to add to my application that will handle things like config secrets. (I don't want to get into this topic as a lot of research has gone into the approach we've decided to ...
1
vote
2answers
1k views

Regarding number of packets needed to crack WEP

One of the major weaknesses of WEP is a short 24-bit IV, which means that only 224 packets are needed to exhaust all IVs. 224 translates to about 16.5 million IVs (or packets for that matter). ...
2
votes
1answer
664 views

Choosing Key and IV in AES-256

I am working on a real-life project for a firm. I have to encrypt data using AES 256 as per specification. I want to know how are the key and IV are really chosen in real world projects. /dev/urandom ...
19
votes
6answers
8k views

Why does IV not need to be secret in AES CBC encryption?

According to Wikipedia, the initialization vector (IV) does not have to be secret, when using the CBC mode of operation. Here is the schema of CBC encryption (also from Wikipedia): What if I encrypt ...
0
votes
1answer
136 views

AES-CTR with PBKDF2 for IV for file archiving at server. Is this ok?

I have tried to grasp enough of encryption/hashing to be able to implement a secure storage for files, server side. Once I have it down to reasonably safe I'll go over it with an expert. There is no ...
3
votes
1answer
167 views

Is having a unique key to encrypt data not sufficient

Is it necessary to use a unique Initialization Vector (IV) with various cipher modes of operation (e.g. CBC) even though I use a unique key to encrypt plain text every time? It is said that an IV ...
3
votes
2answers
352 views

Could I use a TimeStamp also as IV?

For an academic application, I use AES-GCM to encrypt my frames between 2 parties. To enhance security, and reduce the possibility of replay, I'd like to use a TimeStamp in my frame exchanges. But, ...
1
vote
2answers
662 views

Is an Initialization Vector (IV) required with unique data?

When used to encrypt data that is unique, is an Initialization Vector (IV) still required? For example, Credit Card numbers or Social Security numbers. The ultimate point of an IV is to ensure that ...
6
votes
1answer
491 views

Using AES with same salt / IV - required for pattern matching algorithm

I need to securely encrypt data we are storing, but for each client I need the same plaintext to encrypt into the same cypher text. The reason for this is the data is still required for a pattern ...
2
votes
0answers
74 views

Determining time it would take to exhaust IVs on 802.11b/g/n

I'm trying to learn about WEP attacks at the moment. I know that attacks against WEP require collisions of the initialization vectors. Is there a way to determine how long it would take for the ...
5
votes
2answers
852 views

Two ways of generating the IV

I'm looking at some code, and in a particular scenario, the code would need to generate two IVs. The second IV-generating code simply uses the C# Rijndael GenerateIV() The first IV-generating code ...
3
votes
1answer
2k views

How to implement encrytion/decryption system using IV between mobile app and web service

In my app we are going to send encrypted data to the web service. I am using the following code to encrypt and decrypt the data - public class DecEn { private static final String password = "test"...
16
votes
4answers
44k views

Encrypting using AES-256, can I use 256 bits IV?

I want to encrypt data using AES in java, and I want to intialize the cipher with Initialisation Vector. Can I use 256-bits IV ? Or I must use only 128-bits IV ?
5
votes
1answer
189 views

Do IVs need to be unpredictable?

I am encrypting a sequence of messages with AES/CTR. For each sequence, I generate a random initial IV, say IV(0). Define IV(i) = MD5(IV(i - 1)) for i = 1, ..., n. Then for each message m(i), I ...
2
votes
1answer
156 views

For use with RC4 how do I combine a reused key and an initialization vector

I am an a-level student writing an encryption program using an rc4 implementation I have written myself. I have the basic algorithm coded correctly (and I have checked that some ciphertext for a given ...
0
votes
0answers
329 views

Cryptographic Testing

Given an algorithm (say, AES), how to create/generate test vectors? I have tried using the NIST test vectors for AES and found it to be working fine with a package of "chilkat". Suppose, for a ...
7
votes
2answers
1k views

Can the IV + Salt be the same?

During my encryption app i've got the password creation bit: PBEKeySpec spec = new PBEKeySpec(password.toCharArray(), salt, 10000, keyLength); and later on the actual encryption part: cipher.init(...
6
votes
2answers
7k views

What's the point of the nonce in CTR mode?

Does having a nonce in CTR mode actually improve security (vs. just using 1, 2, 3, etc. - basically a constant nonce of 0)? As far as I can tell, the best-case scenario security-wise is that the ...
7
votes
2answers
15k views

Is Salt, IV and Key necessary when encrypting password in a database using AES? If so, how should they be used?

Imagine I have a website with user accounts. I want to authenticate users, so I need to know if the password they provide matches the one stored in my database. To protect the passwords from prying ...
1
vote
1answer
221 views

How to generate Initalization Vectors correctly

I'm working on a project that splits large files into several encrypted fixed-size blocks (e.g. 4KiB). Those blocks shall be used to be stored persistently on a storage device. Blocks are encrypted ...
9
votes
2answers
21k views

Why would you need a salt for AES-CBS when IV is already randomly generated and stored with the encrypted data?

I was looking at this code and came across these comments which says encrypting without a salt is insecure. Why would it be insecure when you are already using a random IV for each value? I think the ...
0
votes
1answer
875 views

encrypting a file with an RSA key

I wrote a java program to encrypt and decrypt files using AES algorithm in CBC mode and a random initialization vector. but there is something fundamental I'm not understanding:first I generate a ...
3
votes
3answers
2k views

Is there an attack that can modify ciphertext while still allowing it to be decrypted?

Is there any way an encrypted file using AES-256 could be modified without alerting the file owner, ie., so it can still be decrypted with the same key? I know that without an initialization vector ...
4
votes
2answers
15k views

Using AesCryptoServiceProvider in C#, should using an incorrect IV mangle just the first block?

This question was also asked on StackOverflow, but with no answers, and I thought this may be a better exchange, since I have the same question. https://stackoverflow.com/questions/9331984/using-c-...
19
votes
2answers
16k views

Should AES always give the same output?

I'm having trouble understanding AES and would like to know if encrypting the same text with the same key two times in a row should give the same output. Is there any salt or something that would ...
11
votes
3answers
2k views

How do poor-quality initialization vectors affect the security of CBC mode?

(If the consensus is that this question belongs on crypto, rather than here, please feel free to [tell me to] migrate it.) From what I have read (looking specifically at AES in Cipher Block Chaining ...
2
votes
1answer
180 views

Is it safe to derive an IV partially from the secret data if it is hashed before use?

To help ensure uniqueness of IV's used in a CFB AES-256 cipher, software I know of gathers bits from various sources including the plaintext being enciphered, and runs that through an SHA-256 hash. ...