Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
mkardous-silabs and bzbarsky-apple authored Dec 5, 2023
1 parent 26db589 commit 02890fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/crypto/CHIPCryptoPAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ using Symmetric128BitsKeyByteArray = uint8_t[CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BY
/**
* @brief Platform-specific Symmetric key handle
*
* The class represents key used by Matter stack either in the form of raw key material or key
* The class represents a key used by the Matter stack either in the form of raw key material or key
* reference, depending on the platform. To achieve that, it contains an opaque context that can be
* cast to a concrete representation used by the given platform. Note that currently Matter uses
* 128-bit symmetric keys only.
Expand Down
8 changes: 4 additions & 4 deletions src/crypto/SessionKeystore.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,26 @@ class SessionKeystore
virtual ~SessionKeystore() {}

/**
* @brief Import raw key material and return an AES 128 Bits key handle.
* @brief Import raw key material and return a key handle for a key that be used to do AES 128 encryption.
*
* @note This method should only be used when using the raw key material in the Matter stack
* cannot be avoided. Ideally, crypto interfaces should allow platforms to perform all the
* cryptographic operations in a secure environment.
*
* If the method returns no error, the application is responsible for destroying the handle
* using DestroyKey() method when the key is no longer needed.
* using the DestroyKey() method when the key is no longer needed.
*/
virtual CHIP_ERROR CreateKey(const Symmetric128BitsKeyByteArray & keyMaterial, Aes128BitsKeyHandle & key) = 0;

/**
* @brief Import raw key material and return an HMAC 128 Bits key handle.
* @brief Import raw key material and return a key handle for a key that can be used to do 128-bit HMAC.
*
* @note This method should only be used when using the raw key material in the Matter stack
* cannot be avoided. Ideally, crypto interfaces should allow platforms to perform all the
* cryptographic operations in a secure environment.
*
* If the method returns no error, the application is responsible for destroying the handle
* using DestroyKey() method when the key is no longer needed.
* using the DestroyKey() method when the key is no longer needed.
*/
virtual CHIP_ERROR CreateKey(const Symmetric128BitsKeyByteArray & keyMaterial, Hmac128BitsKeyHandle & key) = 0;

Expand Down

0 comments on commit 02890fb

Please sign in to comment.