Adding the new encryptor and decryptor interfaces#59
Conversation
|
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format? or See also: |
avalerio-tkd
left a comment
There was a problem hiding this comment.
LGTM. Just a comment on the licensing header.
| @@ -0,0 +1,39 @@ | |||
| // Licensed to the Apache Software Foundation (ASF) under one | |||
There was a problem hiding this comment.
I'd be careful with the licensing header. I guess this is not Protegrity specific, but only add it if others at the same level of detail include them already
There was a problem hiding this comment.
Yes, these are the licensing details for header files in this directory. Also, this is the Arrow encryption interface, so it must share the licensing.
| /// Encrypt footer metadata for signature verification purposes only. | ||
| /// This method is used specifically for footer signature verification in encrypted | ||
| /// Parquet files with plaintext footers. It encrypts the footer metadata using | ||
| /// the provided key, AAD, and nonce to generate an authentication tag that can | ||
| /// be compared against a stored signature. | ||
| virtual int32_t SignedFooterEncrypt(::arrow::util::span<const uint8_t> footer, | ||
| ::arrow::util::span<const uint8_t> key, | ||
| ::arrow::util::span<const uint8_t> aad, | ||
| ::arrow::util::span<const uint8_t> nonce, | ||
| ::arrow::util::span<uint8_t> encrypted_footer) = 0; |
There was a problem hiding this comment.
we removed some of these (i.e. aad, key) parameters from the ::Encrypt() call - why are we keeping them in the ::SignedFooterEncrypt() ?
Adding the basic Encryptor and Decryptor interfaces.
These are intended to abstract away the Aes version of the encryptors and decryptors so user can choose other types to use.