Package org.bouncycastle.math.ec.rfc8032
Class Ed25519
java.lang.Object
org.bouncycastle.math.ec.rfc8032.Ed25519
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract org.bouncycastle.crypto.internal.Digestorg.bouncycastle.crypto.internal.Digeststatic voidgeneratePrivateKey(SecureRandom random, byte[] k) voidgeneratePublicKey(byte[] sk, int skOff, byte[] pk, int pkOff) static voidstatic voidscalarMultBaseYZ(X25519.Friend friend, byte[] k, int kOff, int[] y, int[] z) NOTE: Only for use by X25519voidsign(byte[] sk, int skOff, byte[] ctx, byte[] m, int mOff, int mLen, byte[] sig, int sigOff) voidsign(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] ctx, byte[] m, int mOff, int mLen, byte[] sig, int sigOff) voidsign(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] m, int mOff, int mLen, byte[] sig, int sigOff) voidsign(byte[] sk, int skOff, byte[] m, int mOff, int mLen, byte[] sig, int sigOff) voidsignPrehash(byte[] sk, int skOff, byte[] ctx, byte[] ph, int phOff, byte[] sig, int sigOff) voidsignPrehash(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] ctx, byte[] ph, int phOff, byte[] sig, int sigOff) voidsignPrehash(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] ctx, org.bouncycastle.crypto.internal.Digest ph, byte[] sig, int sigOff) voidsignPrehash(byte[] sk, int skOff, byte[] ctx, org.bouncycastle.crypto.internal.Digest ph, byte[] sig, int sigOff) static booleanvalidatePublicKeyFull(byte[] pk, int pkOff) static booleanvalidatePublicKeyPartial(byte[] pk, int pkOff) booleanverify(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] ctx, byte[] m, int mOff, int mLen) booleanverify(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] m, int mOff, int mLen) booleanverifyPrehash(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] ctx, byte[] ph, int phOff) booleanverifyPrehash(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] ctx, org.bouncycastle.crypto.internal.Digest ph)
-
Field Details
-
PREHASH_SIZE
public static final int PREHASH_SIZE- See Also:
-
PUBLIC_KEY_SIZE
public static final int PUBLIC_KEY_SIZE- See Also:
-
SECRET_KEY_SIZE
public static final int SECRET_KEY_SIZE- See Also:
-
SIGNATURE_SIZE
public static final int SIGNATURE_SIZE- See Also:
-
-
Constructor Details
-
Ed25519
public Ed25519()
-
-
Method Details
-
createPrehash
public org.bouncycastle.crypto.internal.Digest createPrehash() -
generatePrivateKey
-
generatePublicKey
public void generatePublicKey(byte[] sk, int skOff, byte[] pk, int pkOff) -
precompute
public static void precompute() -
scalarMultBaseYZ
NOTE: Only for use by X25519 -
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, org.bouncycastle.crypto.internal.Digest ph, byte[] sig, int sigOff) -
signPrehash
public void signPrehash(byte[] sk, int skOff, byte[] pk, int pkOff, byte[] ctx, org.bouncycastle.crypto.internal.Digest ph, byte[] sig, int sigOff) -
validatePublicKeyFull
public static boolean validatePublicKeyFull(byte[] pk, int pkOff) -
validatePublicKeyPartial
public static boolean validatePublicKeyPartial(byte[] pk, int pkOff) -
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, org.bouncycastle.crypto.internal.Digest ph) -
createDigest
protected abstract org.bouncycastle.crypto.internal.Digest createDigest()
-