Loading...
Searching...
No Matches
atca.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 HAW Hamburg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
20#ifndef ATCA_H
21#define ATCA_H
22
23#include "periph/i2c.h"
24#include "cryptoauthlib.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#define ATCA_I2C_ADDR (0xC0)
36#define ATCA_WAKE_ADDR (0x00)
37#define ATCA_SLEEP_ADDR (0x01)
38#define ATCA_IDLE_ADDR (0x02)
39#define ATCA_DATA_ADDR (0x03)
42#if IS_USED(MODULE_PSA_SECURE_ELEMENT_ATECCX08A)
43#include "psa/crypto_types.h"
44
48typedef struct {
49 uint8_t iv[16];
51 union atca_context {
52 atca_aes_cbc_ctx_t aes_cbc;
53 } aes_ctx;
54} psa_atca_cipher_context_t;
55
63typedef struct {
64 /* Type of key permitted for slot */
65 psa_key_type_t key_type_allowed;
66 /* Specify if key should be stored persistently or can be overwritten */
67 uint8_t key_persistent;
68 /* Specify whether slot is already occupied */
69 uint8_t slot_occupied;
70} psa_atca_slot_config_t;
71#endif /* MODULE_PSA_SECURE_ELEMENT_ATECCX08A */
72
73#ifdef __cplusplus
74}
75#endif
76
77#endif /* ATCA_H */
Type definitions for PSA Crypto.
psa_encrypt_or_decrypt_t
For encrypt-decrypt functions, whether the operation is an encryption or a decryption.
Low-level I2C peripheral driver interface definition.
uint16_t psa_key_type_t
Encoding of a key type.
Definition type.h:45