Commit f40a0d7
committed
external: upgrade cryptoauthlib to v3.2.5
The library handling the secure chip.
https://github.com/digitalbitbox/cryptoauthlib/tree/v3.2.5
See also:
https://github.com/MicrochipTech/cryptoauthlib/wiki/Upgrading-to-v3.2#api-changes-between-v31x-and-v32x
There is a new param `word_address` that according to the docs above
is supposed to be sent as the first byte. We do this already manually
by sending 0x03:
https://github.com/digitalbitbox/bitbox02-firmware/blob/7ebb8450be8f3f9f3232f1407bfcaec4d22257e4/src/securechip/securechip.c#L134. The
actual `word_address` param as set by cryptoauthlib is always 0xFF as
that is the default
[here](https://github.com/digitalbitbox/cryptoauthlib/blob/v3.2.5/lib/calib/calib_execution.c#L302)
and not 0x03 as set
[here](https://github.com/digitalbitbox/cryptoauthlib/blob/v3.2.5/lib/calib/calib_execution.c#L325)
because we define iface type to be ATCA_CUSTOM_IFACE
[here](https://github.com/digitalbitbox/bitbox02-firmware/blob/7ebb8450be8f3f9f3232f1407bfcaec4d22257e4/src/securechip/securechip.c#L186). 0xFF
is basically a dummy value and defers to the custom
implementation (ATCA_CUSTOM_IFACE).
The cryptoauthlib driver code (which we currently don't use, but is a
good reference) also newly sends the word address before reading:
https://github.com/MicrochipTech/cryptoauthlib/blob/v3.2.5/lib/hal/hal_i2c_start.c#L230-L240. I
did not port this to our securechip.c/_receive function in this commit
as we didn't do it before, it seems to work without, and I could not
figure out the purpose of sending the word address before reading.1 parent b5b39d0 commit f40a0d7
File tree
4 files changed
+75
-26
lines changed- external
- src/securechip
4 files changed
+75
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | 195 | | |
197 | 196 | | |
198 | 197 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
217 | 220 | | |
218 | 221 | | |
219 | 222 | | |
220 | 223 | | |
221 | 224 | | |
222 | 225 | | |
223 | | - | |
224 | | - | |
225 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
226 | 235 | | |
227 | 236 | | |
228 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
Submodule cryptoauthlib updated from 63f4ad4 to e981e09
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| |||
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
130 | | - | |
| 131 | + | |
131 | 132 | | |
132 | 133 | | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| |||
184 | 186 | | |
185 | 187 | | |
186 | 188 | | |
187 | | - | |
| 189 | + | |
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
| |||
0 commit comments