-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Replace struct prng_ops with function interface #1923
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
with minor fixes.
core/include/tee/tee_cryp_provider.h
Outdated
TEE_Result rng_generate(void *buffer, size_t len); | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing empty lines
core/include/tee/tee_cryp_provider.h
Outdated
@@ -314,6 +305,15 @@ extern const struct crypto_ops crypto_ops; | |||
TEE_Result hash_sha256_check(const uint8_t *hash, const uint8_t *data, | |||
size_t data_size); | |||
|
|||
|
|||
/* add entropy to PRNG entropy pool */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: can you capitalize first character for consistency with other comments?
core/include/tee/tee_cryp_provider.h
Outdated
/* add entropy to PRNG entropy pool */ | ||
TEE_Result crypto_rng_add_entropy(const uint8_t *inbuf, size_t len); | ||
|
||
/* to read random data from PRNG implementation */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: can you capitalize first character for consistency with other comments and remove trailing spaces?
Adds crypto_rng_add_entropy() and crypto_rng_read() replacing struct prng_ops in crypto_ops. Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
3577f90
to
ba4a0c4
Compare
Comments addressed, tag applied |
Adds crypto_rng_add_entropy() and crypto_rng_read() replacing
struct prng_ops in crypto_ops.
Tested-by: Jens Wiklander jens.wiklander@linaro.org (QEMU)
Signed-off-by: Jens Wiklander jens.wiklander@linaro.org
It turns out that #1912 wasn't enough for #1856 to be compiled with
With this PR the init size becomes more reasonable.