0.01.00
ot::KeyManager Class Reference
Inheritance diagram for ot::KeyManager:
ot::InstanceLocator

Public Types

enum  { kMaxKeyLength = 16 }
 

Public Member Functions

 KeyManager (otInstance &aInstance)
 This constructor initializes the object. More...
 
void Start (void)
 This method starts KeyManager rotation timer and sets guard timer to initial value.
 
void Stop (void)
 This method stops KeyManager timers.
 
const otMasterKeyGetMasterKey (void) const
 This method returns a reference to the Thread Master Key. More...
 
otError SetMasterKey (const otMasterKey &aKey)
 This method sets the Thread Master Key. More...
 
const uint8_t * GetPSKc (void) const
 This method returns a pointer to the PSKc. More...
 
void SetPSKc (const uint8_t *aPSKc)
 This method sets the PSKc. More...
 
uint32_t GetCurrentKeySequence (void) const
 This method returns the current key sequence value. More...
 
void SetCurrentKeySequence (uint32_t aKeySequence)
 This method sets the current key sequence value. More...
 
const uint8_t * GetCurrentMacKey (void) const
 This method returns a pointer to the current MAC key. More...
 
const uint8_t * GetCurrentMleKey (void) const
 This method returns a pointer to the current MLE key. More...
 
const uint8_t * GetTemporaryMacKey (uint32_t aKeySequence)
 This method returns a pointer to a temporary MAC key computed from the given key sequence. More...
 
const uint8_t * GetTemporaryMleKey (uint32_t aKeySequence)
 This method returns a pointer to a temporary MLE key computed from the given key sequence. More...
 
uint32_t GetMacFrameCounter (void) const
 This method returns the current MAC Frame Counter value. More...
 
void SetMacFrameCounter (uint32_t aMacFrameCounter)
 This method sets the current MAC Frame Counter value. More...
 
void SetStoredMacFrameCounter (uint32_t aStoredMacFrameCounter)
 This method sets the MAC Frame Counter value which is stored in non-volatile memory. More...
 
void IncrementMacFrameCounter (void)
 This method increments the current MAC Frame Counter value.
 
uint32_t GetMleFrameCounter (void) const
 This method returns the current MLE Frame Counter value. More...
 
void SetMleFrameCounter (uint32_t aMleFrameCounter)
 This method sets the current MLE Frame Counter value. More...
 
void SetStoredMleFrameCounter (uint32_t aStoredMleFrameCounter)
 This method sets the MLE Frame Counter value which is stored in non-volatile memory. More...
 
void IncrementMleFrameCounter (void)
 This method increments the current MLE Frame Counter value.
 
const uint8_t * GetKek (void) const
 This method returns the KEK. More...
 
void SetKek (const uint8_t *aKek)
 This method sets the KEK. More...
 
uint32_t GetKekFrameCounter (void) const
 This method returns the current KEK Frame Counter value. More...
 
void IncrementKekFrameCounter (void)
 This method increments the current KEK Frame Counter value.
 
uint32_t GetKeyRotation (void) const
 This method returns the KeyRotation time. More...
 
otError SetKeyRotation (uint32_t aKeyRotation)
 This method sets the KeyRotation time. More...
 
uint32_t GetKeySwitchGuardTime (void) const
 This method returns the KeySwitchGuardTime. More...
 
void SetKeySwitchGuardTime (uint32_t aKeySwitchGuardTime)
 This method sets the KeySwitchGuardTime. More...
 
uint8_t GetSecurityPolicyFlags (void) const
 This method returns the Security Policy Flags. More...
 
void SetSecurityPolicyFlags (uint8_t aSecurityPolicyFlags)
 This method sets the Security Policy Flags. More...
 
- Public Member Functions inherited from ot::InstanceLocator
otInstanceGetInstance (void) const
 This method returns a reference to the parent otInstance structure. More...
 
Ip6::Ip6GetIp6 (void) const
 This method returns a reference to the Ip6. More...
 
ThreadNetifGetNetif (void) const
 This method returns a reference to the thread network interface. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ot::InstanceLocator
 InstanceLocator (otInstance &aInstance)
 This constructor initializes the object. More...
 

Constructor & Destructor Documentation

§ KeyManager()

ot::KeyManager::KeyManager ( otInstance aInstance)
explicit

This constructor initializes the object.

Parameters
[in]aInstanceA reference to the OpenThread instance.

Member Function Documentation

§ GetCurrentKeySequence()

uint32_t ot::KeyManager::GetCurrentKeySequence ( void  ) const
inline

This method returns the current key sequence value.

Returns
The current key sequence value.

§ GetCurrentMacKey()

const uint8_t* ot::KeyManager::GetCurrentMacKey ( void  ) const
inline

This method returns a pointer to the current MAC key.

Returns
A pointer to the current MAC key.

§ GetCurrentMleKey()

const uint8_t* ot::KeyManager::GetCurrentMleKey ( void  ) const
inline

This method returns a pointer to the current MLE key.

Returns
A pointer to the current MLE key.

§ GetKek()

const uint8_t* ot::KeyManager::GetKek ( void  ) const
inline

This method returns the KEK.

Returns
A pointer to the KEK.

§ GetKekFrameCounter()

uint32_t ot::KeyManager::GetKekFrameCounter ( void  ) const
inline

This method returns the current KEK Frame Counter value.

Returns
The current KEK Frame Counter value.

§ GetKeyRotation()

uint32_t ot::KeyManager::GetKeyRotation ( void  ) const
inline

This method returns the KeyRotation time.

The KeyRotation time is the time interval after witch security key will be automatically rotated.

