Class Ed448SignatureContext

All Implemented Interfaces:
Closeable, AutoCloseable, CryptoContext, SignatureContext, TagEngine<Signature>

public final class Ed448SignatureContext extends CommonEdDSASignatureContext
Signature context for Ed448 with a fixed 114-byte tag length.

This class binds the Ed448 algorithm to SignatureContext via CommonEdDSASignatureContext. Internally it configures a JCA Signature with the name "Ed448" and delegates all streaming and verification behavior to the common adapter.

Algorithm characteristics

Usage

One-shot API


// Sign
PrivateKey priv = ...;
SignatureContext signer =
    new Ed448SignatureContext(CryptoAlgorithms.require("Ed448"), priv);
signer.update(message);
byte[] sig = signer.sign();

// Verify
PublicKey pub = ...;
SignatureContext verifier =
    new Ed448SignatureContext(CryptoAlgorithms.require("Ed448"), pub);
verifier.update(message);
boolean ok = verifier.verify(sig);

Streaming pipeline (wrap)


// SIGN mode: body bytes followed by 114-byte signature trailer
try (SignatureContext ctx =
         new Ed448SignatureContext(CryptoAlgorithms.require("Ed448"), priv);
     InputStream in = ctx.wrap(upstream)) {
    in.transferTo(out);
}

// VERIFY mode: supply expected signature; verification occurs at EOF
try (SignatureContext ctx =
         new Ed448SignatureContext(CryptoAlgorithms.require("Ed448"), pub)) {
    ctx.setExpectedTag(expectedSig);
    try (InputStream in = ctx.wrap(bodyWithoutTrailer)) {
        in.transferTo(java.io.OutputStream.nullOutputStream());
    }
}

Thread-safety

Instances are stateful and not thread-safe. Use one context per signing or verification operation, and call wrap(...) at most once per instance.

Since:
1.0