How to verify MAC with AES-GCM

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to verify MAC with AES-GCM

Ola Martin Lykkja

Dear all,

 

I have a message that is privacy and integrity protected with AES-GCM.

 

The message has three parts, part 1 is device id and nonce, part2 is encrypted payload, and part3 is mac. IV is derived from part 1 and the key is looked up in a database from information in part 1. How do I use the Bouncy Castle library to decrypt the payload and verify the MAC in Java?

 

Best regards,

Ola