Given a random 256bit key used for data encryption with Streaming AES GCM
I would like to wrap it for backup with AES GCM.
Is it safe to use
HKDF(
km = new random 256bit key
salt = Argon2(weak password) 256bit
algo = HMACSHA512
outputkey = 256bit )
in theory the km parameter has to be stored safely offline in hex format, similarly on how bip39 does with mnenonic words. And the produced 256bit are used to wrap the first DEK with aes gcm
Is there a better way to hash a random 256bit with a user password to generate a new high entropy 256bit for aes?
Protocol clarification:
Master key 256bit generated within Android TEE ->
wraps with GCM { Master Google Tink Key }
Master Google Tink Key ->
wraps with GCM{ DEK1, DEK2 ... }
Each DEK is generated randomly and it is used to encrypt 2 files with AES GCM Streaming AEAD HKDF 4K wich I suppose internally generates new keys and IV to encrypt each block
and then
HKDF(
km = new random 256bit key + Argon2(weak password) 256bit
salt = empty
info = empty
algo = HMACSHA512
outputkey = 256bit)
outputkey -> wraps with GCM { Master Google Tink Key }