Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

LUKS volumes have the ability to allow multiple independently usable passwords, as explained here: []

The intuition behind basic encryption with a single key is pretty straightforward.

ciphertext = BIG_FUNCTION(plaintext, key)
plaintext = BIG_FUNCTION^(-1)(ciphertext, key)

Can anyone explain how a LUKS volume can permit independently usable passwords? I'm just looking for the intuition - not necessarily a detailed explanation of how LUKS in particular handles this.

share|improve this question
up vote 1 down vote accepted

Roughly your password is used to encrypt a MasterSecretKey. Then you use this MasterSecretKey with a symmetric algorithm to encrypt or decrypt your data (the disk sectors). They eight key slots in LUKS are eight different encryptions of the same MasterSecretKey under eight different passwords.

See also this image: (original web page: (original image is not more available)

Actually LUKS does not encrypt the MasterSecretKey with a password but with a key, generated with a PBKDF.

A similar approach is used by GPG when you send a message to a set of distinct recipients.

This is usally know as KEM/DEM paradigm: Key Encapsulation Method/Data Encapsulation Method and it is the standard method when you use public key to encrypt something.

share|improve this answer
Thank you, that's very clear. Does that have any negative impact on security, other than the obvious practical one that a brute-force attacker is up to (say) 8x more likely to guess a valid password? – SauceCode Feb 19 '15 at 20:15
Nope. Under the hypothesis that the encryption scheme used to encrypt the MasterSecretKey is secure. A standard encryption scheme does not leak any information about the plaintext if it is encrypted under multiple and different keys. – ddddavidee Feb 19 '15 at 20:18
Thank you, that is helpful. – SauceCode Feb 19 '15 at 20:21
Actually in general some related keys attacks exists but it is very unlikely for this context. – ddddavidee Feb 20 '15 at 7:15
Anything you could point me toward, out of curiosity? – SauceCode Feb 20 '15 at 13:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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