Package org.bouncycastle.math.ec.rfc8032
Class Ed25519
- java.lang.Object
-
- org.bouncycastle.math.ec.rfc8032.Ed25519
-
public abstract class Ed25519 extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Ed25519.Algorithm
-
Field Summary
Fields Modifier and Type Field Description static int
PREHASH_SIZE
static int
PUBLIC_KEY_SIZE
static int
SECRET_KEY_SIZE
static int
SIGNATURE_SIZE
-
Constructor Summary
Constructors Constructor Description Ed25519()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Digest
createDigest()
Digest
createPrehash()
void
generatePrivateKey(java.security.SecureRandom random, byte[] k)
void
generatePublicKey(byte[] sk, int skOff, byte[] pk, int pkOff)
static void
precompute()
void
sign(byte[] sk, int skOff, byte[] ctx, byte[] m, int mOff, int mLen, byte[] sig, int sigOff)
void
sign(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] ctx, byte[] m, int mOff, int mLen, byte[] sig, int sigOff)
void
sign(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] m, int mOff, int mLen, byte[] sig, int sigOff)
void
sign(byte[] sk, int skOff, byte[] m, int mOff, int mLen, byte[] sig, int sigOff)
void
signPrehash(byte[] sk, int skOff, byte[] ctx, byte[] ph, int phOff, byte[] sig, int sigOff)
void
signPrehash(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] ctx, byte[] ph, int phOff, byte[] sig, int sigOff)
void
signPrehash(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] ctx, Digest ph, byte[] sig, int sigOff)
void
signPrehash(byte[] sk, int skOff, byte[] ctx, Digest ph, byte[] sig, int sigOff)
boolean
verify(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] ctx, byte[] m, int mOff, int mLen)
boolean
verify(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] m, int mOff, int mLen)
boolean
verifyPrehash(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] ctx, byte[] ph, int phOff)
boolean
verifyPrehash(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] ctx, Digest ph)
-
-
-
Field Detail
-
PREHASH_SIZE
public static final int PREHASH_SIZE
- See Also:
- Constant Field Values
-
PUBLIC_KEY_SIZE
public static final int PUBLIC_KEY_SIZE
- See Also:
- Constant Field Values
-
SECRET_KEY_SIZE
public static final int SECRET_KEY_SIZE
- See Also:
- Constant Field Values
-
SIGNATURE_SIZE
public static final int SIGNATURE_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
createPrehash
public Digest createPrehash()
-
generatePrivateKey
public void generatePrivateKey(java.security.SecureRandom random, byte[] k)
-
generatePublicKey
public void generatePublicKey(byte[] sk, int skOff, byte[] pk, int pkOff)
-
precompute
public static void precompute()
-
sign
public void sign(byte[] sk, int skOff, byte[] m, int mOff, int mLen, byte[] sig, int sigOff)
-
sign
public void sign(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] m, int mOff, int mLen, byte[] sig, int sigOff)
-
sign
public void sign(byte[] sk, int skOff, byte[] ctx, byte[] m, int mOff, int mLen, byte[] sig, int sigOff)
-
sign
public void sign(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] ctx, byte[] m, int mOff, int mLen, byte[] sig, int sigOff)
-
signPrehash
public void signPrehash(byte[] sk, int skOff, byte[] ctx, byte[] ph, int phOff, byte[] sig, int sigOff)
-
signPrehash
public void signPrehash(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] ctx, byte[] ph, int phOff, byte[] sig, int sigOff)
-
signPrehash
public void signPrehash(byte[] sk, int skOff, byte[] ctx, Digest ph, byte[] sig, int sigOff)
-
signPrehash
public void signPrehash(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] ctx, Digest ph, byte[] sig, int sigOff)
-
verify
public boolean verify(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] m, int mOff, int mLen)
-
verify
public boolean verify(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] ctx, byte[] m, int mOff, int mLen)
-
verifyPrehash
public boolean verifyPrehash(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] ctx, byte[] ph, int phOff)
-
verifyPrehash
public boolean verifyPrehash(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] ctx, Digest ph)
-
createDigest
protected abstract Digest createDigest()
-
-