Skip to content
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

[crypto] Added target type to the P256KeyPair initialize method #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kkasperczyk-no
Copy link
Owner

Some of the crypto PAL implementations, like PSA require information about the target usage algoritm for the key at the moment of its generation. Current P256KeyPair API doesn't allow to pass such information

Summary of changes:

  • Added target enum type to P256KeyPair Initialize() method
  • Aligned all places that Initialize() is invoked to pass ECDSA or ECDH (basically only for the CASE) type.
  • In CryptoPALPSA implementation removed method converting ECDSA to ECDH key and added generating ECDH or ECDSA key in the Initialize() method based on passed target.

!!!!!!!!!! Please delete the instructions below and replace with PR desription

If you have an issue number, please use a syntax of
Fixes #12345 and a brief change description

If you do not have an issue number, please have a good description of
the problem and the fix. Help the reviewer understand what to expect.

Make sure you delete these instructions (to prove you have read them).

!!!!!!!!!! Instructions end

src/crypto/CHIPCryptoPAL.h Outdated Show resolved Hide resolved
src/crypto/CHIPCryptoPALPSA.cpp Outdated Show resolved Hide resolved
Some of the crypto PAL implementations, like PSA require
information about the target usage algoritm for the key
at the moment of its generation. Current P256KeyPair API
doesn't allow to pass such information

Summary of changes:
* Added target enum type to P256KeyPair Initialize() method
* Aligned all places that Initialize() is invoked to pass
ECDSA or ECDH (basically only for the CASE) type.
* In CryptoPALPSA implementation removed method converting
ECDSA to ECDH key and added generating ECDH or ECDSA key
in the Initialize() method based on passed target.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants