You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Implemented AES ECB, CBC, CFB, and GCM modes with hardware acceleration.
- Ensured proper mutex locking for concurrent access to hardware resources during
- Adjusted the aes.h header to include PSoC6 specific definitions and structures.
- Updated README for PSoC6 port.
Copy file name to clipboardExpand all lines: wolfcrypt/src/port/cypress/README.md
+81-23Lines changed: 81 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# PSoC6 Hardware Crypto Port for wolfSSL
2
2
3
-
This directory provides a hardware-accelerated cryptography port for Cypress PSoC6 devices, integrating the PSoC6 hardware crypto block with the wolfSSL cryptography library. The implementation leverages the PSoC6 hardware to accelerate various cryptographic hash and ECC operations, improving performance and reducing CPU load.
3
+
This directory provides a hardware-accelerated cryptography port for Cypress PSoC6 devices, integrating the PSoC6 hardware crypto block with the wolfSSL cryptography library. The implementation leverages the PSoC6 hardware to accelerate various cryptographic operations including hash functions, AES encryption/decryption, and ECC verification, improving performance and reducing CPU load.
4
4
5
5
## Implemented Features
6
6
@@ -21,68 +21,126 @@ The following hash algorithms are implemented using the PSoC6 hardware crypto bl
21
21
22
22
All hash operations are offloaded to the PSoC6 hardware, with mutex protection for thread safety.
23
23
24
-
### 2. Hardware-Accelerated ECDSA Verification
24
+
### 2. Hardware-Accelerated AES Functions
25
+
26
+
The following AES cipher modes are implemented using the PSoC6 hardware crypto block:
-`PSOC6_HASH_SHA3` — Enables SHA-3 family hardware acceleration.
49
-
- To enable the corresponding algorithms in wolfSSL, define the following macros as needed (typically in your `wolfssl/wolfcrypt/settings.h` or build system):
In your build configuration or `wolfssl/wolfcrypt/settings.h`:
60
106
```c
61
107
#defineWOLFSSL_PSOC6_CRYPTO
108
+
109
+
/* Hash functions */
62
110
#defineWOLFSSL_SHA224
63
111
#defineWOLFSSL_SHA384
64
112
#defineWOLFSSL_SHA512
65
113
#defineWOLFSSL_SHA3
66
114
#defineWOLFSSL_SHAKE128
67
115
#defineWOLFSSL_SHAKE256
116
+
117
+
/* AES cipher modes */
118
+
#defineHAVE_AES_ECB
119
+
#defineHAVE_AES_CBC
120
+
#defineHAVE_AES_DECRYPT
121
+
#defineWOLFSSL_AES_DIRECT
122
+
#defineWOLFSSL_AES_CFB
123
+
#defineHAVE_AESGCM
124
+
125
+
/* ECC */
68
126
#defineHAVE_ECC
69
127
```
70
-
-No need to define `PSOC6_HASH_SHA1`, `PSOC6_HASH_SHA2`, or`PSOC6_HASH_SHA3`yourself; they are defined in `psoc6_crypto.h`.
128
+
-Note: `PSOC6_HASH_SHA1`, `PSOC6_HASH_SHA2`, and`PSOC6_HASH_SHA3` are automatically defined in `psoc6_crypto.h`; you don't need to define them explicitly.
71
129
72
130
## File Overview
73
131
74
132
-`psoc6_crypto.h`
75
133
Header file declaring the hardware crypto interface and configuration macros.
76
134
-`psoc6_crypto.c`
77
-
Implementation of the hardware-accelerated hash and ECC functions for PSoC6.
135
+
Implementation of the hardware-accelerated hash, AES, and ECC functions for PSoC6.
78
136
79
137
## Integration Notes
80
138
81
139
- The port expects the PSoC6 PDL (Peripheral Driver Library) to be available and included in your project.
82
140
- The hardware crypto block is initialized on first use; no manual initialization is required unless you wish to call `psoc6_crypto_port_init` directly.
83
-
- Hash operations are mutex-protected for thread safety.
141
+
- Hash and AES operations are mutex-protected for thread safety.
84
142
- ECC hardware operations are not mutex-protected; if you use ECC functions from multiple threads, you must provide your own synchronization.
85
-
- The implementation is designed to be compatible with the wolfSSL API, so existing code using wolfSSL hash/ECC functions will automatically benefit from hardware acceleration when enabled.
143
+
- The implementation is designed to be compatible with the wolfSSL API, so existing code using wolfSSL hash/AES/ECC functions will automatically benefit from hardware acceleration when enabled.
0 commit comments