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

Fix GCM calculation with very long IV #5213

Merged
merged 9 commits into from
Nov 22, 2021

Conversation

tom-cosgrove-arm
Copy link
Contributor

@tom-cosgrove-arm tom-cosgrove-arm commented Nov 22, 2021

Fixes #4884

An initialization vector IV can have any number of bits between 1 and
2^64. So it should be filled to the lower 64-bit in the last step
when computing ghash.

This is PR #4950, rolled back to just before the last merge - originator timeout

Backports: 2.2x, 2.16

openluopworld and others added 9 commits September 17, 2021 18:20
An initialization vector IV can have any number of bits between 1 and
2^64. So it should be filled to the lower 64-bit in the last step
when computing ghash.

Signed-off-by: openluopworld <luopengxq@gmail.com>
An initialization vector IV can have any number of bits between 1 and
2^64. So it should be filled to the lower 64-bit in the last step
when computing ghash.

Signed-off-by: openluopworld <luopengxq@gmail.com>
An initialization vector IV can have any number of bits between 1 and
2^64. So it should be filled to the lower 64-bit in the last step
when computing ghash.

Signed-off-by: openluopworld <luopengxq@gmail.com>
Co-authored-by: davidhorstmann-arm <70948878+davidhorstmann-arm@users.noreply.github.com>
Signed-off-by: openluopworld <luopengxq@gmail.com>
…tly.

An initialization vector IV can have any number of bits between 1 and
2^64. So it should be filled to the lower 64-bit in the last step
when computing ghash.

Signed-off-by: openluopworld <luopengxq@gmail.com>
Signed-off-by: openluopworld <wuhanluop@163.com>
Signed-off-by: openluopworld <wuhanluop@163.com>
Signed-off-by: openluopworld <wuhanluop@163.com>
Copy link
Contributor

@davidhorstmann-arm davidhorstmann-arm left a comment

Choose a reason for hiding this comment

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

LGTM

@davidhorstmann-arm davidhorstmann-arm added bug component-crypto Crypto primitives and low-level interfaces size-s Estimated task size: small (~2d) needs-backports Backports are missing or are pending review and approval. labels Nov 22, 2021
@gilles-peskine-arm gilles-peskine-arm added needs-ci Needs to pass CI tests approved Design and code approved - may be waiting for CI or backports and removed needs-backports Backports are missing or are pending review and approval. labels Nov 22, 2021
@gilles-peskine-arm gilles-peskine-arm merged commit 0c9f058 into Mbed-TLS:development Nov 22, 2021
@tom-cosgrove-arm tom-cosgrove-arm deleted the pr_4950 branch November 22, 2021 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Design and code approved - may be waiting for CI or backports bug component-crypto Crypto primitives and low-level interfaces needs-ci Needs to pass CI tests size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wrong gcm computation when iv length is big enough in main branch
4 participants