subzero icon indicating copy to clipboard operation
subzero copied to clipboard

Mix entropy with hmac instead of xor

Open alokmenghrajani opened this issue 5 years ago • 2 comments

Xor was simpler to implement but hmac would be cleaner.

alokmenghrajani avatar Aug 25 '20 07:08 alokmenghrajani

I'm probably being too pedantic here, but we should probably use a proper KDF rather than hmac. Some options would be: HKDF, PBKDF, or Argon2.

ivmaykov avatar Oct 05 '23 00:10 ivmaykov

Agree. It's probably overkill (even a simple hash of the two concatenated buffers should be fine). It's computationally cheap to use a KDF and buys some peace of mind.

alokmenghrajani avatar Oct 05 '23 10:10 alokmenghrajani