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
9#pragma once
10
21
22#include "periph/i2c.h"
23#include "cryptoauthlib.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33#define ATCA_I2C_ADDR (0xC0)
34
35#define ATCA_WAKE_ADDR (0x00)
36#define ATCA_SLEEP_ADDR (0x01)
37#define ATCA_IDLE_ADDR (0x02)
38#define ATCA_DATA_ADDR (0x03)
40
41#if IS_USED(MODULE_PSA_SECURE_ELEMENT_ATECCX08A)
42#include "psa/crypto_types.h"
43
47typedef struct {
48 uint8_t iv[16];
50 union atca_context {
51 atca_aes_cbc_ctx_t aes_cbc;
52 } aes_ctx;
53} psa_atca_cipher_context_t;
54
62typedef struct {
63 /* Type of key permitted for slot */
64 psa_key_type_t key_type_allowed;
65 /* Specify if key should be stored persistently or can be overwritten */
66 uint8_t key_persistent;
67 /* Specify whether slot is already occupied */
68 uint8_t slot_occupied;
69} psa_atca_slot_config_t;
70#endif /* MODULE_PSA_SECURE_ELEMENT_ATECCX08A */
71
72#ifdef __cplusplus
73}
74#endif
75
Type definitions for PSA Crypto.
Low-level I2C peripheral driver interface definition.
uint16_t psa_key_type_t
Encoding of a key type.
Definition type.h:44
psa_encrypt_or_decrypt_t
For encrypt-decrypt functions, whether the operation is an encryption or a decryption.
Definition types.h:44