awslabs / aws-c-cal

Aws Crypto Abstraction Layer: Cross-Platform, C99 wrapper for cryptography primitives.
Apache License 2.0
33 stars 36 forks source link

Make AES GCM more consistent cross platform #189

Closed DmitriyMusatkin closed 3 weeks ago

DmitriyMusatkin commented 3 weeks ago

Issue #, if available:

Description of changes: Warning Backwards Incompatible change: moved gcm tag out of the constructor into a separate setter, since it was leading to a whole bunch of annoying corner cases, that was not handled consistently cross platform. And arguably having tag as a separate setter is a bit cleaner design, since we already complicate logic, by abstracting away encryptor vs decryptor

Outside of that, changes are mostly extra tests and corresponding changes to make everything consistent cross platform

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.