nl:: Weave:: Profiles:: Security:: Keyexport:: WeaveKeyXuất
#include <src/lib/profiles/security/WeaveKeyExport.h>
Triển khai logic logic của giao thức xuất khóa Weave.
Tóm tắt
Loại công khai |
|
---|---|
@260{
|
enum Trạng thái hiện tại của đối tượng WeaveKeyXuất. |
Thuộc tính công khai |
|
---|---|
ECDHPrivateKey[kMaxECDHPrivateKeySize]
|
uint8_t
|
ECDHPrivateKeyLen
|
uint16_t
|
ECDHPublicKey[kMaxECDHPublicKeySize]
|
uint8_t
|
EncryptionAndAuthenticationKey[kEncryptionAndAuthenticationKeySize]
|
uint8_t
|
GroupKeyStore
|
Trỏ đến một đối tượng kho khóa của nhóm nền tảng.
|
KeyExportDelegate
|
Trỏ đến đối tượng ủy quyền xuất dữ liệu chính.
|
SharedSecret[kMaxECDHSharedSecretSize]
|
uint8_t
|
SharedSecretLen
|
uint16_t
|
Hàm công khai |
|
---|---|
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
|
const WeaveMessageInfo *
|
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
|
Loại công khai
@660
@260
Trạng thái hiện tại của đối tượng WeaveKeyXuất.
Thuộc tính | |
---|---|
kState_InitiatorDone
|
Trạng thái của trình khởi tạo cho biết rằng phản hồi xuất khóa đã được xử lý. |
kState_InitiatorGeneratingRequest
|
Trạng thái của trình khởi tạo cho biết rằng thông báo yêu cầu xuất khóa đang được tạo. |
kState_InitiatorReconfigureProcessed
|
Trạng thái của trình khởi tạo cho biết rằng thông báo xuất lại cấu hình khóa đã được xử lý. |
kState_InitiatorRequestGenerated
|
Trạng thái của trình khởi tạo cho biết rằng thông báo yêu cầu xuất khóa đã được tạo. |
kState_Reset
|
Trạng thái ban đầu (và cuối cùng) của đối tượng WeaveKeyXuất. |
kState_ResponderDone
|
Trạng thái người trả lời cho biết rằng thông báo phản hồi xuất khóa được tạo. |
kState_ResponderProcessingRequest
|
Trạng thái người trả lời cho biết rằng thông báo yêu cầu xuất khóa đang được xử lý. |
kState_ResponderRequestProcessed
|
Trạng thái người trả lời cho biết rằng thông báo yêu cầu xuất khóa đã được xử lý. |
Thuộc tính công khai
Khóa cá nhân ECDH
uint8_t ECDHPrivateKey[kMaxECDHPrivateKeySize]
Khóa công khai
uint16_t ECDHPrivateKeyLen
Khóa công khai
uint8_t ECDHPublicKey[kMaxECDHPublicKeySize]
EncryptionAndAuthenticationKey
uint8_t EncryptionAndAuthenticationKey[kEncryptionAndAuthenticationKeySize]
Cửa hàng khóa nhóm
GroupKeyStoreBase * GroupKeyStore
Trỏ đến một đối tượng kho khóa của nhóm nền tảng.
Trình xuất khóa
WeaveKeyExportDelegate * KeyExportDelegate
Trỏ đến đối tượng ủy quyền xuất dữ liệu chính.
Bí mật dùng chung
uint8_t SharedSecret[kMaxECDHSharedSecretSize]
Tệp Lính mật khẩu chung
uint16_t SharedSecretLen
Hàm công khai
Cấu hình được cho phép
uint8_t AllowedConfigs() const
CreateKey ExportReĐặt lại
WEAVE_ERROR GenerateKeyExportReconfigure( uint8_t *buf, uint16_t bufSize, uint16_t & msgLen )
CreateKeyXuấtRequest
WEAVE_ERROR GenerateKeyExportRequest( uint8_t *buf, uint16_t bufSize, uint16_t & msgLen, uint8_t proposedConfig, uint32_t keyId, bool signMessages )
CreateKey ExportResponse
WEAVE_ERROR GenerateKeyExportResponse( uint8_t *buf, uint16_t bufSize, uint16_t & msgLen, const WeaveMessageInfo *msgInfo )
Số nguyên
void Init( WeaveKeyExportDelegate *keyExportDelegate, GroupKeyStoreBase *groupKeyStore )
Được phép định cấu hình
bool IsAllowedConfig( uint8_t config ) const
Bộ khởi đầu
bool IsInitiator() const
Mã khóa
uint32_t KeyId() const
Thông báo thư
const WeaveMessageInfo * MessageInfo() const
Tiến trình xuất cấu hình lại
WEAVE_ERROR ProcessKeyExportReconfigure( const uint8_t *buf, uint16_t msgSize, uint8_t & config )
quy trình xử lý khóa xuất
WEAVE_ERROR ProcessKeyExportRequest( const uint8_t *buf, uint16_t msgSize, const WeaveMessageInfo *msgInfo )
Phản hồi khóa khóa xuất
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 )
Cấu hình giao thức
uint8_t ProtocolConfig() const
Đặt lại
void Reset( void )
Đặt cấu hình cho phép
void SetAllowedConfigs( uint8_t allowedConfigs )
Tắt
void Shutdown( void )
Thông điệp
bool SignMessages() const
Tiểu bang
uint8_t State() const