-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into readme-randomness-patch
- Loading branch information
Showing
42 changed files
with
2,121 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule aws-lc
updated
from 057477 to 36e030
33 changes: 33 additions & 0 deletions
33
benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/KeyGenEd.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package com.amazon.corretto.crypto.provider.benchmarks; | ||
|
||
import java.security.KeyPair; | ||
import java.security.KeyPairGenerator; | ||
|
||
import com.amazon.corretto.crypto.provider.AmazonCorrettoCryptoProvider; | ||
import org.openjdk.jmh.annotations.Benchmark; | ||
import org.openjdk.jmh.annotations.Param; | ||
import org.openjdk.jmh.annotations.Scope; | ||
import org.openjdk.jmh.annotations.Setup; | ||
import org.openjdk.jmh.annotations.State; | ||
|
||
@State(Scope.Benchmark) | ||
public class KeyGenEd { | ||
|
||
@Param({AmazonCorrettoCryptoProvider.PROVIDER_NAME, "BC", "SunEC"}) | ||
public String provider; | ||
|
||
private KeyPairGenerator kpg; | ||
|
||
@Setup | ||
public void setup() throws Exception { | ||
BenchmarkUtils.setupProvider(provider); | ||
kpg = KeyPairGenerator.getInstance("Ed25519", provider); | ||
} | ||
|
||
@Benchmark | ||
public KeyPair generate() { | ||
return kpg.generateKeyPair(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/SignatureEd.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package com.amazon.corretto.crypto.provider.benchmarks; | ||
|
||
import com.amazon.corretto.crypto.provider.AmazonCorrettoCryptoProvider; | ||
import org.openjdk.jmh.annotations.Benchmark; | ||
import org.openjdk.jmh.annotations.Param; | ||
import org.openjdk.jmh.annotations.Scope; | ||
import org.openjdk.jmh.annotations.Setup; | ||
import org.openjdk.jmh.annotations.State; | ||
import org.openjdk.jmh.annotations.Fork; | ||
import org.openjdk.jmh.annotations.Threads; | ||
|
||
@State(Scope.Benchmark) | ||
public class SignatureEd extends SignatureBase { | ||
@Param({AmazonCorrettoCryptoProvider.PROVIDER_NAME, "BC", "SunEC"}) | ||
public String provider; | ||
|
||
@Setup | ||
public void setup() throws Exception { | ||
super.setup(provider, "Ed25519", null, "Ed25519", null); | ||
} | ||
|
||
@Benchmark | ||
public byte[] sign() throws Exception { | ||
return super.sign(); | ||
} | ||
|
||
@Benchmark | ||
public boolean verify() throws Exception { | ||
return super.verify(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.