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
@@ -25,14 +25,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
25
25
-**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`
26
26
-**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
27
27
-**printf() calls replaced** with `stse_platform_printf()` in all library code to abstract away standard I/O and allow platform-specific implementations for logging and output
28
+
-**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))
28
29
29
30
### Added
30
31
31
32
-`stse_platform_store_aes_key()` — new platform function to store an AES key into platform secure storage and retrieve its index
32
33
-`stse_platform_delete_aes_key()` — new platform function to delete an AES key from platform secure storage by index
33
34
-`stse_platform_printf()` — new platform function for formatted output, replacing all direct calls to `printf()` in the library with this abstraction to allow platform-specific implementations and avoid direct use of standard I/O in library code
35
+
-`stse_platform_Crc16_ContextInit()` — new platform function to initialize a CRC16 context
36
+
-`stse_platform_Crc16_ContextRelease()` — new platform function to release a CRC16 context
34
37
35
38
### Changed
39
+
-`stse_platform_Crc16_Accumulate()` — Now it takes `stse_crc16_context_t *crc16_context` as param
36
40
37
41
### Deprecated
38
42
@@ -42,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
42
46
-`stsafea_aes_128_host_keys_t` type.
43
47
-`stsafea_aes_256_host_keys_t` type.
44
48
-`stsafea_host_keys_t` type.
49
+
-`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