hynek / argon2-cffi

Secure Password Hashes for Python
https://argon2-cffi.readthedocs.io/
MIT License
549 stars 47 forks source link

Question: Can output from argon2.low_level.hash_secret_raw() → bytes directly used to derive aes key? #126

Closed evil-user closed 2 years ago

evil-user commented 2 years ago

Hi @hynek can output from argon2.low_level.hash_secret_raw(secret: bytes, salt: bytes, time_cost: int, memory_cost: int, parallelism: int, hash_len: int, type: argon2.low_level.Type, version: int = 19) → bytes be used as cryptographic key?

hynek commented 2 years ago

I think you'd want hash_secret_raw for that?

evil-user commented 2 years ago

@hynek i want to use argon2 as key derivation function will hash_secret_raw be suitable for such use

hynek commented 2 years ago

Argon2 is a key-derivation library, but I'm not comfortable answering such a general question. I would take it to https://crypto.stackexchange.com or the Argon2 authors.