42#ifndef _EDHOC_KEY_STORAGE_H_
43#define _EDHOC_KEY_STORAGE_H_
45#include "contiki-lib.h"
201 const char *own_label,
const char *peer_label);
Common ECC types used by the EDHOC implementation.
EDHOC configuration file.
Error handling module header for EDHOC.
edhoc_error_t
Unified error type for EDHOC operations.
void edhoc_print_credential(const char *label, const uint8_t *cred, size_t cred_sz)
Print credential (CRED_I/CRED_R) values in readable format.
edhoc_error_t edhoc_create_key_list(void)
Create the keys repository.
void edhoc_list_all_keys(void)
List all keys in the key storage with basic information.
edhoc_error_t edhoc_remove_key_identity(char *identity, uint8_t identity_sz)
Remove from the keys repository the key with the specific identity.
edhoc_error_t edhoc_check_key_list_kid(uint8_t *kid, uint8_t kid_sz, cose_key_t **auth_key)
Check in the keys repository for the key with the specific KID.
edhoc_error_t edhoc_add_key(cose_key_t *key)
Add a DH key to the repository.
edhoc_error_t edhoc_remove_key_kid(uint8_t *kid, uint8_t kid_sz)
Remove from the keys repository the key with the specific KID.
void edhoc_print_key_info(const cose_key_t *key, const char *label)
Print detailed key information at INFO level for user visibility.
void cose_print_key(cose_key_t *cose)
Print a key in cose_key_t struct format for debugging.
edhoc_error_t edhoc_validate_key_setup(void)
Validate the current key setup and print diagnostic information.
edhoc_error_t edhoc_copy_key(cose_key_t *k, cose_key_t *key)
Copy a COSE key from one structure to another.
struct cose_key cose_key_t
KEY length in bytes.
edhoc_error_t edhoc_check_key_list_identity(char *identity, uint8_t identity_sz, cose_key_t **auth_key)
Check in the keys repository for the key with the specific identity.
edhoc_error_t edhoc_setup_key_pair(cose_key_t *own_key, cose_key_t *peer_key, const char *own_label, const char *peer_label)
Helper function to set up a key pair (own + peer) with validation.
edhoc_error_t edhoc_remove_key(cose_key_t *auth_key)
Remove from the keys repository the specific DH cose_key_t key.
uint8_t edhoc_get_key_count(void)
Get the total number of keys loaded in the key storage.
#define EDHOC_MAX_IDENTITY_LEN
Maximum length of identity strings in credentials Used for human-readable credential identities (e....
#define EDHOC_MAX_KID_LEN
Maximum length of Key Identifiers (KID) in credentials COSE Key IDs can be 1-4 bytes typically,...