subscriptions-project / encryption

Apache License 2.0
7 stars 5 forks source link

Add raw AES-GCM key to document head instead of Keyset #2

Closed elijahsoria closed 4 years ago

elijahsoria commented 4 years ago

Modifies the key stored in the cryptokeys script in head to go from sending an entire Keyset vs. just the raw symmetric key. This makes it so we can use different cryptographic packages to encrypt/decrypt.

Changes the prefix type of the encrypted messages from "TINK" to "RAW", meaning that no extra information about the keys gets appended to the encrypted text: https://github.com/google/tink/blob/master/proto/tink.proto#L70

Capitalizes names in JSON object so that golang exports them correctly.

elijahsoria commented 4 years ago

Checked the tests and they all pass because we don't validate the encrypted text itself, just check to make sure that it is generated.