public class EdwardsCurve extends Object implements KeyLengthSupplier
| Modifier and Type | Field and Description |
|---|---|
static EdwardsCurve |
Ed25519 |
static EdwardsCurve |
Ed448 |
static Collection<EdwardsCurve> |
VALUES |
static EdwardsCurve |
X25519 |
static EdwardsCurve |
X448 |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Key key)
Returns
true if the specified key is known to represent a point on the curve, false otherwise. |
static PublicKey |
derivePublic(PrivateKey pk)
Computes the PublicKey associated with the specified Edwards-curve PrivateKey.
|
protected byte[] |
doGetKeyMaterial(Key key)
Parses the ASN.1-encoding of the specified key
|
boolean |
equals(Object obj) |
static EdwardsCurve |
findById(String id) |
static EdwardsCurve |
findByKey(Key key) |
static EdwardsCurve |
forKey(Key key) |
String |
getId() |
String |
getJcaName() |
int |
getKeyBitLength() |
byte[] |
getKeyMaterial(Key key) |
int |
hashCode() |
static boolean |
isEdwards(Key key) |
boolean |
isSignatureCurve()
Returns
true if this curve is used to compute signatures, false if used for key agreement. |
KeyPairBuilder |
keyPair() |
PrivateKey |
toPrivateKey(byte[] d,
Provider provider) |
PublicKey |
toPublicKey(byte[] x,
Provider provider) |
String |
toString() |
public static final EdwardsCurve X25519
public static final EdwardsCurve X448
public static final EdwardsCurve Ed25519
public static final EdwardsCurve Ed448
public static final Collection<EdwardsCurve> VALUES
public int getKeyBitLength()
getKeyBitLength in interface KeyLengthSupplierpublic byte[] getKeyMaterial(Key key)
protected byte[] doGetKeyMaterial(Key key)
key - the Edwards curve keyRuntimeException - if the key's encoded bytes do not reflect a validly ASN.1-encoded edwards keypublic PrivateKey toPrivateKey(byte[] d, Provider provider)
public boolean isSignatureCurve()
true if this curve is used to compute signatures, false if used for key agreement.true if this curve is used to compute signatures, false if used for key agreement.public KeyPairBuilder keyPair()
keyPair in interface KeyPairBuilderSupplierpublic static boolean isEdwards(Key key)
public static PublicKey derivePublic(PrivateKey pk) throws KeyException
pk - the Edwards-curve PrivateKey to inspect.KeyException - if the PrivateKey is not an Edwards-curve key or unable to access the PrivateKey's
material.public static EdwardsCurve findById(String id)
public static EdwardsCurve findByKey(Key key)
public boolean contains(Key key)
true if the specified key is known to represent a point on the curve, false otherwise.key - the key to testtrue if the specified key is known to represent a point on the curve, false otherwise.public static EdwardsCurve forKey(Key key)
public String getId()
getId in interface Identifiablepublic String getJcaName()
Copyright © 2014–2024 jsonwebtoken.io. All rights reserved.