| Constructor and Description |
|---|
ECCSISigner(ECPoint kpak,
X9ECParameters params,
Digest digest,
byte[] id)
Constructs an ECCSI signer/verifier with KMS Public Authentication Key and user identity.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
generateSignature()
Generates an ECCSI signature according to RFC 6507 Section 5.2.1.
|
void |
init(boolean forSigning,
CipherParameters param)
Initializes the signer for either signature generation or verification.
|
void |
reset()
Resets the signer/verifier state and performs initial computations:
- For signing: Validates KPAK consistency (RFC 6507 Section 5.1.2)
- For verification: Computes Y = HS·PVT + KPAK
Also computes HS = hash(G || KPAK || ID || PVT) as per RFC 6507 Section 5.1.1
|
void |
update(byte b)
update the internal digest with the byte b
|
void |
update(byte[] in,
int off,
int len)
update the internal digest with the byte array in
|
boolean |
verifySignature(byte[] signature)
Verifies an ECCSI signature according to RFC 6507 Section 5.2.2.
|
public ECCSISigner(ECPoint kpak, X9ECParameters params, Digest digest, byte[] id)
kpak - KMS Public Authentication Key (KPAK) from RFC 6507 Section 2id - User identity byte array formattedpublic void init(boolean forSigning,
CipherParameters param)
init in interface SignerforSigning - true for signing, false for verificationparam - Key parameters:
- For signing: ParametersWithRandom containing ECCSIPrivateKeyParameters
- For verification: ECCSIPublicKeyParametersjava.lang.IllegalArgumentException - if invalid parameters are providedpublic void update(byte b)
Signerpublic void update(byte[] in,
int off,
int len)
Signerpublic byte[] generateSignature()
throws CryptoException,
DataLengthException
generateSignature in interface SignerCryptoException - if cryptographic operations failDataLengthException - if input data is invalidjava.lang.IllegalArgumentException - if invalid SSK or j parameter is detectedpublic boolean verifySignature(byte[] signature)
verifySignature in interface Signersignature - Signature to verify (r || s || PVT)java.lang.IllegalArgumentException - if signature format is invalidpublic void reset()