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

std/crypto: add the AEGIS AEADs #6442

Merged
merged 3 commits into from
Sep 29, 2020
Merged

std/crypto: add the AEGIS AEADs #6442

merged 3 commits into from
Sep 29, 2020

Conversation

jedisct1
Copy link
Contributor

Showcase that Zig can be a great option for high performance cryptography.

The AEGIS family of authenticated encryption algorithms was selected for high-performance applications in the final portfolio of the CAESAR competition.

They reuse the AES core function, but are substantially faster than the CCM, GCM and OCB modes while offering a high level of security.

AEGIS algorithms are especially fast on CPUs with built-in AES support, and the 128L variant fully takes advantage of the pipeline in modern Intel CPUs.

Performance of the Zig implementation is on par with libsodium.

@jedisct1
Copy link
Contributor Author

jedisct1 commented Sep 27, 2020

Benchmark result (with AESNI):

 chacha20Poly1305:        353 MiB/s
xchacha20Poly1305:        356 MiB/s
       gimli-aead:        132 MiB/s
        aegis128l:      16234 MiB/s
        aegis-256:       9653 MiB/s

@andrewrk
Copy link
Member

16234 MiB/s

that is a big number

@jedisct1
Copy link
Contributor Author

jedisct1 commented Sep 27, 2020

Without AES-NI, this remains faster than other options:

 chacha20Poly1305:        347 MiB/s
xchacha20Poly1305:        352 MiB/s
       gimli-aead:        131 MiB/s
        aegis128l:        679 MiB/s
        aegis-256:        455 MiB/s

@jedisct1 jedisct1 changed the title std/crypto: add the AEGIS128L AEAD std/crypto: add the AEGIS AEADs Sep 28, 2020
Showcase that Zig can be a great option for high performance cryptography.

The AEGIS family of authenticated encryption algorithms was selected for
high-performance applications in the final portfolio of the CAESAR
competition.

They reuse the AES core function, but are substantially faster than the
CCM, GCM and OCB modes while offering a high level of security.

AEGIS algorithms are especially fast on CPUs with built-in AES support, and
the 128L variant fully takes advantage of the pipeline in modern Intel CPUs.

Performance of the Zig implementation is on par with libsodium.
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.

None yet

2 participants