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

rsa: skip setting label for RSA OAEP if empty #125

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

ueno
Copy link
Collaborator

@ueno ueno commented Oct 16, 2023

The label parameter for RSA OAEP is optional and by default it should be empty. Given that it is set only once in setupEVP, we can bypass the call to EVP_PKEY_CTX_set0_rsa_oaep_label if the label is empty to spare 1-byte memory allocation and the following CGO call.

The label parameter for RSA OAEP is optional and by default it should
be empty.  Given that it is set only once in setupEVP, we can bypass
the call to EVP_PKEY_CTX_set0_rsa_oaep_label if the label is empty to
spare 1-byte memory allocation and the following CGO call.

Signed-off-by: Daiki Ueno <[email protected]>
Copy link
Collaborator

@qmuntal qmuntal left a comment

Choose a reason for hiding this comment

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

Good catch. LGTM!

Copy link
Contributor

@derekparker derekparker left a comment

Choose a reason for hiding this comment

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

lgtm

@ueno ueno merged commit fbf9598 into golang-fips:v2 Oct 16, 2023
8 checks passed
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