Skip to content

Commit 037ccba

Browse files
committed
Update TROPIC01 integration guide and header file for key slot definitions and datasheet link
1 parent cafb1f5 commit 037ccba

2 files changed

Lines changed: 23 additions & 12 deletions

File tree

wolfcrypt/src/port/tropicsquare/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Integration guide for using Tropic Square's TROPIC01 secure element with wolfSSL
2323
## TROPIC01 Secure Element with an open architecture
2424

2525
The TROPIC01 secure element is built with tamper-proof technology and advanced attack countermeasures to ensure robust asset protection, securing electronic devices against a wide range of potential attacks. It securely supplies and stores the cryptographic keys of embedded solutions.
26-
The TROPIC01 datasheet is available via [this link](https://www.nxp.com/docs/en/application-note/AN12570.pdf)
26+
The TROPIC01 datasheet is available via [this link](https://github.com/tropicsquare/tropic01/blob/main/doc/datasheet/ODD_tropic01_datasheet_revA6.pdf)
2727

2828
## Hardware Overview
2929

@@ -71,15 +71,16 @@ Also, for Raspberry PI, there are a few more steps:
7171
2. Install wiringPI:
7272

7373
```sh
74-
$ sudo apt update
75-
$ sudo apt install wiringpi
74+
$ wget https://github.com/WiringPi/WiringPi/releases/download/3.14/wiringpi_3.14_arm64.deb
75+
$ sudo apt install ./wiringpi_3.14_arm64.deb
7676
```
7777

7878
### Keys installation
7979

8080
For the integration with wolfSSL, there are a few pre-defined slots for the secure keys storage (the slots mapping might be changed in tropic01.h):
8181
```sh
82-
TROPIC01_AES_RMEM_SLOT_DEFAULT 1 // slot in R-memory for AES key
82+
TROPIC01_AES_KEY_RMEM_SLOT 0 // slot in R-memory for AES key
83+
TROPIC01_AES_IV_RMEM_SLOT 1 // slot in R-memory for AES IV
8384
TROPIC01_ED25519_PUB_RMEM_SLOT_DEFAULT 2 // slot in R-memory for ED25519 Public key
8485
TROPIC01_ED25519_PRIV_RMEM_SLOT_DEFAULT 3 //slot in R-memory for ED25519 Private key
8586
TROPIC01_ED25519_ECC_SLOT_DEFAULT 1 // slot in ECC keys storage for both public and private keys

wolfssl/wolfcrypt/port/tropicsquare/tropic01.h

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,34 @@
5050

5151

5252
#define TROPIC01_AES_MAX_KEY_SIZE 32
53+
#define TROPIC01_PAIRING_KEY_SIZE 32
54+
#define TROPIC01_ED25519_PRIV_KEY_SIZE 32
55+
#define TROPIC01_ED25519_PUB_KEY_SIZE 32
5356

5457
/* R-Memory slots allocation */
58+
#ifndef TROPIC01_AES_KEY_RMEM_SLOT
5559
#define TROPIC01_AES_KEY_RMEM_SLOT 0
60+
#endif /* TROPIC01_AES_KEY_RMEM_SLOT */
61+
62+
#ifndef TROPIC01_AES_IV_RMEM_SLOT
5663
#define TROPIC01_AES_IV_RMEM_SLOT 1
57-
#define TROPIC01_ED25519_PUB_RMEM_SLOT_DEFAULT 2
58-
#define TROPIC01_ED25519_PRIV_RMEM_SLOT_DEFAULT 3
64+
#endif /* TROPIC01_AES_IV_RMEM_SLOT */
5965

66+
#ifndef TROPIC01_ED25519_PUB_RMEM_SLOT_DEFAULT
67+
#define TROPIC01_ED25519_PUB_RMEM_SLOT_DEFAULT 2
68+
#endif /* TROPIC01_ED25519_PUB_RMEM_SLOT_DEFAULT */
6069

61-
#define TROPIC01_ED25519_PRIV_KEY_SIZE 32
62-
#define TROPIC01_ED25519_PUB_KEY_SIZE 32
70+
#ifndef TROPIC01_ED25519_PRIV_RMEM_SLOT_DEFAULT
71+
#define TROPIC01_ED25519_PRIV_RMEM_SLOT_DEFAULT 3
72+
#endif /* TROPIC01_ED25519_PRIV_RMEM_SLOT_DEFAULT */
6373

74+
#ifndef TROPIC01_ED25519_ECC_SLOT_DEFAULT
6475
#define TROPIC01_ED25519_ECC_SLOT_DEFAULT 1
76+
#endif /* TROPIC01_ED25519_ECC_SLOT_DEFAULT */
6577

78+
#ifndef PAIRING_KEY_SLOT_INDEX_0
6679
#define PAIRING_KEY_SLOT_INDEX_0 0
67-
#define TROPIC01_PAIRING_KEY_SIZE 32
68-
69-
80+
#endif /* PAIRING_KEY_SLOT_INDEX_0 */
7081

7182
typedef struct {
7283
int keySlot; /* Slot ID in TROPIC01 secure memory */
@@ -78,7 +89,6 @@ typedef struct {
7889
/* Context for TROPIC01 secure element */
7990
typedef struct {
8091
int initialized;
81-
byte keySlotUsage[8];
8292
} Tropic01CryptoDevCtx;
8393

8494

0 commit comments

Comments
 (0)