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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,18 +18,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
18
18
-**API change** — all platform-level SecureElement initialization functions now require an additional `void *pArg` parameter ([51aa3f8](https://github.com/STMicroelectronics/STSELib/commit/51aa3f8114d33adfe38da6fd261e4b9a71a1fa9b))
19
19
-**Platform AES API change** — all platform AES cryptographic functions now reference keys by secure storage index (`PLAT_UI32 key_idx`) instead of raw key pointer and length (`PLAT_UI8 *pKey, PLAT_UI16 key_length`). Affected functions: `stse_platform_aes_cmac_init`, `stse_platform_aes_cmac_compute`, `stse_platform_aes_cmac_verify`, `stse_platform_aes_cbc_enc`, `stse_platform_aes_cbc_dec`, `stse_platform_aes_ecb_enc`
20
20
-**Renamed**`stsafea_open_host_session` to `stsafea_open_host_session_from_idx` — signature updated to accept key indices (`PLAT_UI32 host_MAC_key_idx`, `PLAT_UI32 host_cypher_key_idx`) instead of raw key pointers
21
+
-**Platform CRC API change** — introduces a context (`stse_crc16_context_t *`) parameter to make the CRC PAL APIs multi-context-safe. Affected functions: `stse_platform_Crc16_Accumulate` (PR [#90](https://github.com/STMicroelectronics/STSELib/pull/90))
21
22
22
23
### Added
23
24
24
25
-`stse_platform_store_aes_key()` — new platform function to store an AES key into platform secure storage and retrieve its index
25
26
-`stse_platform_delete_aes_key()` — new platform function to delete an AES key from platform secure storage by index
27
+
-`stse_platform_Crc16_ContextInit()` — new platform function to initialize a CRC16 context
28
+
-`stse_platform_Crc16_ContextRelease()` — new platform function to release a CRC16 context
26
29
27
30
### Changed
31
+
-`stse_platform_Crc16_Accumulate()` — Now it takes `stse_crc16_context_t *crc16_context` as param
28
32
29
33
### Deprecated
30
34
31
35
### Removed
32
36
-`stsafea_open_host_session` function. Now replaced by `stsafea_open_host_session_from_idx` which accepts key indices instead of raw key pointers. Note that you must first store the AES keys in platform secure storage using `stse_platform_store_aes_key()` to obtain the required indices before opening a host session.
37
+
-`stse_platform_Crc16_Calculate()` — Now replaced by `stse_platform_Crc16_ContextInit()` which doesn't calculate a CRC16 but initialize the CRC context which will be used to calculate the CRC via `stse_platform_Crc16_Accumulate()`.
Copy file name to clipboardExpand all lines: doc/resources/Markdown/04_PORTING_GUIDE/PAL_files/stse_platform_crc.c.md
+54-16Lines changed: 54 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,26 +11,35 @@ The stse_platform_crc.c file provides CRC16 functions for the STSecureElement li
11
11
12
12
<b> Implementation directives :</b> This abstaction function should implement or call a platform function/driver that perform CRC16 calculation process.
13
13
14
-
## stse_platform_Crc16_Calculate:
14
+
## stse_platform_Crc16_ContextInit:
15
15
16
-
- Purpose: Calculates the CRC16 checksum for the given buffer.
16
+
- Purpose: Initializes a CRC16 context.
17
17
- Parameters:
18
-
- pbuffer: Pointer to the buffer.
19
-
- length: Length of the buffer.
20
-
- Return Value: Returns the calculated CRC16 checksum.
18
+
- crc16_context: Pointer to the CRC16 context to initialize.
19
+
- Return Value: Returns `STSE_OK` to indicate successful context initialization.
21
20
22
-
<b> Implementation directives :</b> This abstaction function should implement or call a platform function/driver that perform CRC16 calculation process.
21
+
<b> Implementation directives :</b> This abstraction function should implement or call a platform function/driver that perform CRC16 accumulate process.
23
22
24
23
## stse_platform_Crc16_Accumulate:
25
24
26
25
- Purpose: Accumulates the CRC16 checksum for the given buffer.
27
26
- Parameters:
28
27
- pbuffer: Pointer to the buffer.
29
28
- length: Length of the buffer.
29
+
- crc16_context: Pointer to the CRC context holder previously initialized successfully via `stse_platform_Crc16_ContextInit()`.
30
+
This context is used internally to maintain the state required for incremental CRC computation across multiple calls to `stse_platform_Crc16_Accumulate()`.
30
31
- Return Value: Returns the accumulated CRC16 checksum.
31
32
32
33
<b> Implementation directives :</b> This abstaction function should implement or call a platform function/driver that perform CRC16 acumulate process.
33
34
35
+
## stse_platform_Crc16_ContextRelease:
36
+
37
+
- Purpose: Releases resources associated with a CRC16 context.
38
+
- Parameters:
39
+
- crc16_context: Pointer to a CRC context previously initialized with `stse_platform_Crc16_ContextInit()`.
40
+
41
+
<b> Implementation directives :</b> This abstraction function should implement or call a platform function/driver that perform CRC16 accumulate process.
0 commit comments