Package software.amazon.awssdk.crt.cal
Class EccKeyPair
- java.lang.Object
-
- software.amazon.awssdk.crt.CrtResource
-
- software.amazon.awssdk.crt.cal.EccKeyPair
-
- All Implemented Interfaces:
AutoCloseable
public final class EccKeyPair extends CrtResource
This class puts an opaque wrapper around aws_ecc_key_pair from aws-c-cal. Currently, it is only intended to be cached and returned to native code by a signing invocation. If there's a compelling reason, we can add accessors and conversions to/from Java's KeyPair.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EccKeyPair.AwsEccCurve
Enum for supported ECC curves Needs to stay in sync with aws_ecc_curve_name-
Nested classes/interfaces inherited from class software.amazon.awssdk.crt.CrtResource
CrtResource.ResourceInstance
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EccKeyPair
newDeriveFromCredentials(Credentials credentials, EccKeyPair.AwsEccCurve curve)
Derives the associated ECC key from a pair of AWS credentials according to the sigv4a ecc key derivation specification.byte[]
signMessage(byte[] message)
Sign a message using the ECC key pair via ECDSA-
Methods inherited from class software.amazon.awssdk.crt.CrtResource
addRef, addReferenceTo, close, collectNativeResource, collectNativeResources, decRef, getNativeHandle, getResourceLogDescription, isNull, logNativeResources, logNativeResources, removeReferenceTo, setDescription, waitForNoResources
-
-
-
-
Method Detail
-
newDeriveFromCredentials
public static EccKeyPair newDeriveFromCredentials(Credentials credentials, EccKeyPair.AwsEccCurve curve)
Derives the associated ECC key from a pair of AWS credentials according to the sigv4a ecc key derivation specification.- Parameters:
credentials
- AWS credentials to derive the associated key forcurve
- ECC curve to use (only P256 is currently supported)- Returns:
- derived ecc key pair associated with the AWS credentials
-
signMessage
public byte[] signMessage(byte[] message)
Sign a message using the ECC key pair via ECDSA- Parameters:
message
- message to sign- Returns:
- the ECDSA signature of the message
-
-