Navigation Menu

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

Add HPKE benchmarks #434

Merged
merged 1 commit into from May 1, 2023
Merged

Add HPKE benchmarks #434

merged 1 commit into from May 1, 2023

Conversation

chris-wood
Copy link
Contributor

@chris-wood chris-wood commented May 1, 2023

These benchmarks let one quickly compare the cost difference between two different HPKE ciphersuites (KEM, KDF, AEAD).

Here's a sample of the output when running the benchmarks (go test -bench=.) in the HPKE directory:

✗ go test -bench=.
goos: darwin
goarch: arm64
pkg: github.com/cloudflare/circl/hpke
BenchmarkHpkeRoundTrip/SetupSender-0020-0001-0001-10         	   18325	     65444 ns/op
BenchmarkHpkeRoundTrip/SetupReceiver-0020-0001-0001-10       	   28868	     41394 ns/op
BenchmarkHpkeRoundTrip/Encrypt-0020-0001-0001-10             	14436075	        84.96 ns/op
BenchmarkHpkeRoundTrip/Decrypt-0020-0001-0001-10             	14667714	        83.58 ns/op
BenchmarkHpkeRoundTrip/SetupSender-0030-0001-0001-10         	   13032	     91840 ns/op
BenchmarkHpkeRoundTrip/SetupReceiver-0030-0001-0001-10       	   15948	     75430 ns/op
BenchmarkHpkeRoundTrip/Encrypt-0030-0001-0001-10             	14285422	        83.86 ns/op
BenchmarkHpkeRoundTrip/Decrypt-0030-0001-0001-10             	14927398	        83.00 ns/op
PASS
ok  	github.com/cloudflare/circl/hpke	16.127s

These benchmarks let one quickly compare the cost difference between two different
HPKE ciphersuites (KEM, KDF, AEAD).
Copy link
Member

@bwesterb bwesterb left a comment

Choose a reason for hiding this comment

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

Bit ad hoc, but fine by me.

@chris-wood
Copy link
Contributor Author

Bit ad hoc, but fine by me.

Is there a better approach we should take?

@bwesterb bwesterb merged commit 4002baf into main May 1, 2023
10 checks passed
@bwesterb bwesterb deleted the caw/hpke-benchmarks branch May 1, 2023 19:41
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

3 participants