You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iceberg.apache.org by GitBox <gi...@apache.org> on 2018/12/01 00:57:35 UTC

[GitHub] omalley edited a comment on issue #20: Encryption in Data Files

omalley edited a comment on issue #20: Encryption in Data Files
URL: https://github.com/apache/incubator-iceberg/issues/20#issuecomment-443383660
 
 
   Ok, I'd separate out the key information from the encryption data:
   
   ```
   struct KeyDescription {
     String keyName;
     int keyVersion;
   }
   
   struct FileKey {
     KeyDescription key;
     byte[] decryptedKey;
     byte[] encryptedKey;
   }
   
   struct FileEncryptionMetadata {
     KeyDescription key;
     byte[] encryptedKey;
     byte[] iv;
     String algorithm;
   }
   
   interface KeyManager {
      // Create a key for a single file.
      FileKey createFileKey(String keyName);
   
      // Decrypt a single file key
      byte[] decryptKey(KeyDescription key, byte[] encryptedKey);
   
      // Decrypt a list of keys
      List<byte[]> decryptKeys(KeyDescription key, List<byte[]> encryptedKeys);
   }
   ```
   
   The KMS doesn't need the path, iv, or the algorithm. But I think this is starting to look good.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services