Loading...
Searching...
No Matches
atca.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 HAW Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#include "modules.h"
20#include "periph/i2c.h"
21#include "cryptoauthlib.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31#define ATCA_I2C_ADDR (0xC0)
32
33#define ATCA_WAKE_ADDR (0x00)
34#define ATCA_SLEEP_ADDR (0x01)
35#define ATCA_IDLE_ADDR (0x02)
36#define ATCA_DATA_ADDR (0x03)
38
39#if IS_USED(MODULE_PSA_SECURE_ELEMENT_ATECCX08A)
40#include "psa/crypto_types.h"
41
45typedef struct {
46 uint8_t iv[16];
48 union atca_context {
49 atca_aes_cbc_ctx_t aes_cbc;
50 } aes_ctx;
51} psa_atca_cipher_context_t;
52
60typedef struct {
61 /* Type of key permitted for slot */
62 psa_key_type_t key_type_allowed;
63 /* Specify if key should be stored persistently or can be overwritten */
64 uint8_t key_persistent;
65 /* Specify whether slot is already occupied */
66 uint8_t slot_occupied;
67} psa_atca_slot_config_t;
68#endif /* MODULE_PSA_SECURE_ELEMENT_ATECCX08A */
69
70#ifdef __cplusplus
71}
72#endif
73
Type definitions for PSA Crypto.
Low-level I2C peripheral driver interface definition.
Common macros and compiler attributes/pragmas configuration.
uint16_t psa_key_type_t
Encoding of a key type.
Definition type.h:41
psa_encrypt_or_decrypt_t
For encrypt-decrypt functions, whether the operation is an encryption or a decryption.
Definition types.h:41