-
Notifications
You must be signed in to change notification settings - Fork 3k
allow hash or mac on large buffers with less memory use #9758
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
allow hash or mac on large buffers with less memory use #9758
Conversation
…ation use a fixed size buffer for large inputs to process the input in multiple smaller pieces.
@NirSonnenschein, thank you for your changes. |
Needs coding style update (review Travis astyle job) |
@@ -28,6 +33,12 @@ typedef struct psa_spm_hash_clone_s { | |||
// ---------------------------------- Globals ---------------------------------- | |||
static int psa_spm_init_refence_counter = 0; | |||
|
|||
/* maximal memoty allocation for reading large hash ort mac input buffers. |
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.
memoty
-> memory
?
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.
oops, good catch : fixed.
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.
LGTM
Ci started |
Test run: SUCCESSSummary: 12 of 12 test jobs passed |
Description
Previously a buffer the size of whole input was allocated for hash or MAC operations which is inefficient. This change allows the use of a fixed size buffer for large inputs to process the input
in multiple smaller pieces.
Pull request type
Reviewers
@avolinski @itayzafrir
Release Notes
description: Hash and mac operations are now processed in secure partition in multiple chunks internally leading to decrease in memory use for large buffers.
effect analysis: This change has no impact on API and should not alter behavior from the user perspective.
Migration: not action should be required from the user side.