@@ -43,22 +43,23 @@ constexpr int8_t kDictionaryPageHeader = 5;
4343constexpr int8_t kColumnIndex = 6 ;
4444constexpr int8_t kOffsetIndex = 7 ;
4545
46- // / Do AES_GCM_CTR_V1 or AES_GCM_V1 encryption
46+ // / Performs AES encryption operations with GCM or CTR ciphers.
4747class AesEncryptor {
4848 public:
4949 static AesEncryptor* Make (ParquetCipher::type alg_id, int key_len, bool metadata,
5050 std::shared_ptr<std::vector<AesEncryptor*>> all_encryptors);
5151
5252 ~AesEncryptor ();
5353
54- // / Size different between plaintext and ciphertext, for this cipher.
54+ // / Size difference between plaintext and ciphertext, for this cipher.
5555 int CiphertextSizeDelta ();
5656
57- // / Key length is passed only for validation. If different from value in
58- // / constructor, exception will be thrown.
57+ // / Encrypts plaintext with the key and aad. Key length is passed only for validation.
58+ // / If different from value in constructor, exception will be thrown.
5959 int Encrypt (const uint8_t * plaintext, int plaintext_len, uint8_t * key, int key_len,
6060 uint8_t * aad, int aad_len, uint8_t * ciphertext);
6161
62+ // / Encrypts plaintext footer, in order to compute the signature (tag).
6263 int SignedFooterEncrypt (const uint8_t * footer, int footer_len, uint8_t * key,
6364 int key_len, uint8_t * aad, int aad_len, uint8_t * nonce,
6465 uint8_t * encrypted_footer);
@@ -73,7 +74,7 @@ class AesEncryptor {
7374 std::unique_ptr<AesEncryptorImpl> impl_;
7475};
7576
76- // / Do AES_GCM_CTR_V1 or AES_GCM_V1 decryption
77+ // / Performs AES decryption operations with GCM or CTR ciphers.
7778class AesDecryptor {
7879 public:
7980 static AesDecryptor* Make (ParquetCipher::type alg_id, int key_len, bool metadata,
@@ -82,11 +83,11 @@ class AesDecryptor {
8283 ~AesDecryptor ();
8384 void WipeOut ();
8485
85- // / Size different between plaintext and ciphertext, for this cipher.
86+ // / Size difference between plaintext and ciphertext, for this cipher.
8687 int CiphertextSizeDelta ();
8788
88- // / Key length is passed only for validation. If different from value in
89- // / constructor, exception will be thrown.
89+ // / Decrypts ciphertext with the key and aad. Key length is passed only for
90+ // / validation. If different from value in constructor, exception will be thrown.
9091 int Decrypt (const uint8_t * ciphertext, int ciphertext_len, uint8_t * key, int key_len,
9192 uint8_t * aad, int aad_len, uint8_t * plaintext);
9293
0 commit comments