public static interface Sign.Native
| Modifier and Type | Method and Description |
|---|---|
boolean |
convertPublicKeyEd25519ToCurve25519(byte[] curve,
byte[] ed)
Converts a public ed25519 key to a public curve25519 key.
|
boolean |
convertSecretKeyEd25519ToCurve25519(byte[] curve,
byte[] ed)
Converts a secret ed25519 key to a secret curve25519 key.
|
boolean |
cryptoSign(byte[] signedMessage,
byte[] message,
long messageLen,
byte[] secretKey)
Sign a message.
|
boolean |
cryptoSignDetached(byte[] signature,
byte[] message,
long messageLen,
byte[] secretKey)
Returns a signature for a message.
|
boolean |
cryptoSignEd25519SkToPk(byte[] publicKey,
byte[] ed)
Extracts the ed25519 public key from a secret ed25519 key.
|
boolean |
cryptoSignEd25519SkToSeed(byte[] seed,
byte[] ed)
Extracts the seed value from a secret ed25519 key.
|
boolean |
cryptoSignFinalCreate(Sign.StateCryptoSign state,
byte[] sig,
com.sun.jna.Pointer sigLen,
byte[] sk)
This function computes a signature for the previously supplied message,
using the secret key sk and puts it into sig.
|
boolean |
cryptoSignFinalVerify(Sign.StateCryptoSign state,
byte[] sig,
byte[] pk)
Verifies that sig is a valid signature for the message whose
content has been previously supplied using crypto_update(),
using the public key pk.
|
boolean |
cryptoSignInit(Sign.StateCryptoSign state)
Useful for signing a multi-part message (Ed25519ph).
|
boolean |
cryptoSignKeypair(byte[] publicKey,
byte[] secretKey)
Generate a signing keypair (ed25519).
|
boolean |
cryptoSignOpen(byte[] message,
byte[] signedMessage,
long signedMessageLen,
byte[] publicKey)
Verify a signed message.
|
boolean |
cryptoSignSeedKeypair(byte[] publicKey,
byte[] secretKey,
byte[] seed)
Deterministically generate a public and secret key.
|
boolean |
cryptoSignUpdate(Sign.StateCryptoSign state,
byte[] chunk,
long chunkLength)
Add a new chunk of length chunkLen bytes to the
message that will eventually be signed.
|
boolean |
cryptoSignVerifyDetached(byte[] signature,
byte[] message,
int messageLen,
byte[] publicKey)
Verifies that
signature is valid for the
message. |
boolean cryptoSignInit(Sign.StateCryptoSign state)
state - The state.boolean cryptoSignUpdate(Sign.StateCryptoSign state, byte[] chunk, long chunkLength)
state - The state.chunk - A part of the long message.chunkLength - Message length.boolean cryptoSignFinalCreate(Sign.StateCryptoSign state, byte[] sig, com.sun.jna.Pointer sigLen, byte[] sk)
state - The state.sig - Resultant signature.sigLen - Signature length.sk - Secret key.boolean cryptoSignFinalVerify(Sign.StateCryptoSign state, byte[] sig, byte[] pk)
state - The state.sig - Resultant signature.pk - Secret key.boolean cryptoSignKeypair(byte[] publicKey,
byte[] secretKey)
publicKey - Public key.secretKey - Secret key.boolean cryptoSignSeedKeypair(byte[] publicKey,
byte[] secretKey,
byte[] seed)
publicKey - Public key.secretKey - Secret key.seed - The seed used to generate the keys.boolean cryptoSign(byte[] signedMessage,
byte[] message,
long messageLen,
byte[] secretKey)
signedMessage - Signed message will be placed here.
It is Sign.BYTES + messageLen
long.message - The message.messageLen - The message length.secretKey - The secret key.boolean cryptoSignOpen(byte[] message,
byte[] signedMessage,
long signedMessageLen,
byte[] publicKey)
message - The message will be placed in here.signedMessage - The signed message.signedMessageLen - The signed message length.publicKey - Public key.boolean cryptoSignDetached(byte[] signature,
byte[] message,
long messageLen,
byte[] secretKey)
cryptoSign(byte[], byte[], long, byte[]) for that.signature - The signature will be added to this byte array.message - The message to sign.messageLen - The message length.secretKey - The secret key.boolean cryptoSignVerifyDetached(byte[] signature,
byte[] message,
int messageLen,
byte[] publicKey)
signature is valid for the
message.signature - The signature.message - The message.messageLen - The message length.publicKey - The public key that signed the message.cryptoSignDetached(byte[], byte[], long, byte[])boolean convertPublicKeyEd25519ToCurve25519(byte[] curve,
byte[] ed)
curve - The array in which the generated key will be placed.ed - The public key in ed25519.boolean convertSecretKeyEd25519ToCurve25519(byte[] curve,
byte[] ed)
curve - The array in which the generated key will be placed.ed - The secret key in ed25519.boolean cryptoSignEd25519SkToSeed(byte[] seed,
byte[] ed)
seed - The array in which the seed value will be placed. Must be Sign.ED25519_SEEDBYTES bytes long.ed - The secret key in ed25519.boolean cryptoSignEd25519SkToPk(byte[] publicKey,
byte[] ed)
publicKey - The array in which the public key will be placed. Must be Sign.PUBLICKEYBYTES bytes long.ed - The secret key in ed25519.