Skip to content

Commit

Permalink
Pin code is used in the endian mode of the processor (project-chip#5726)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjzander-signify committed Mar 31, 2021
1 parent cc5f4d0 commit c544951
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/transport/PASESession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ CHIP_ERROR PASESession::Init(uint16_t myKeyId, uint32_t setupCode, SessionEstabl
CHIP_ERROR PASESession::ComputePASEVerifier(uint32_t setUpPINCode, uint32_t pbkdf2IterCount, const uint8_t * salt, size_t saltLen,
PASEVerifier & verifier)
{
return pbkdf2_sha256(reinterpret_cast<const uint8_t *>(&setUpPINCode), sizeof(setUpPINCode), salt, saltLen, pbkdf2IterCount,
uint8_t littleEndianSetupPINCode[sizeof(uint32_t)];
Encoding::LittleEndian::Put32(littleEndianSetupPINCode, setUpPINCode);

return pbkdf2_sha256(littleEndianSetupPINCode, sizeof(littleEndianSetupPINCode), salt, saltLen, pbkdf2IterCount,
sizeof(PASEVerifier), &verifier[0][0]);
}

Expand Down

0 comments on commit c544951

Please sign in to comment.