1

I just noticed that my key used for ZFS encryption in aes-256-gcm, is not 256 bits long, but only 200 (25 characters). I wonder if another key is derived from this one to have a 256 bits long key, and how ...

zfs get encryption tells me indeed that aes-256-gcm is used.

Thanks,

Sébastien

4
  • how did you get current key size? Feb 7, 2020 at 19:51
  • Well, it's the key I load with zfs loadkey. It's a string of 25 characters. Feb 8, 2020 at 11:30
  • I asked because I wonder about encoding of that file Feb 8, 2020 at 12:03
  • Actually, the cipher used (aes-256-gcm) is chosen by config, and independant of the key loaded with zfs loadkey. So I wonder how the 256 bits key is calculated ... Feb 8, 2020 at 14:31

1 Answer 1

2

I read a bit about ZFS encryption. The file you create is just the wrapping key, it is then used to encrypt the master key (that user will never see), that is randomly generated with a PRNG function, and initialized with an IV.

Now, the function used to generate wrapping key from user input is PBKDF2.

I think it's safe to affirm that:

  • Master key size in your case is 256bit as it should be.
  • Wrapping key is just used to encrypt Master key, it doesn't have a direct relationship with the chosen encryption algorithm. BTW in some sources Caputi talks about fixed 32 bytes wrapping keys, could yours be 256 bit as well maybe encoded in some way?

Added references.

1
  • Great answer. I found this exact explanation in the source code (dsl_crypt.c) Feb 9, 2020 at 11:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .