|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bouncycastle.jcajce.spec.EdDSAParameterSpec
ParameterSpec for EdDSA signature algorithms.
As well as selecting the curve (for key pair generation) the spec can carry the RFC 8032 instance selectors used when signing or verifying: the prehash flag (Ed25519ph / Ed448ph) and an optional context (Ed25519ctx, or the context permitted by Ed448 / the prehash variants). A context, when supplied, must be at most 255 bytes (RFC 8032 sec. 5.1 / 5.2). When neither prehash nor a non-empty context is supplied the spec selects the pure variant, matching BC's historical behaviour for the curve-name-only constructor.
| Field Summary | |
static java.lang.String |
Ed25519
|
static java.lang.String |
Ed448
|
| Constructor Summary | |
EdDSAParameterSpec(java.lang.String curveName)
Base constructor - pure variant, no context. |
|
EdDSAParameterSpec(java.lang.String curveName,
boolean prehash)
Constructor specifying the prehash (Ed25519ph / Ed448ph) selector. |
|
EdDSAParameterSpec(java.lang.String curveName,
boolean prehash,
byte[] context)
Constructor specifying the prehash selector and a context. |
|
| Method Summary | |
byte[] |
getContext()
Return the RFC 8032 context, or null if none was specified. |
java.lang.String |
getCurveName()
Return the curve name specified by this parameterSpec. |
boolean |
isPrehash()
Return whether the prehash (ph) variant is selected. |
java.lang.String |
toString()
Return the RFC 8032 name of the variant these parameters select (Ed25519, Ed25519ctx, Ed25519ph, Ed448 or Ed448ph), followed by the context length when there is a context, for example "Ed448ph [context=5 bytes]". |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String Ed25519
public static final java.lang.String Ed448
| Constructor Detail |
public EdDSAParameterSpec(java.lang.String curveName)
curveName - name of the curve to specify.
public EdDSAParameterSpec(java.lang.String curveName,
boolean prehash)
curveName - name of the curve to specify.prehash - true to select the prehash (ph) variant.
public EdDSAParameterSpec(java.lang.String curveName,
boolean prehash,
byte[] context)
curveName - name of the curve to specify.prehash - true to select the prehash (ph) variant.context - the RFC 8032 context (at most 255 bytes), or null for none.| Method Detail |
public java.lang.String getCurveName()
public boolean isPrehash()
public byte[] getContext()
public java.lang.String toString()
|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||