Skip to content

Use shorter message to avoid error in RSA/ECB/NoPadding benchmark#1241

Open
KostasTsiounis wants to merge 1 commit intoIBM:java25from
KostasTsiounis:rsa_benchmark_j25
Open

Use shorter message to avoid error in RSA/ECB/NoPadding benchmark#1241
KostasTsiounis wants to merge 1 commit intoIBM:java25from
KostasTsiounis:rsa_benchmark_j25

Conversation

@KostasTsiounis
Copy link
Member

The message needs to be smaller than the key not just in number of bytes, but in absolute bitwise value. Having the key and message be the exact same number of bytes (when no padding is added) and be created randomly leads to cases where this condition does not apply and the operations fail.

To ensure that this doesn't happen, we make the message one byte smaller.

Back-ported from: #1227

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

The message needs to be smaller than the key not just in
number of bytes, but in absolute bitwise value. Having the
key and message be the exact same number of bytes (when no
padding is added) and be created randomly leads to cases
where this condition does not apply and the operations fail.

To ensure that this doesn't happen, we make the message one
byte smaller.

Signed-off-by: Kostas Tsiounis <kostas.tsiounis@ibm.com>
Copy link
Member

@jasonkatonica jasonkatonica left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants