nl::Weave::Profiles::Security::Passcodes
This namespace includes all interfaces within Weave for the Weave passcodes library within the Weave security profile.
Summary
Enumerations |
|
---|---|
@278{
|
enum Weave passcode encryption configuration types. |
@279{
|
enum Weave passcode encryption protocol parameter sizes. |
Variables |
|
---|---|
kPasscodeEncKeyDiversifier = { 0x1A, 0x65, 0x5D, 0x96 }[]
|
const uint8_t
Key diversifier used for Weave passcode encryption key derivation.
|
kPasscodeFingerprintKeyDiversifier = { 0xD1, 0xA1, 0xD9, 0x6C }[]
|
const uint8_t
Key diversifier used for Weave passcode encryption key derivation.
|
Functions |
|
---|---|
DecryptPasscode(const uint8_t *encPasscode, size_t encPasscodeLen, uint8_t *passcodeBuf, size_t passcodeBufSize, size_t & passcodeLen, GroupKeyStoreBase *groupKeyStore)
|
Decrypt a passcode that was encrypted using the Nest Passcode Encryption scheme.
|
DecryptPasscode(const uint8_t *encPasscode, size_t encPasscodeLen, const uint8_t *encKey, const uint8_t *authKey, const uint8_t *fingerprintKey, uint8_t *passcodeBuf, size_t passcodeBufSize, size_t & passcodeLen)
|
Decrypt a passcode that was encrypted using the Nest Passcode Encryption scheme.
|
EncryptPasscode(uint8_t config, uint32_t keyId, uint32_t nonce, const uint8_t *passcode, size_t passcodeLen, uint8_t *encPasscode, size_t encPasscodeBufSize, size_t & encPasscodeLen, GroupKeyStoreBase *groupKeyStore)
|
Encrypt a passcode using the Nest Passcode Encryption scheme.
|
EncryptPasscode(uint8_t config, uint32_t keyId, uint32_t nonce, const uint8_t *passcode, size_t passcodeLen, const uint8_t *encKey, const uint8_t *authKey, const uint8_t *fingerprintKey, uint8_t *encPasscode, size_t encPasscodeBufSize, size_t & encPasscodeLen)
|
Encrypt a passcode using the Nest Passcode Encryption scheme.
|
GetEncryptedPasscodeConfig(const uint8_t *encPasscode, size_t encPasscodeLen, uint8_t & config)
|
Get the configuration type of an encrypted passcode.
|
GetEncryptedPasscodeFingerprint(const uint8_t *encPasscode, size_t encPasscodeLen, uint8_t *fingerprintBuf, size_t fingerprintBufSize, size_t & fingerprintLen)
|
Get the fingerprint value associated with an encrypted passcode.
|
GetEncryptedPasscodeKeyId(const uint8_t *encPasscode, size_t encPasscodeLen, uint32_t & keyId)
|
Get the id of the key used to encrypt an encrypted passcode.
|
GetEncryptedPasscodeNonce(const uint8_t *encPasscode, size_t encPasscodeLen, uint32_t & nonce)
|
Get the nonce value associated with an encrypted passcode.
|
IsSupportedPasscodeEncryptionConfig(uint8_t config)
|
bool
Returns true if the supplied passcode encryption configuration is supported by the passcode encryption/decryption APIs.
|
Structs |
|
---|---|
nl:: |
Enumerations
@278
@278
Weave passcode encryption configuration types.
Properties | |
---|---|
kPasscodeConfig1_KeyId
|
Dummy key id used for test passcode configuration #1. |
kPasscode_Config1_TEST_ONLY
|
Passcode encryption configuration #1 is not using encryption and secret keys to authenticate and fingerprint passcode. This configuration SHOULD be used for TEST purposes only. |
kPasscode_Config2
|
Passcode encryption configuration #2 is using AES-128-ECB encryption with 8 byte HMAC-SHA-1 integrity and 8 byte HMAC-SHA-1 fingerprint. |
@279
@279
Weave passcode encryption protocol parameter sizes.
Properties | |
---|---|
kPasscodeAuthenticationKeyLen
|
Passcode authentication (SHA-1) key length. |
kPasscodeAuthenticatorLen
|
Passcode authenticator length. |
kPasscodeEncKeyDiversifierSize
|
Passcode encryption application key diversifier size. |
kPasscodeEncryptionKeyLen
|
Passcode encryption (AES-128) key length. |
kPasscodeFingerprintKeyDiversifierSize
|
Passcode fingerprint key diversifier size. |
kPasscodeFingerprintKeyLen
|
Passcode fingerprint (SHA-1) key length. |
kPasscodeFingerprintLen
|
Passcode fingerprint length. |
kPasscodeMaxEncryptedLen
|
Max encrypted passcode length. |
kPasscodeMaxLen
|
Max unencrytped passcode length. |
kPasscodePaddedLen
|
Passcode length (padded to the AES-128 block length). |
kPasscodeTotalDerivedKeyLen
|
Passcode total (encryption & integrity) key length. |
Variables
kPasscodeEncKeyDiversifier
const uint8_t kPasscodeEncKeyDiversifier[] = { 0x1A, 0x65, 0x5D, 0x96 }
Key diversifier used for Weave passcode encryption key derivation.
This value represents first 4 bytes of the SHA-1 HASH of "Nest Passcode EK and AK" phrase.
kPasscodeFingerprintKeyDiversifier
const uint8_t kPasscodeFingerprintKeyDiversifier[] = { 0xD1, 0xA1, 0xD9, 0x6C }
Key diversifier used for Weave passcode encryption key derivation.
This value represents first 4 bytes of the SHA-1 HASH of "Nest Passcode EK and AK" phrase.
Functions
DecryptPasscode
WEAVE_ERROR DecryptPasscode( const uint8_t *encPasscode, size_t encPasscodeLen, uint8_t *passcodeBuf, size_t passcodeBufSize, size_t & passcodeLen, GroupKeyStoreBase *groupKeyStore )
Decrypt a passcode that was encrypted using the Nest Passcode Encryption scheme.
Details | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||||||||
Return Values |
|
DecryptPasscode
WEAVE_ERROR DecryptPasscode( const uint8_t *encPasscode, size_t encPasscodeLen, const uint8_t *encKey, const uint8_t *authKey, const uint8_t *fingerprintKey, uint8_t *passcodeBuf, size_t passcodeBufSize, size_t & passcodeLen )
Decrypt a passcode that was encrypted using the Nest Passcode Encryption scheme.
Details | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||||||||
Return Values |
|
EncryptPasscode
WEAVE_ERROR EncryptPasscode( uint8_t config, uint32_t keyId, uint32_t nonce, const uint8_t *passcode, size_t passcodeLen, uint8_t *encPasscode, size_t encPasscodeBufSize, size_t & encPasscodeLen, GroupKeyStoreBase *groupKeyStore )
Encrypt a passcode using the Nest Passcode Encryption scheme.
Details | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||||||||||
Return Values |
|
EncryptPasscode
WEAVE_ERROR EncryptPasscode( uint8_t config, uint32_t keyId, uint32_t nonce, const uint8_t *passcode, size_t passcodeLen, const uint8_t *encKey, const uint8_t *authKey, const uint8_t *fingerprintKey, uint8_t *encPasscode, size_t encPasscodeBufSize, size_t & encPasscodeLen )
Encrypt a passcode using the Nest Passcode Encryption scheme.
Details | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||||||||||||||
Return Values |
|
GetEncryptedPasscodeConfig
WEAVE_ERROR GetEncryptedPasscodeConfig( const uint8_t *encPasscode, size_t encPasscodeLen, uint8_t & config )
Get the configuration type of an encrypted passcode.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
GetEncryptedPasscodeFingerprint
WEAVE_ERROR GetEncryptedPasscodeFingerprint( const uint8_t *encPasscode, size_t encPasscodeLen, uint8_t *fingerprintBuf, size_t fingerprintBufSize, size_t & fingerprintLen )
Get the fingerprint value associated with an encrypted passcode.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
GetEncryptedPasscodeKeyId
WEAVE_ERROR GetEncryptedPasscodeKeyId( const uint8_t *encPasscode, size_t encPasscodeLen, uint32_t & keyId )
Get the id of the key used to encrypt an encrypted passcode.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
GetEncryptedPasscodeNonce
WEAVE_ERROR GetEncryptedPasscodeNonce( const uint8_t *encPasscode, size_t encPasscodeLen, uint32_t & nonce )
Get the nonce value associated with an encrypted passcode.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
IsSupportedPasscodeEncryptionConfig
bool IsSupportedPasscodeEncryptionConfig( uint8_t config )
Returns true if the supplied passcode encryption configuration is supported by the passcode encryption/decryption APIs.