-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add HAP Crypto to src/crypto #243
Conversation
This pulls in openssl based crypto methods from HAP
Here is the same branch in my fork to track that it builds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
Any unit tests you can point to from the HAP open source that fill fast follow or that can be landed concurrently? |
@gerickson
|
Awesome; sorry I missed those on first glance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused by submission of crypto algorithms that the Security group does not plan to use.
#ifndef HAVE_CUSTOM_SINGLE_SHOT_CHACHA20_POLY1305 | ||
|
||
// CHIP : cha cha poly encryption | ||
void CHIP_chacha20_poly1305_encrypt_aad(uint8_t tag[CHACHA20_POLY1305_TAG_BYTES], uint8_t * c, const uint8_t * m, size_t m_len, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought chacha and poly1305 where not part of the plan.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are the current HAP Security baseline, but we'll be updating these with the new approved items as we have implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought from the last readout from Evgeni and Alex on the cryptographic primitives that there was good consensus and alignment on those primitives (SPAKE2+, AES-128, AEAD, etc.). If there is, can we drive ahead with that consensus? Crypto suites seem like a good next layer of the pyramid to lay down that should be non-contentious if my understanding of where that team is at is accurate and up-to-date.
#define X25519_SCALAR_BYTES 32 | ||
#define X25519_BYTES 32 | ||
|
||
void CHIP_X25519_scalarmult_base(uint8_t r[X25519_BYTES], const uint8_t n[X25519_SCALAR_BYTES]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought curve 25519 was not plan-of-record.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are the current HAP Security baseline, but we'll be updating these with the new approved items as we have implementations.
return B; | ||
} | ||
|
||
void CHIP_srp_public_key(uint8_t pub_b[SRP_PUBLIC_KEY_BYTES], const uint8_t priv_b[SRP_SECRET_KEY_BYTES], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought SRP was not plan-of-record.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are the current HAP Security baseline, but we'll be updating these with the new approved items as we have implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bhaskar-apple @balducci-apple Looks like a great start for our baseline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we resolve the questions about the cryptographic primitives consensus questions here?
Those will be handled with in follow up PRS to add the the baseline as agreed on in the secure transport team. I assume @balducci-apple and @bhaskar-apple will have some follow ons (and issues please!) |
@bhaskar-apple will be providing some issues soon to align with output from the crypto primitives team. |
@woody-apple Yes working on filing issues now |
…labs_1.0 Merge in WMN_TOOLS/matter from cherry-pick/doc_updates_v1.0.0 to silabs_1.0 Squashed commit of the following: commit 78067c25ba6423ccc81b612b3aa0b49755039bf7 Author: Ezra Hale <[email protected]> Date: Fri Oct 28 20:01:49 2022 +0000 Pull request #215: Doc updates v1.0.0 Merge in WMN_TOOLS/matter from doc_updates_v1.0.0 to silabs Squashed commit of the following: commit 46f15d6f949cab44c10262869b2d94448d430f72 Author: Ezra Hale <[email protected]> Date: Fri Oct 28 14:10:14 2022 -0400 fixed typos on board names commit 55c9e89b5f006bab627120b2e5b466ba06e9792f Author: Ezra Hale <[email protected]> Date: Fri Oct 28 13:58:31 2022 -0400 updates to boards supported in script and vscode tasks, also few updates to matter bridge readmes commit 49683bfb98730654f592187f373d1b20b6eada2a Author: Ezra Hale <[email protected]> Date: Fri Oct 28 12:13:03 2022 -0400 review of silabs_examples documentation ... and 14 more commits Conflicts: .vscode/tasks.json (resolved by overwriting with our changes as we maintain this file now)
…silabs to silabs_1.0 Merge in WMN_TOOLS/matter from cherry-pick/doc_updates_v1.0.0 to silabs_1.0 Squashed commit of the following: commit 78067c25ba6423ccc81b612b3aa0b49755039bf7 Author: Ezra Hale <[email protected]> Date: Fri Oct 28 20:01:49 2022 +0000 Pull request project-chip#215: Doc updates v1.0.0 Merge in WMN_TOOLS/matter from doc_updates_v1.0.0 to silabs Squashed commit of the following: commit 46f15d6f949cab44c10262869b2d94448d430f72 Author: Ezra Hale <[email protected]> Date: Fri Oct 28 14:10:14 2022 -0400 fixed typos on board names commit 55c9e89b5f006bab627120b2e5b466ba06e9792f Author: Ezra Hale <[email protected]> Date: Fri Oct 28 13:58:31 2022 -0400 updates to boards supported in script and vscode tasks, also few updates to matter bridge readmes commit 49683bfb98730654f592187f373d1b20b6eada2a Author: Ezra Hale <[email protected]> Date: Fri Oct 28 12:13:03 2022 -0400 review of silabs_examples documentation ... and 14 more commits Conflicts: .vscode/tasks.json (resolved by overwriting with our changes as we maintain this file now)
Problem
No APIs to support symmetric key based payload encryption available in CHIP
Summary of Changes
Adds new files from HAP ADK. These have been scrubbed to replace occurrences of
HAP
withADK
fixes #147