psa-api
psa-api copied to clipboard
Reorganise key format and key derivation information
[Updated: rebased after publication of Crypto API 1.2.1. Updated the rendered PDF]
This is a follow-up to #177, which moves the information about key formats, and key derivation, into each key type definition.
This is more user-centric than providing all the key formats in a single place, and all the key derivation methods in another single place. It will also scale better when we add additional formats, or key construction methods (see #149 and #167).
The new commits (since #177) start at https://github.com/ARM-software/psa-api/pull/184/commits/0733f8164fa650b3e1f128963e44192e48e4b9fa
Preview of the PDF: IHI0086-PSA_Certified_Crypto_API-1.3.0-key-formats-draft.2.pdf
I'm not sure if the 'Key format' and 'Key derivation' sections might benefit from some boilerplate text to indicate the sub-section's relevance to psa_import_key()
/psa_export_key()
and psa_key_derivation_ouput_key()
respectively?
E.g. instead of:
Key format
The key data is the raw bytes of the key.
Key derivation
Draw m/8 bytes of data and ...
we say:
Key format
When calling
psa_import_key()
orpsa_export_key()
, the key data is the raw bytes of the key.Key derivation
A call to
psa_key_derivation_output_key()
will construct the key by drawing m/8 bytes of data and ...
For key-pair, this would be an obvious place to cross reference to the public key export format. For public keys which might be used in key agreement, or other APIs, the boilerplate text would be suitably modified.
Rebased after #177 merged (with minor fixes)