clearhaus / aes256gcm_decrypt

Decrypt AES256GCM-encrypted data in Apple Pay Payment Tokens.
MIT License
10 stars 1 forks source link

Accept in C the ciphertext including the tag #3

Closed ct-clearhaus closed 6 years ago

ct-clearhaus commented 6 years ago

That is, do not input tag from Ruby, but split ciphertext into untagged_ciphertext and tag in the C ext.

WDYT?

ct-clearhaus commented 6 years ago

If it's not less code (in total) then I vote against myself.

mt-clearhaus commented 6 years ago

I like that the magic splitting (the tag length is a bit magic in data[0..-17] and data[-16..-1]) is contained in the C code, i.e. in the aes256gcm_decrypt library. The change is a part of https://github.com/clearhaus/aes256gcm_decrypt/pull/5 .