nl:: Weave:: WeaveKeyId
#include <src/lib/core/WeaveKeyIds.h>
The definition of the Weave Key identifier.
Summary
This class contains key types, key flags, key ID fields definition, and API functions.
Public types |
|
---|---|
@52{
|
enum Public Weave key ID fields, flags, and types. |
Public static functions |
|
---|---|
ConvertToCurrentAppKeyId(uint32_t keyId)
|
uint32_t
Convert application group key ID to application current key ID.
|
ConvertToStaticAppKeyId(uint32_t keyId)
|
uint32_t
Convert application key ID to application static key ID.
|
DescribeKey(uint32_t keyId)
|
const char *
Decode a Weave key identifier with a descriptive string.
|
GetAppGroupLocalNumber(uint32_t keyId)
|
uint8_t
Get application group local number that was used to derive specified application key.
|
GetAppGroupMasterKeyId(uint32_t keyId)
|
uint32_t
Get application group master key ID that was used to derive specified application key.
|
GetEpochKeyId(uint32_t keyId)
|
uint32_t
Get application group epoch key ID that was used to derive specified application key.
|
GetEpochKeyNumber(uint32_t keyId)
|
uint8_t
Get application group epoch key number that was used to derive specified application key.
|
GetRootKeyId(uint32_t keyId)
|
uint32_t
Get application group root key ID that was used to derive specified application key.
|
GetRootKeyNumber(uint32_t keyId)
|
uint8_t
Get application group root key number that was used to derive specified application key.
|
GetType(uint32_t keyId)
|
uint32_t
Get Weave key type of the specified key ID.
|
IncorporatesAppGroupMasterKey(uint32_t keyId)
|
bool
Determine whether the specified application group key ID incorporates group master key.
|
IncorporatesEpochKey(uint32_t keyId)
|
bool
Determine whether the specified application group key ID incorporates epoch key.
|
IncorporatesRootKey(uint32_t keyId)
|
bool
Determine whether the specified application group key ID incorporates root key.
|
IsAppEpochKey(uint32_t keyId)
|
bool
Determine whether the specified key ID is of an application epoch key type.
|
IsAppGroupKey(uint32_t keyId)
|
bool
Determine whether the specified key ID belongs to one of the application group key types (static or rotating).
|
IsAppGroupMasterKey(uint32_t keyId)
|
bool
Determine whether the specified key ID is of an application group master key type.
|
IsAppRootKey(uint32_t keyId)
|
bool
Determine whether the specified key ID is of an application root key type.
|
IsAppRotatingKey(uint32_t keyId)
|
bool
Determine whether the specified key ID is of an application rotating type.
|
IsAppStaticKey(uint32_t keyId)
|
bool
Determine whether the specified key ID is of an application static type.
|
IsGeneralKey(uint32_t keyId)
|
bool
Determine whether the specified key ID is of a general type.
|
IsMessageEncryptionKeyId(uint32_t keyId, bool allowLogicalKeys)
|
bool
Determine whether a given key ID identifies a key that is suitable for Weave message encryption.
|
IsSameKeyOrGroup(uint32_t keyId1, uint32_t keyId2)
|
bool
Determines whether two key IDs identify the same key, or in the case of rotating keys, the same group of keys independent of any particular epoch.
|
IsSessionKey(uint32_t keyId)
|
bool
Determine whether the specified key ID is of a session type.
|
IsValidKeyId(uint32_t keyId)
|
bool
Determine whether key identifier has valid (legal) value.
|
MakeAppGroupMasterKeyId(uint8_t appGroupLocalNumber)
|
uint32_t
Construct application group master key ID given application group local number.
|
MakeAppIntermediateKeyId(uint32_t rootKeyId, uint32_t epochKeyId, bool useCurrentEpochKey)
|
uint32_t
Construct application intermediate key ID given constituent key IDs.
|
MakeAppKeyId(uint32_t keyType, uint32_t rootKeyId, uint32_t epochKeyId, uint32_t appGroupMasterKeyId, bool useCurrentEpochKey)
|
uint32_t
Construct application group key ID given constituent key IDs and other information.
|
MakeAppRotatingKeyId(uint32_t rootKeyId, uint32_t epochKeyId, uint32_t appGroupMasterKeyId, bool useCurrentEpochKey)
|
uint32_t
Construct application rotating key ID given constituent key IDs and other information.
|
MakeAppStaticKeyId(uint32_t rootKeyId, uint32_t appGroupMasterKeyId)
|
uint32_t
Construct application static key ID given constituent key IDs.
|
MakeEpochKeyId(uint8_t epochKeyNumber)
|
uint32_t
Construct application group root key ID given epoch key number.
|
MakeGeneralKeyId(uint16_t generalKeyNumber)
|
uint16_t
Construct general key ID given general key number.
|
MakeRootKeyId(uint8_t rootKeyNumber)
|
uint32_t
Construct application group root key ID given root key number.
|
MakeSessionKeyId(uint16_t sessionKeyNumber)
|
uint16_t
Construct session key ID given session key number.
|
UpdateEpochKeyId(uint32_t keyId, uint32_t epochKeyId)
|
uint32_t
Update application group key ID with new epoch key number.
|
UsesCurrentEpochKey(uint32_t keyId)
|
bool
Determine whether the specified application group key ID uses "current" epoch key.
|
Public types
@52
@52
Public Weave key ID fields, flags, and types.
Public static functions
ConvertToCurrentAppKeyId
uint32_t ConvertToCurrentAppKeyId( uint32_t keyId )
Convert application group key ID to application current key ID.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
application current key ID.
|
ConvertToStaticAppKeyId
uint32_t ConvertToStaticAppKeyId( uint32_t keyId )
Convert application key ID to application static key ID.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
application static key ID.
|
DescribeKey
const char * DescribeKey( uint32_t keyId )
Decode a Weave key identifier with a descriptive string.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to a NULL-terminated string describing the specified key ID.
|
GetAppGroupLocalNumber
uint8_t GetAppGroupLocalNumber( uint32_t keyId )
Get application group local number that was used to derive specified application key.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
application group local number.
|
GetAppGroupMasterKeyId
uint32_t GetAppGroupMasterKeyId( uint32_t keyId )
Get application group master key ID that was used to derive specified application key.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
application group master key ID.
|
GetEpochKeyId
uint32_t GetEpochKeyId( uint32_t keyId )
Get application group epoch key ID that was used to derive specified application key.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
epoch key ID.
|
GetEpochKeyNumber
uint8_t GetEpochKeyNumber( uint32_t keyId )
Get application group epoch key number that was used to derive specified application key.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
epoch key number.
|
GetRootKeyId
uint32_t GetRootKeyId( uint32_t keyId )
Get application group root key ID that was used to derive specified application key.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
root key ID.
|
GetRootKeyNumber
uint8_t GetRootKeyNumber( uint32_t keyId )
Get application group root key number that was used to derive specified application key.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
root key number.
|
GetType
uint32_t GetType( uint32_t keyId )
Get Weave key type of the specified key ID.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
type of the key ID.
|
IncorporatesAppGroupMasterKey
bool IncorporatesAppGroupMasterKey( uint32_t keyId )
Determine whether the specified application group key ID incorporates group master key.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if the keyId incorporates group master key.
|
IncorporatesEpochKey
bool IncorporatesEpochKey( uint32_t keyId )
Determine whether the specified application group key ID incorporates epoch key.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if the keyId incorporates epoch key.
|
IncorporatesRootKey
bool IncorporatesRootKey( uint32_t keyId )
Determine whether the specified application group key ID incorporates root key.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if the keyId incorporates root key.
|
IsAppEpochKey
bool IsAppEpochKey( uint32_t keyId )
Determine whether the specified key ID is of an application epoch key type.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if the keyId of an application epoch key type.
|
IsAppGroupKey
bool IsAppGroupKey( uint32_t keyId )
Determine whether the specified key ID belongs to one of the application group key types (static or rotating).
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if the keyId is of rotating or static key type.
|
IsAppGroupMasterKey
bool IsAppGroupMasterKey( uint32_t keyId )
Determine whether the specified key ID is of an application group master key type.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if the keyId of an application group master key type.
|
IsAppRootKey
bool IsAppRootKey( uint32_t keyId )
Determine whether the specified key ID is of an application root key type.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if the keyId of an application root key type.
|
IsAppRotatingKey
bool IsAppRotatingKey( uint32_t keyId )
Determine whether the specified key ID is of an application rotating type.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if the keyId of an application rotating type.
|
IsAppStaticKey
bool IsAppStaticKey( uint32_t keyId )
Determine whether the specified key ID is of an application static type.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if the keyId of an application static type.
|
IsGeneralKey
bool IsGeneralKey( uint32_t keyId )
Determine whether the specified key ID is of a general type.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if the keyId has General type.
|
IsMessageEncryptionKeyId
bool IsMessageEncryptionKeyId( uint32_t keyId, bool allowLogicalKeys )
Determine whether a given key ID identifies a key that is suitable for Weave message encryption.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
true If the identified key can be used to encrypt Weave messages.
|
IsSameKeyOrGroup
bool IsSameKeyOrGroup( uint32_t keyId1, uint32_t keyId2 )
Determines whether two key IDs identify the same key, or in the case of rotating keys, the same group of keys independent of any particular epoch.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
True if the keys IDs represent the same key.
|
IsSessionKey
bool IsSessionKey( uint32_t keyId )
Determine whether the specified key ID is of a session type.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if the keyId of a session type.
|
IsValidKeyId
bool IsValidKeyId( uint32_t keyId )
Determine whether key identifier has valid (legal) value.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if key ID value is valid.
|
MakeAppGroupMasterKeyId
uint32_t MakeAppGroupMasterKeyId( uint8_t appGroupLocalNumber )
Construct application group master key ID given application group local number.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
application group master key ID.
|
MakeAppIntermediateKeyId
uint32_t MakeAppIntermediateKeyId( uint32_t rootKeyId, uint32_t epochKeyId, bool useCurrentEpochKey )
Construct application intermediate key ID given constituent key IDs.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Returns |
application intermediate key ID.
|
MakeAppKeyId
uint32_t MakeAppKeyId( uint32_t keyType, uint32_t rootKeyId, uint32_t epochKeyId, uint32_t appGroupMasterKeyId, bool useCurrentEpochKey )
Construct application group key ID given constituent key IDs and other information.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Returns |
application group key ID.
|
MakeAppRotatingKeyId
uint32_t MakeAppRotatingKeyId( uint32_t rootKeyId, uint32_t epochKeyId, uint32_t appGroupMasterKeyId, bool useCurrentEpochKey )
Construct application rotating key ID given constituent key IDs and other information.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
application rotating key ID.
|
MakeAppStaticKeyId
uint32_t MakeAppStaticKeyId( uint32_t rootKeyId, uint32_t appGroupMasterKeyId )
Construct application static key ID given constituent key IDs.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
application static key ID.
|
MakeEpochKeyId
uint32_t MakeEpochKeyId( uint8_t epochKeyNumber )
Construct application group root key ID given epoch key number.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
epoch key ID.
|
MakeGeneralKeyId
uint16_t MakeGeneralKeyId( uint16_t generalKeyNumber )
Construct general key ID given general key number.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
general key ID.
|
MakeRootKeyId
uint32_t MakeRootKeyId( uint8_t rootKeyNumber )
Construct application group root key ID given root key number.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
root key ID.
|
MakeSessionKeyId
uint16_t MakeSessionKeyId( uint16_t sessionKeyNumber )
Construct session key ID given session key number.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
session key ID.
|
UpdateEpochKeyId
uint32_t UpdateEpochKeyId( uint32_t keyId, uint32_t epochKeyId )
Update application group key ID with new epoch key number.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
application key ID.
|
UsesCurrentEpochKey
bool UsesCurrentEpochKey( uint32_t keyId )
Determine whether the specified application group key ID uses "current" epoch key.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if the keyId indicates usage of the current epoch key.
|