Returns
The KeyRotation value in hours.

§ GetKeySwitchGuardTime()

uint32_t ot::KeyManager::GetKeySwitchGuardTime ( void  ) const
inline

This method returns the KeySwitchGuardTime.

The KeySwitchGuardTime is the time interval during which key rotation procedure is prevented.

Returns
The KeySwitchGuardTime value in hours.

§ GetMacFrameCounter()

uint32_t ot::KeyManager::GetMacFrameCounter ( void  ) const
inline

This method returns the current MAC Frame Counter value.

Returns
The current MAC Frame Counter value.

§ GetMasterKey()

const otMasterKey & ot::KeyManager::GetMasterKey ( void  ) const

This method returns a reference to the Thread Master Key.

Returns
A reference to the Thread Master Key.

§ GetMleFrameCounter()

uint32_t ot::KeyManager::GetMleFrameCounter ( void  ) const
inline

This method returns the current MLE Frame Counter value.

Returns
The current MLE Frame Counter value.

§ GetPSKc()

const uint8_t* ot::KeyManager::GetPSKc ( void  ) const

This method returns a pointer to the PSKc.

Returns
A pointer to the PSKc.

§ GetSecurityPolicyFlags()

uint8_t ot::KeyManager::GetSecurityPolicyFlags ( void  ) const
inline

This method returns the Security Policy Flags.

The Security Policy Flags specifies network administrator preferences for which security-related operations are allowed or disallowed.

Returns
The SecurityPolicy Flags.

§ GetTemporaryMacKey()

const uint8_t * ot::KeyManager::GetTemporaryMacKey ( uint32_t  aKeySequence)

This method returns a pointer to a temporary MAC key computed from the given key sequence.

Parameters
[in]aKeySequenceThe key sequence value.
Returns
A pointer to the temporary MAC key.

§ GetTemporaryMleKey()

const uint8_t * ot::KeyManager::GetTemporaryMleKey ( uint32_t  aKeySequence)

This method returns a pointer to a temporary MLE key computed from the given key sequence.

Parameters
[in]aKeySequenceThe key sequence value.
Returns
A pointer to the temporary MLE key.

§ SetCurrentKeySequence()

void ot::KeyManager::SetCurrentKeySequence ( uint32_t  aKeySequence)

This method sets the current key sequence value.

Parameters
[in]aKeySequenceThe key sequence value.

§ SetKek()

void ot::KeyManager::SetKek ( const uint8_t *  aKek)

This method sets the KEK.

Parameters
[in]aKekA pointer to the KEK.

§ SetKeyRotation()

otError ot::KeyManager::SetKeyRotation ( uint32_t  aKeyRotation)

This method sets the KeyRotation time.

The KeyRotation time is the time interval after witch security key will be automatically rotated. Its value shall be larger than or equal to kMinKeyRotationTime.

Parameters
[in]aKeyRotationThe KeyRotation value in hours.
Return values
OT_ERROR_NONEKeyRotation time updated.
OT_ERROR_INVALID_ARGSaKeyRotation is out of range.

§ SetKeySwitchGuardTime()

void ot::KeyManager::SetKeySwitchGuardTime ( uint32_t  aKeySwitchGuardTime)
inline

This method sets the KeySwitchGuardTime.

The KeySwitchGuardTime is the time interval during which key rotation procedure is prevented.

Parameters
[in]aKeySwitchGuardTimeThe KeySwitchGuardTime value in hours.

§ SetMacFrameCounter()

void ot::KeyManager::SetMacFrameCounter ( uint32_t  aMacFrameCounter)
inline

This method sets the current MAC Frame Counter value.

Parameters
[in]aMacFrameCounterThe MAC Frame Counter value.

§ SetMasterKey()

otError ot::KeyManager::SetMasterKey ( const otMasterKey aKey)

This method sets the Thread Master Key.

Parameters
[in]aKeyA reference to the Thread Master Key.
Return values
OT_ERROR_NONESuccessfully set the Thread Master Key.
OT_ERROR_INVALID_ARGSThe aKeyLength value was invalid.

§ SetMleFrameCounter()

void ot::KeyManager::SetMleFrameCounter ( uint32_t  aMleFrameCounter)
inline

This method sets the current MLE Frame Counter value.

Parameters
[in]aMleFrameCounterThe MLE Frame Counter value.

§ SetPSKc()

void ot::KeyManager::SetPSKc ( const uint8_t *  aPSKc)

This method sets the PSKc.

Parameters
[in]aPSKcA pointer to the PSKc.

§ SetSecurityPolicyFlags()

void ot::KeyManager::SetSecurityPolicyFlags ( uint8_t  aSecurityPolicyFlags)
inline

This method sets the Security Policy Flags.

The Security Policy Flags specifies network administrator preferences for which security-related operations are allowed or disallowed.

Parameters
[in]aSecurityPolicyFlagsThe Security Policy Flags.

§ SetStoredMacFrameCounter()

void ot::KeyManager::SetStoredMacFrameCounter ( uint32_t  aStoredMacFrameCounter)
inline

This method sets the MAC Frame Counter value which is stored in non-volatile memory.

Parameters
[in]aStoredMacFrameCounterThe stored MAC Frame Counter value.

§ SetStoredMleFrameCounter()

void ot::KeyManager::SetStoredMleFrameCounter ( uint32_t  aStoredMleFrameCounter)
inline

This method sets the MLE Frame Counter value which is stored in non-volatile memory.

Parameters
[in]aStoredMleFrameCounterThe stored MLE Frame Counter value.

The documentation for this class was generated from the following files: