CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
fido2_common.h File Reference
#include <cdc_hal/ISecureElement.h>
#include <mbedtls/sha256.h>
#include <cstdint>
#include <cstddef>
#include <cstring>

Go to the source code of this file.

Namespaces

namespace  cdc
namespace  cdc::mod_fido2

Macros

#define FIDO2_SHA256_DIGEST_SIZE   32
#define FIDO2_PUBKEY_COMPONENT_SIZE   32
#define FIDO2_PRIVKEY_SIZE   32
#define FIDO2_SIG_COMPONENT_SIZE   32
#define FIDO2_SIG_SIZE   64
#define FIDO2_P256_UNCOMPRESSED_SIZE   65
#define FIDO2_P256_PUBKEY_XY_SIZE   64

Functions

void cdc::mod_fido2::sha256 (const uint8_t *data, size_t len, uint8_t out[32])
void cdc::mod_fido2::sha256_str (const char *str, uint8_t out[32])

Macro Definition Documentation

◆ FIDO2_P256_PUBKEY_XY_SIZE

#define FIDO2_P256_PUBKEY_XY_SIZE   64

Definition at line 23 of file fido2_common.h.

◆ FIDO2_P256_UNCOMPRESSED_SIZE

#define FIDO2_P256_UNCOMPRESSED_SIZE   65

Definition at line 22 of file fido2_common.h.

◆ FIDO2_PRIVKEY_SIZE

#define FIDO2_PRIVKEY_SIZE   32

Definition at line 19 of file fido2_common.h.

◆ FIDO2_PUBKEY_COMPONENT_SIZE

#define FIDO2_PUBKEY_COMPONENT_SIZE   32

Definition at line 18 of file fido2_common.h.

◆ FIDO2_SHA256_DIGEST_SIZE

#define FIDO2_SHA256_DIGEST_SIZE   32

Definition at line 17 of file fido2_common.h.

Referenced by cdc::mod_fido2::sha256(), and cdc::mod_fido2::sha256_str().

◆ FIDO2_SIG_COMPONENT_SIZE

#define FIDO2_SIG_COMPONENT_SIZE   32

Definition at line 20 of file fido2_common.h.

Referenced by encode_der_integer(), and raw_sig_to_der().

◆ FIDO2_SIG_SIZE

#define FIDO2_SIG_SIZE   64