Skip to content

ctr_drbg: Clarify reseed_counter values before seeding #342

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

Merged
merged 1 commit into from
Jan 10, 2020

Conversation

Patater
Copy link
Contributor

@Patater Patater commented Jan 9, 2020

Before the initial seeding, reseed_counter used to always be 0. Now, the
value depends on whether or not the user has explicitly set the amount
of data to get from the nonce (via e.g.
mbedtls_ctr_drbg_set_nonce_len()). Add comments to clarify the possible
values reseed_counter can have before the initial seeding.

@Patater Patater added enhancement New feature or request needs: review The pull request is ready for review. This generally means that it has no known issues. labels Jan 9, 2020
AndrzejKurek
AndrzejKurek previously approved these changes Jan 9, 2020
* to use as a nonce for the initial seeding.
* to use as a nonce for the initial seeding,
* or -1 if no nonce length has been explicitly
* set. (See mbedtls_ctr_drbg_set_nonce_len())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* set. (See mbedtls_ctr_drbg_set_nonce_len())
* set (see mbedtls_ctr_drbg_set_nonce_len()).

yanesca
yanesca previously approved these changes Jan 9, 2020
@Patater Patater force-pushed the reseed-counter-value-comment branch from c6cc168 to a5c655b Compare January 9, 2020 13:47
AndrzejKurek
AndrzejKurek previously approved these changes Jan 9, 2020
Before the initial seeding, reseed_counter used to always be 0. Now, the
value depends on whether or not the user has explicitly set the amount
of data to get from the nonce (via e.g.
mbedtls_ctr_drbg_set_nonce_len()). Add comments to clarify the possible
values reseed_counter can have before the initial seeding.
@Patater Patater added needs: ci Needs a passing full CI run and removed needs: review The pull request is ready for review. This generally means that it has no known issues. labels Jan 9, 2020
@Patater
Copy link
Contributor Author

Patater commented Jan 10, 2020

CI is failing ASan for some reason. I can't reproduce the failures locally. This PR changes only a comment, so OK to merge (as comments can't cause ASan to fail).

@Patater Patater removed the needs: ci Needs a passing full CI run label Jan 10, 2020
@Patater Patater merged commit a337167 into ARMmbed:development Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants