adamreeve commented on PR #54884:
URL: https://github.com/apache/arrow/pull/54884#issuecomment-6353558293

   I was also a bit confused about how signing and verifying the footer with 
AES-CTR would even work, because AES-CTR doesn't write a tag. It looks like we 
just assume the last 16 bytes of the encrypted data are the GCM tag when 
writing: 
https://github.com/apache/arrow/blob/14132604b3949ba1c25cc79fff2e1782b9efc413/cpp/src/parquet/metadata.cc#L885-L886
   
   And then do the same when reading: 
https://github.com/apache/arrow/blob/14132604b3949ba1c25cc79fff2e1782b9efc413/cpp/src/parquet/metadata.cc#L1217-L1218
   
   So the "tag" is actually just the last bytes of the AES-CTR encrypted data 
and the round trip succeeds


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to