API: minor corrections after beta 2 #83
No reviewers
Labels
No labels
api-spec
bug
CLA requested
CLA valid
compliance
DO NOT MERGE
duplicate
enhancement
feature branch
good first issue
HEADER FORMATTING ISSUE
help wanted
Information
invalid
Jira status: AWAITING REVIEW
Jira status: CLOSED
Jira status: DONE
Jira status: IN PROGRESS
Jira status: IN REVIEW
Jira status: OPEN
Jira status: REOPENED
Jira status: RESOLVED
mirrored
mirror internally
needs: backports
needs: ci
needs: design review
needs: preceding PR
needs: review
needs: work
notabug
open for community contribution
Product Backlog
question
ready for merge
security
stale
type: bug
type: enhancement
type: question
web pages
wontfix
writing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-ARMmbed/mbed-crypto!83
Loading…
Reference in a new issue
No description provided.
Delete branch "psa-api-1.0-beta-beta2_minor_fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
psa_generator_import_keyfor most key types.@ -2894,0 +2901,4 @@* - #PSA_KEY_TYPE_DERIVE;* - #PSA_KEY_TYPE_HMAC.** - For ECC keys on a Montgomery elliptic curveIt looks like this should be
(bits +7) / 8bytes.@ -2894,0 +2901,4 @@* - #PSA_KEY_TYPE_DERIVE;* - #PSA_KEY_TYPE_HMAC.** - For ECC keys on a Montgomery elliptic curvePff,
bits * 8,bits / 8…It's actually
bits / 8and not(bits + 7) / 8sincebitsis a multiple of 8 for symmetric keys.But this function should also be specified for other key types. Implementations don't have to support every key type, but if they do then they should follow a standard. I've rewritten the specification of this function to define the behavior for every standard key type other than RSA.
@ -2894,0 +2901,4 @@* - #PSA_KEY_TYPE_DERIVE;* - #PSA_KEY_TYPE_HMAC.** - For ECC keys on a Montgomery elliptic curveI pushed another commit to make the specification unambiguous for DH, DSA and ECC (Weierstrass). I chose a method that is codified by NIST, so that it's possible to be FIPS-compliant when implementing this function.
@ -2894,0 +2921,4 @@* The byte string drawn from the generator is interpreted as specified* for the output produced by psa_export_key().* The following key types defined in this specification follow this scheme:*The method described in the standard is more relaxed in some cases (for example when generating DH keys the standard allows going for shorter private keys than the size of the prime). I think writing something like "This method allows for compliance with NIST and FIPS standards, see:" would be more accurate.
In case of ECC the boundary is the order of the curve's base point (here I use the term curve in the sense of the set of cryptographic domain parameters and not as a mathematical object, but I assume that is what we do throughout this documentation).
@ -2894,0 +2921,4 @@* The byte string drawn from the generator is interpreted as specified* for the output produced by psa_export_key().* The following key types defined in this specification follow this scheme:*I tweaked the wording.
@ -2894,0 +2921,4 @@* The byte string drawn from the generator is interpreted as specified* for the output produced by psa_export_key().* The following key types defined in this specification follow this scheme:*Indeed. Fixed, thanks.
@ -2894,0 +2938,4 @@* For these key types, interpret the byte string as integer* in big-endian order. Discard it if it is not in the range* [0, *N* - 2] where *N* is the boundary of the private key domain* (the prime *p* for Diffie-Hellman, the subprime *q* for DSA,Typo: allow -> allows
@ -2894,0 +2938,4 @@* For these key types, interpret the byte string as integer* in big-endian order. Discard it if it is not in the range* [0, *N* - 2] where *N* is the boundary of the private key domain* (the prime *p* for Diffie-Hellman, the subprime *q* for DSA,Amended