java.lang.Object
net.i2p.crypto.eddsa.spec.EdDSAPublicKeySpec
- All Implemented Interfaces:
KeySpec
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GroupElementThe public key's point.private GroupElementThe negated point, computed on first use.private final EdDSAParameterSpecThe curve parameters the key belongs to.Constructor Summary
ConstructorsConstructorDescriptionEdDSAPublicKeySpec(byte[] pk, EdDSAParameterSpec spec) Create a new EdDSA public key specification from a byte array.EdDSAPublicKeySpec(GroupElement aPoint, EdDSAParameterSpec spec) Public key specification from a group element.Method Summary
All MethodsModifier and TypeMethodDescriptiongetA()Returns the public key group element.Returns the negation of the public key group element.Returns the parameter specification for this key.
Field Details
A
The public key's point.Aneg
The negated point, computed on first use.spec
The curve parameters the key belongs to.
Constructor Details
EdDSAPublicKeySpec
Create a new EdDSA public key specification from a byte array.- Parameters:
pk- the public keyspec- the parameter specification for this key- Throws:
IllegalArgumentException- if key length is wrong
EdDSAPublicKeySpec
Public key specification from a group element.- Parameters:
aPoint- The public key group element.spec- The parameter specification for this key.
Method Details
getA
getNegativeA
Returns the negation of the public key group element. The result is lazily computed and cached.- Returns:
- the negated public key group element
getParams
Returns the parameter specification for this key.- Returns:
- the parameter specification