Support x_drbg_set_reseed_interval before x_drbg_seed #379
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!379
Loading…
Reference in a new issue
No description provided.
Delete branch "development"
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?
Description
Fixes ARMmbed/mbedtls#2927
Summary of change
mbedtls_hmac_drbg_seed()andmbedtls_ctr_drbg_seed()were setting the entropy contextreseed_intervalto the default value of 10 000 even whenset_reseed_interval()had been called prior toseed(). The documentation did not describe the API behaving this way, and it doesn't make sense thatseed()would remove any prior preference forreseed_intervalso this behavior has been fixed. Now, the value set byset_reseed_interval()will persist through after a call toseed().Impact of changes
This change would break any application that
reseed_intervaland expected it to be reset to the default value once they calledseed()reseed_intervaland was unknowingly using the default value for the lifetime of theDRBGobjectThe first situation could be dangerous if the set interval was very high and the PRNG was never reseeded. It is an unlikely scenario however because a user that understood the prior behavior would probably not design their application in this way anyways.
In the second situation, this change could expose a vulnerability in the user's application, so this could provide them with a net benefit.
Migration actions required
None
Documentation
Comments have been updated.
Pull request type
Test results
The first commit in the PR modifies
*_drbg_entropy_usage()so thatset_reseed_interval()is called beforeseed(). This will fail before including the next two commits which fix the bug inmbedtls_hmac_drbg_seed()andmbedtls_ctr_drbg_seed().For legal reasons, we cannot merge this pull request unless you indicate that we are allowed to redistribute your contribution by including a Signed-off-by: line in each commit message. For more information, see https://github.com/ARMmbed/mbed-crypto/issues/371 and
CONTRIBUTING.md.Also, there are CI failures in
tests/scripts/doxygen.shandtests/scripts/check-files.py.Closing as new PR opened for mbedtls/development
Pull request closed