Skip to content

Check that integer representation of message is smaller than modulus#1501

Open
KostasTsiounis wants to merge 1 commit into
IBM:java21from
KostasTsiounis:rsa_check_j21
Open

Check that integer representation of message is smaller than modulus#1501
KostasTsiounis wants to merge 1 commit into
IBM:java21from
KostasTsiounis:rsa_check_j21

Conversation

@KostasTsiounis
Copy link
Copy Markdown
Member

In RSA cipher operations, the message is converted into an integer that needs to be smaller than the public key's modulus.

A check is added to fail early with the proper message, instead of failing during the actual operation with a not so helpful message.

An additional test to verify that behaviour is introduced as well.

Back-ported from: #1252

Signed-off-by: Kostas Tsiounis kostas.tsiounis@ibm.com

In RSA cipher operations, the message is converted into an integer
that needs to be smaller than the public key's modulus.

A check is added to fail early with the proper message, instead of
failing during the actual operation with a not so helpful message.

Additional tests to verify that behaviour are introduced as well.

Signed-off-by: Kostas Tsiounis <kostas.tsiounis@ibm.com>
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.

1 participant