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

WolfSSL aes icm multi encrypt fix #740

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pabuhler
Copy link
Member

The current wolfssl integration fails to encrypt multiple packets correctly on Apple silicon with "--enable-armasm".
A multi packet test is added to cipher_driver to verify this.

libSRTP will allocate and initialize a cipher once and then use it to encrypt or decrypt multiple packets. Between each operation a new IV will be set, the IV is unique for each packet. This test will ensure that cipher implementations support this.

The test vectors are based on examples in RFC 9335 .

libSRTP will allocate and initialize a cipher once and then use it
to encrypt or decrypt multiple packets. Between each operation
a new IV will be set, the IV is unique for each packet. This test will
ensure that cipher implementations support this.

The test vectors are based on examples in RFC 9335 .
When building using wolfssl on Apple silicon and armasm enabled, a call
to wc_AesSetIV was not enough to reset the context between each operation.
Calling wc_AesSetKey will reset it but may incur a performance penalty.
@pabuhler
Copy link
Member Author

@SparkiDev could you please review this PR since you added the wolfssl integration, thanks!

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