0

We need to encrypt a UUID string using AES-GCM-256 and consumer will decrypt it using the same AES-GCM-256.As per the recommendation (RFC) the IV(initialization vector) must be unique for each invocation,I am confused how IV values will be common or shared between encrypter and decrypter.

Community
  • 1
  • 1
dReAmEr
  • 6,986
  • 7
  • 36
  • 63
  • 2
    How will you transmit the data? An IV does not need to be secret, just unique per invocation. There is [some discussion here](http://stackoverflow.com/questions/4504280/encryption-with-aes-256-and-the-initialization-vector?rq=1) – KevinO May 24 '16 at 16:54
  • but on the decrypter side,how he will know what is the value of IV,it should be same?? – dReAmEr May 24 '16 at 16:56
  • 2
    I would prepend the IV (it is a fixed number of bytes) to the transmission. On the receiving side, strip off the first *N* bytes, use that as the IV, and then decrypt. – KevinO May 24 '16 at 17:14

0 Answers0