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

Adding Ascon, an AEAD lightweight cipher. #400

Merged
merged 7 commits into from Feb 16, 2023
Merged

Conversation

armfazh
Copy link
Contributor

@armfazh armfazh commented Feb 9, 2023

Reference: https://ascon.iaik.tugraz.at/index.html

Benchmarks:
old= naive substitution layer
new= 64-bit operations (constant-time)

benchmark Operation old MB/s new MB/s speedup
Ascon128 Open-64-8 1.71 125.59 73.44x
Ascon128 Seal-64-8 1.58 123.48 78.15x
Ascon128 Open-1350-8 2.86 211.97 74.12x
Ascon128 Seal-1350-8 2.72 210.11 77.25x
Ascon128 Open-8192-8 3.06 203.36 66.46x
Ascon128 Seal-8192-8 2.91 209.82 72.10x
Ascon128a Open-64-8 2.19 157.34 71.84x
Ascon128a Seal-64-8 2.09 155.94 74.61x
Ascon128a Open-1350-8 3.94 309.84 78.64x
Ascon128a Seal-1350-8 4.15 290.40 69.98x
Ascon128a Open-8192-8 4.14 308.30 74.47x
Ascon128a Seal-8192-8 4.17 301.98 72.42x

cipher/ascon/ascon.go Outdated Show resolved Hide resolved
cipher/ascon/ascon.go Outdated Show resolved Hide resolved
cipher/ascon/ascon.go Outdated Show resolved Hide resolved
@bwesterb
Copy link
Member

Nice moving to int64. How does the performance improve? The substitution table still isn't constant time.

@armfazh armfazh self-assigned this Feb 14, 2023
@armfazh armfazh added the new feature New functionality or module label Feb 14, 2023
cipher/ascon/ascon.go Outdated Show resolved Hide resolved
@armfazh armfazh merged commit a2a80ed into cloudflare:main Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New functionality or module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants