-
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 Compressed Fabric ID crypto primitive (#8776)
* Add Compressed Fabric ID crypto primitive - Add compressed fabric ID computation crypto primitive, used by operational discovery in spec. The value output by this function should be used rather than raw fabric ID, as it is unambiguous since it takes root public key scoping into account. - Primitive is not integrated in operational discovery yet, but ready to do so. - Also fixed `ClearSecretData` primitive to use the correct impl in openssl/mbedtls - Added `Bytes()`/`ConstBytes()` accessors to `ECPkey` and `P256PublicKey` to avoid grimy implicit uint8_t conversion usage in new code. - Added necessary unit tests including all error paths. Testing done: `ninja -C out/host check` with both OpenSSL and mbedTLS, after adding necessary unit tests. Employed unit tests to discover implementation issue (initially forgot to drop 0x04 start byte specifying raw uncompressed EC public key) Issue #8227 Issue #4984 Issue #3121 * Restyled by clang-format * Add Compressed Fabric ID crypto primitive - Add compressed fabric ID computation crypto primitive, used by operational discovery in spec. The value output by this function should be used rather than raw fabric ID, as it is unambiguous since it takes root public key scoping into account. - Primitive is not integrated in operational discovery yet, but ready to do so. - Also fixed `ClearSecretData` primitive to use the correct impl in openssl/mbedtls - Added `Bytes()`/`ConstBytes()` accessors to `ECPkey` and `P256PublicKey` to avoid grimy implicit uint8_t conversion usage in new code. - Added necessary unit tests including all error paths. Testing done: `ninja -C out/host check` with both OpenSSL and mbedTLS, after adding necessary unit tests. Employed unit tests to discover implementation issue (initially forgot to drop 0x04 start byte specifying raw uncompressed EC public key) Issue #8227 Issue #4984 Issue #3121 * Restyled by clang-format * Addressed review comments * Restyled by clang-format * Address review comments * Restyled by clang-format Co-authored-by: Restyled.io <[email protected]>
- Loading branch information
Showing
5 changed files
with
164 additions
and
25 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