M5Unit-CRYPTO 0.0.1 git rev:e7369a6
Loading...
Searching...
No Matches
atecc608.hpp File Reference

ATECC608 definition. More...

#include <cstdint>

Go to the source code of this file.

Classes

class  m5::unit::atecc608::CompCertAccessor
 
struct  m5::unit::atecc608::CompCertAccessor::DateTime
 

Namespaces

namespace  m5
 Top level namespace of M5stack.
 
namespace  atecc608
 For ATECC608.
 

Typedefs

using m5::unit::atecc608::Destination = Source
 

Enumerations

enum class  m5::unit::atecc608::Slot : uint8_t {
  PrimaryPrivateKey , InternalSignPrivateKey , SecondaryPrivateKey1 , SecondaryPrivateKey2 ,
  SecondaryPrivateKey3 , MACAddress , IOProtectionKey , GeneralData = 8 ,
  AESKey , DeviceCompressedCertificate , SignerPublicKey , SignerCompressedCertificate
}
 Slot configuration summay. More...
 
enum class  m5::unit::atecc608::Source : uint8_t { TempKey , MsgDigestBuffer , AlternateKeyBuffer , ExternalBuffer }
 Data source. More...
 
enum  m5::unit::atecc608::Error : uint8_t {
  CHECK_MAC_OR_VERIFY_ERROR = 0x01 , PARSE_ERROR = 0x03 , ECC_FAULT = 0x05 , SELF_TEST_ERROR = 0x07 ,
  HEALTH_TEST_ERROR = 0x08 , EXECUTION_ERROR = 0x0F , AFTER_WAKE_PRIOR_ERROR = 0X11 , WATCH_DOG_ERROR = 0xEE ,
  CRC_OR_COMMUNICATION_ERROR = 0XFF
}
 Error status.
 

Functions

uint16_t m5::unit::atecc608::offset_to_param2_for_config (const uint8_t offset)
 Conversion offset to address for Config,OTP zone.
 
uint16_t m5::unit::atecc608::slot_block_to_param2 (const uint8_t slot, const uint8_t offset)
 Conversion slot and block to address for Data zone.
 
constexpr uint32_t m5::unit::atecc608::encoded_base64_length (const uint32_t ilen)
 Calculate encoded size (no line break)
 
bool m5::unit::atecc608::convertToPEM (char *out, const uint32_t out_len, const uint8_t *der, uint32_t dlen, const char *header="CERTIFICATE", const char *footer="CERTIFICATE")
 Convert der to pem.
 

Variables

Zone
constexpr uint8_t m5::unit::atecc608::ZONE_CONFIG {0x00}
 
constexpr uint8_t m5::unit::atecc608::ZONE_OTP {0x01}
 
constexpr uint8_t m5::unit::atecc608::ZONE_DATA {0x02}
 

Detailed Description

ATECC608 definition.

Enumeration Type Documentation

◆ Slot

enum class m5::unit::atecc608::Slot : uint8_t
strong

Slot configuration summay.

Enumerator
PrimaryPrivateKey 

Primary authentication key.

InternalSignPrivateKey 

Private key that can only be used to attest to the internal keys and state of the device

SecondaryPrivateKey1 

Secondary private key for other uses.

SecondaryPrivateKey2 

Secondary private key for other uses.

SecondaryPrivateKey3 

Secondary private key for other uses.

MACAddress 

IEEE EUI-48 MAC Address.

IOProtectionKey 

Key used to protect the I2C bus communication (IO) of certain commands.

GeneralData 

General purpose data storage (416 bytes)

AESKey 

Intermediate key storage for ECDH and KDF output.

DeviceCompressedCertificate 

Certificate primary public key in the CryptoAuthentication compressed format.

SignerPublicKey 

Public key for the CA (signer) that signed the device cert.

SignerCompressedCertificate 

Certificate for the CA (signer) certificate for the device certificate in the CryptoAuthentication compressed format

◆ Source

enum class m5::unit::atecc608::Source : uint8_t
strong

Data source.

Enumerator
TempKey 

TempKey.

MsgDigestBuffer 

Message digest buffer.

AlternateKeyBuffer 

Alternate Key Buffer.

ExternalBuffer 

Any buffer.