Fix pk_write with EC key to use a constant size for the private value #314
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!314
Loading…
Reference in a new issue
No description provided.
Delete branch "pkwrite_ECPrivateKey_size-crypto"
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?
When writing a private EC key, use a constant size for the private value, as specified in RFC 5915. Previously, the value was written as an ASN.1 INTEGER, which caused the size of the key to leak about 1 bit of information on average and could cause the value to be 1 byte too large for the output buffer.
These changes were previously applied to Mbed TLS 2.7, 2.16 and development (released in 2.19), but got lost during the split of Mbed TLS and Mbed Crypto. This is a straightforward side-port of https://github.com/ARMmbed/mbedtls-restricted/pull/503 and https://github.com/ARMmbed/mbedtls-restricted/pull/508 (private links: these were pull requests for a security fix which was quarantined until release).
Fix ARMmbed/mbedtls#1028
Internal ref: IOTCRYPT-969
LGTM
This is consistent with PR 503.
New CI run with repaired CI: https://jenkins-internal.mbed.com/job/mbed-crypto-pr/job/PR-314-merge/2/ → passed. Good to merge.