-
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
CASE spec refresh #8137
CASE spec refresh #8137
Conversation
read fabricIdconnectedhomeip/src/protocols/secure_channel/CASESession.cpp Lines 1151 to 1161 in f2f7df4
This comment was generated by todo based on a
|
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.
Crypto algorithm used for destinationId in CASE does not match spec.
implement API for this in OperationalCredentialSetconnectedhomeip/src/protocols/secure_channel/CASESession.cpp Lines 268 to 272 in 21f624c
This comment was generated by todo based on a
|
Parameterize fabricId instead of hardcoding it to 0connectedhomeip/src/protocols/secure_channel/CASESession.cpp Lines 331 to 341 in 21f624c
This comment was generated by todo based on a
|
Parameterize fabricId instead of hardcoding it to 0connectedhomeip/src/protocols/secure_channel/CASESession.cpp Lines 1119 to 1129 in 21f624c
This comment was generated by todo based on a
|
add method to retrieve FabricId. Call it hereconnectedhomeip/src/protocols/secure_channel/CASESession.cpp Lines 1128 to 1138 in 21f624c
This comment was generated by todo based on a
|
Update GetCertFabricId method to use UINT64_MAX macro as an invalid reference, and added a final sanity check to see if there were actually any fabricIds present in the certificate. Added doxygen to GetCredentials method.
Size increase report for "esp32-example-build" from 5d91959
Full report output
|
Size increase report for "nrfconnect-example-build" from 5d91959
Full report output
|
Size increase report for "gn_qpg-example-build" from 5d91959
Full report output
|
* CASE spec refresh * Remove TrustedRootID from Sigma messages. Replce HKDF algorithm with HMAC-SHA256 Algorithm in GenerateDestinationID method. * Replace TrustedRootId parameter with an index value for the OperationalCredentialSet. Added CredentialsIndex parameter to AdminPairingTable's GetCredentials method. Removed FabricSecret. Removed kIPKInfo. Removed Deprecated ComputeIPK method - Replaced it with dummy RetrieveIPK method. * cast 1 to uint8_t to avoid compiler errors on other platforms * Fix uint8_t conversion * Replace CASETLVTags with TLV::ContextTag ID, switch unsafe statement to an actual OperationalCredentialSet method to retrieve a TrustedRootId, renamed kMAX_Hash_Length refs to kSHA256_Hash_Length to match the Spec. * Add GenerateDestinationID Test * Added ReleaseLastCert method to OperationalCredentialSet Class. This method will release the last certificate data in the set. Added call to ReleaseLastCert method during CASESession after a successful validation of the NOC certificate. Updated CASE Unit Tests to force 3 certificates maximum. This will guarantee that for the tests to work fine, CASESession must release the NOC certificate every time. CASESession: change LoadCerts to LoadCert - Only NOC is transferred during CASE Protocol. No need to handle ICA * remove fabricId parameters/methods from CASESession. Retrieve it from the NOC instead. * Updated ReleaseLastCert method from CHIPCertificateSet class: not using a const ChipCertificateData type anymore to avoid confusion. Removed redundant comment from ReleaseLastCert method. Wrote some TODO items to update OperationalCredentialSet class in order to work with size_t variable counters: useful to index more than 255 Credentials. Update DestinationIDGeneration Test to use Spec's test vectors. Added static assert to check TBEData2 and TBEData3 Nonce Lengths : they must match. Added new method to Estimate TLV Struct overhead. Updated GenerateDestinationID to be stateless: now directly accesses the inputs as raw memory buffers. Updated HandleSigma methods to handle TLV tags sequentially. Removed redundant GetLength and GetType calls during TLV Reads. Renamed encryptionKeyId to initiatorSessionId and responderSessionId. Fixed typo in ENABLE_HSM_CASE_EPHEMERAL_KEY macro. * Update casesession with latest comments * Trigger Build * added IPK to CASESession Serializable data: IPK is needed to DeriveSecureSession, so it needs to be stored. Updated FindDestinationIDCandidate loop variables to size_t. Also updated names to reflect what they are indexing. * Added CASESession protected API (Virtual) to get the IPK List Entries. They can be overridden by the Unit Tests in order to feed in the test IPK vectors. * Update for fabric class rename * Restyling * Replace mCredentialsIndex pointer to an actual uint8_t variable. Update GetCertFabricId method to use UINT64_MAX macro as an invalid reference, and added a final sanity check to see if there were actually any fabricIds present in the certificate. Added doxygen to GetCredentials method. * Restyle fix
Problem
CASE does not currently follow the current spec with message handling.
Fixes CASE handshake implementation looks nothing like the spec #5934 (along with the previously submitted CASE TLV changes)
Fixes CASE session fails when commissioning second device in a row #8207
Change overview
Added TrustedRootId parameter to CASESession’s EstablishSession method
Added new methods to Find and Generate Destination IDs (New CASE Spec updates)
Updated some CASESession method’s parameters that were using raw input buffers with ByteSpan and MutableByteSpan objects
Updated CASESession Nonce and Info vectors (new CASE Spec updates)
Updated SigmaR1 message construction method to generate DestinationID instead of sending all TrustedRootIDs available.
Minor comment updates to match CASE Spec’s steps
Added new method to OperationalCredentialSet to retrieve RootCertificate indexed by TrustedRootId
CASESession Tests: Updated NodeID parameter to match Node ID of the corresponding Test Vector Certificate
Testing