1
$\begingroup$

How to get secret key based on multiple passwords? e.d we have cipher encrypted by combination of passwords "qwe" and "asd", and our purpose to decode the cipher using any of passwords above separately?

Thanks

$\endgroup$
  • $\begingroup$ I actually answered a question with the same solution as this recently, I will see if I can find it $\endgroup$ – Richie Frame Aug 17 '16 at 0:33
  • $\begingroup$ maybe it was not the same, but quite similar and adaptable to this problem: crypto.stackexchange.com/questions/33030/… $\endgroup$ – Richie Frame Aug 17 '16 at 0:46
2
$\begingroup$

You can do this by generating a (random) encryption key for the data and then encrypting that key separately with each of the passwords, using some password-based encryption.

To decrypt the user can use any of the passwords to decrypt the encryption key, then use that to decrypt the actual data. If the password-based encryption used is authenticated encryption, the decrypter can decrypt each of the encrypted keys and use the one where the authentication checks out.

$\endgroup$
2
$\begingroup$

It is basically a two level encryption:

  • passphrase (possibly passed throught a KDF) is used for master key encryption

  • master key is used for data encryption

  • multiple key-slot, once for every passphrase are possible

  • there is only one master key

  • there are as many encrypted master keys as the number of passphrases

You can find a valid example in LUKS (Full Disk Encryption solution) https://gitlab.com/cryptsetup/cryptsetup

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.