Class EdDSAEngine

Direct Known Subclasses:
RedDSAEngine

public class EdDSAEngine
extends Signature
Signing and verification for EdDSA.

The EdDSA sign and verify algorithms do not interact well with the Java Signature API, as one or more update() methods must be called before sign() or verify(). Using the standard API, this implementation must copy and buffer all data passed in via update().

This implementation offers two ways to avoid this copying, but only if all data to be signed or verified is available in a single byte array.

Option 1:

  1. Call initSign() or initVerify() as usual.
  2. Call setParameter(ONE_SHOT_MODE)
  3. Call update(byte[]) or update(byte[], int, int) exactly once
  4. Call sign() or verify() as usual.
  5. If doing additional one-shot signs or verifies with this object, you must call setParameter(ONE_SHOT_MODE) each time

Option 2:

  1. Call initSign() or initVerify() as usual.
  2. Call one of the signOneShot() or verifyOneShot() methods.
  3. If doing additional one-shot signs or verifies with this object, just call signOneShot() or verifyOneShot() again.
Since:
0.9.15
Author:
str4d