Skip to content
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

Merged
merged 1 commit into from
Nov 8, 2017

Conversation

jenswi-linaro
Copy link
Contributor

Adds crypto_rng_add_entropy() and crypto_rng_read() replacing
struct prng_ops in crypto_ops.

Tested-by: Jens Wiklander [email protected] (QEMU)
Signed-off-by: Jens Wiklander [email protected]

It turns out that #1912 wasn't enough for #1856 to be compiled with

CFG_CORE_SANITIZE_KADDRESS=y
CFG_WITH_PAGER=y

With this PR the init size becomes more reasonable.

Copy link
Contributor

@etienne-lms etienne-lms left a 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 <[email protected]> with minor fixes.

TEE_Result rng_generate(void *buffer, size_t len);



Copy link
Contributor

Choose a reason for hiding this comment

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

trailing empty lines

@@ -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 */
Copy link
Contributor

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?

/* 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 */
Copy link
Contributor

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 <[email protected]>
Tested-by: Jens Wiklander <[email protected]> (QEMU)
Signed-off-by: Jens Wiklander <[email protected]>
@jenswi-linaro
Copy link
Contributor Author

Comments addressed, tag applied

@jforissier jforissier merged commit 36a063e into OP-TEE:master Nov 8, 2017
@jenswi-linaro jenswi-linaro deleted the crypto_ops branch November 9, 2017 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants