nl::Weave::Profiles::Security::KeyExport::WeaveKeyExport

#include <src/lib/profiles/security/WeaveKeyExport.h>

實作 Weave 金鑰匯出通訊協定的核心邏輯。

摘要

公開類型

@260{
  kState_Reset = 0,
  kState_InitiatorGeneratingRequest = 10,
  kState_InitiatorRequestGenerated = 11,
  kState_InitiatorReconfigureProcessed = 12,
  kState_InitiatorDone = 13,
  kState_ResponderProcessingRequest = 20,
  kState_ResponderRequestProcessed = 21,
  kState_ResponderDone = 22
}
列舉
WeaveKeyExport 物件的目前狀態。

公開屬性

ECDHPrivateKey[kMaxECDHPrivateKeySize]
uint8_t
ECDHPrivateKeyLen
uint16_t
ECDHPublicKey[kMaxECDHPublicKeySize]
uint8_t
EncryptionAndAuthenticationKey[kEncryptionAndAuthenticationKeySize]
uint8_t
GroupKeyStore
指向平台群組鍵值儲存庫物件的指標。
KeyExportDelegate
指向金鑰匯出委派物件的指標。
SharedSecret[kMaxECDHSharedSecretSize]
uint8_t
SharedSecretLen
uint16_t

公開函式

AllowedConfigs() const
uint8_t
GenerateKeyExportReconfigure(uint8_t *buf, uint16_t bufSize, uint16_t & msgLen)
GenerateKeyExportRequest(uint8_t *buf, uint16_t bufSize, uint16_t & msgLen, uint8_t proposedConfig, uint32_t keyId, bool signMessages)
GenerateKeyExportResponse(uint8_t *buf, uint16_t bufSize, uint16_t & msgLen, const WeaveMessageInfo *msgInfo)
Init(WeaveKeyExportDelegate *keyExportDelegate, GroupKeyStoreBase *groupKeyStore)
void
IsAllowedConfig(uint8_t config) const
bool
IsInitiator() const
bool
KeyId() const
uint32_t
MessageInfo() const
ProcessKeyExportReconfigure(const uint8_t *buf, uint16_t msgSize, uint8_t & config)
ProcessKeyExportRequest(const uint8_t *buf, uint16_t msgSize, const WeaveMessageInfo *msgInfo)
ProcessKeyExportResponse(const uint8_t *buf, uint16_t msgSize, const WeaveMessageInfo *msgInfo, uint8_t *exportedKeyBuf, uint16_t exportedKeyBufSize, uint16_t & exportedKeyLen, uint32_t & exportedKeyId)
ProtocolConfig() const
uint8_t
Reset(void)
void
SetAllowedConfigs(uint8_t allowedConfigs)
void
Shutdown(void)
void
SignMessages() const
bool
State() const
uint8_t

公開類型

@260

 @260

WeaveKeyExport 物件的目前狀態。

屬性
kState_InitiatorDone

啟動程序狀態,表示已處理金鑰匯出回應。

kState_InitiatorGeneratingRequest

啟動者狀態,表示系統正在產生金鑰匯出要求訊息。

kState_InitiatorReconfigureProcessed

啟動程序狀態,表示已處理金鑰匯出重新設定訊息。

kState_InitiatorRequestGenerated

啟動者狀態,表示已產生金鑰匯出要求訊息。

kState_Reset

WeaveKeyExport 物件的初始 (和最終) 狀態。

kState_ResponderDone

回應者狀態,表示已產生金鑰匯出回應訊息。

kState_ResponderProcessingRequest

回應者狀態,表示系統正在處理金鑰匯出要求訊息。

kState_ResponderRequestProcessed

回應者狀態,表示金鑰匯出要求訊息已處理完成。

公開屬性

ECDHPrivateKey

uint8_t ECDHPrivateKey[kMaxECDHPrivateKeySize]

ECDHPrivateKeyLen

uint16_t ECDHPrivateKeyLen

ECDHPublicKey

uint8_t ECDHPublicKey[kMaxECDHPublicKeySize]

EncryptionAndAuthenticationKey

uint8_t EncryptionAndAuthenticationKey[kEncryptionAndAuthenticationKeySize]

GroupKeyStore

GroupKeyStoreBase * GroupKeyStore

指向平台群組鍵值儲存庫物件的指標。

KeyExportDelegate

WeaveKeyExportDelegate * KeyExportDelegate

指向金鑰匯出委派物件的指標。

SharedSecret

uint8_t SharedSecret[kMaxECDHSharedSecretSize]

SharedSecretLen

uint16_t SharedSecretLen

公開函式

AllowedConfigs

uint8_t AllowedConfigs() const 

GenerateKeyExportReconfigure

WEAVE_ERROR GenerateKeyExportReconfigure(
  uint8_t *buf,
  uint16_t bufSize,
  uint16_t & msgLen
)

GenerateKeyExportRequest

WEAVE_ERROR GenerateKeyExportRequest(
  uint8_t *buf,
  uint16_t bufSize,
  uint16_t & msgLen,
  uint8_t proposedConfig,
  uint32_t keyId,
  bool signMessages
)

GenerateKeyExportResponse

WEAVE_ERROR GenerateKeyExportResponse(
  uint8_t *buf,
  uint16_t bufSize,
  uint16_t & msgLen,
  const WeaveMessageInfo *msgInfo
)

Init

void Init(
  WeaveKeyExportDelegate *keyExportDelegate,
  GroupKeyStoreBase *groupKeyStore
)

IsAllowedConfig

bool IsAllowedConfig(
  uint8_t config
) const 

IsInitiator

bool IsInitiator() const 

KeyId

uint32_t KeyId() const 

MessageInfo

const WeaveMessageInfo * MessageInfo() const 

ProcessKeyExportReconfigure

WEAVE_ERROR ProcessKeyExportReconfigure(
  const uint8_t *buf,
  uint16_t msgSize,
  uint8_t & config
)

ProcessKeyExportRequest

WEAVE_ERROR ProcessKeyExportRequest(
  const uint8_t *buf,
  uint16_t msgSize,
  const WeaveMessageInfo *msgInfo
)

ProcessKeyExportResponse

WEAVE_ERROR ProcessKeyExportResponse(
  const uint8_t *buf,
  uint16_t msgSize,
  const WeaveMessageInfo *msgInfo,
  uint8_t *exportedKeyBuf,
  uint16_t exportedKeyBufSize,
  uint16_t & exportedKeyLen,
  uint32_t & exportedKeyId
)

ProtocolConfig

uint8_t ProtocolConfig() const 

重設

void Reset(
  void
)

SetAllowedConfigs

void SetAllowedConfigs(
  uint8_t allowedConfigs
)

關閉

void Shutdown(
  void
)

SignMessages

bool SignMessages() const 

uint8_t State() const