-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add intermediate digest computation to Hash_SHA256_Stream (#8496)
* Add intermediate digest computation to Hash_SHA256_Stream - Add GetDigest() to Hash_SHA256_Stream and associated tests - Make Hash_SHA256_Stream work with safe spans (partial fix to #4189) - Fix all usages of Hash_SHA256_Stream - Drive-by simplification of hex conversion in Rotating ID Testing done: - Cert tests (test_suite.sh) for both mbedTLS and OpenSSL - gn check on host - cross-validation check of rotating ID with the following Python snippet: ``` >>> to_hash = b"TEST_SN" + b"\x00\x00" >>> print(to_octet_string(b"\x00\x00" + CHIP_Crypto_Hash(to_hash)[-16:]).replace(":","").upper()) 00007C5F6E176CD40F68685D100A1CF8A98B ``` This was verified against cert tests output: ``` [1626748850.369690][132218:132218] CHIP:DL: Device Configuration: [1626748850.369695][132218:132218] CHIP:DL: Serial Number: TEST_SN [1626748850.369699][132218:132218] CHIP:DL: Vendor Id: 9050 (0x235A) [1626748850.369702][132218:132218] CHIP:DL: Product Id: 65279 (0xFEFF) [1626748850.369706][132218:132218] CHIP:DL: Product Revision: 1 [1626748850.369709][132218:132218] CHIP:DL: Setup Pin Code: 20202021 [1626748850.369713][132218:132218] CHIP:DL: Setup Discriminator: 3840 (0xF00) [1626748850.369716][132218:132218] CHIP:DL: Manufacturing Date: (not set) [1626748850.369720][132218:132218] CHIP:DL: Device Type: 65535 (0xFFFF) [1626748850.369732][132218:132218] CHIP:SVR: SetupQRCode: [MT:YNJV7VSC00KA0648G00] ............................. [1626748850.370936][132218:132218] CHIP:DL: rotatingDeviceId: 00007C5F6E176CD40F68685D100A1CF8A98B ``` Issue #4189 Fixes #8495 * Restyled by clang-format * Fix for scripts/build test failure * Fix build on ESP32, apply review comments * Apply review comment from @emargolis Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Switi Mhaiske <[email protected]>
- Loading branch information
Showing
9 changed files
with
252 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.