4 ms·
It depends on the protocol and mode, but it’s usually transmitted in the clear along with the encrypted message.
by mcpherrinm 5y ago
It depends on the protocol and mode, but it’s usually transmitted in the clear along with the encrypted message.
- slig 5y agoThanks! I thought it had to be somehow not transmitted in the clear.
- marcan_42 5y agoIt can also be implied by some other system parameter. As long as the same IV is never reused for the same key, it's safe. For example, if you're encrypting data blobs in some kind of CDN and you never mutate old blobs, your IV can be the blob ID. That said, depending on the construction you use, nonrandom IVs can be a problem (they can leak that there's a relationship between different plaintexts if they line up with a difference in the first block), so you're better off at least making it a random function of the key and said blob/etc ID.
- bccdee 5y agoThe IV isn't secret, but in CBC mode it does need to be securely random, otherwise you open yourself up to a class of attacks based on IV prediction. In other modes (CTR, for instance) you can use any nonce you like, so long as you're not reusing it.