assemble secret in correct order

This commit is contained in:
shimun 2020-06-08 18:08:24 +02:00
parent 6f6c84ddba
commit 09be5ef551
Signed by: shimun
GPG Key ID: E81D8382DC2F971B

View File

@ -155,7 +155,7 @@ fn derive_secret(
let (unsalted, cred) = let (unsalted, cred) =
perform_challenge(&credentials, salt, timeout - start.elapsed().unwrap(), pin)?; perform_challenge(&credentials, salt, timeout - start.elapsed().unwrap(), pin)?;
Ok((sha256(&[&unsalted[..], salt]), cred.clone())) Ok((sha256(&[salt, &unsalted[..]]), cred.clone()))
} }
fn read_pin() -> Fido2LuksResult<String> { fn read_pin() -> Fido2LuksResult<String> {