| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private AsymmetricBlockCipher | |
| private Digest | |
| private boolean | |
| private int | |
| private byte[] | |
| private int | |
| private byte[] | |
| private byte[] | |
| private byte[] | |
| private int | |
| public static final int |
| Access | Constructor and Description |
|---|---|
| public | BaseISO9796d2Signer(AsymmetricBlockCipher
base cipher to use for signature creation/verification cipher, Digest digest to use. digest, boolean whether or not the trailer is implicit or gives the hash. implicit)Generate a signer with either implicit or explicit trailers for ISO9796-2. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public byte[] | generateSignature()
Implements org. |
| public byte[] | Returns: the full/partial recoveredMessage message.Implements org. |
| public boolean | Returns: true on full message recovery, false otherwise.Implements org. |
| public void | init(boolean
true if for signing, false otherwise forSigning, CipherParameters necessary parameters. param)Implements org. |
| private boolean | |
| public void | |
| private boolean | |
| public void | update(byte b)
Implements org. |
| public void | update(byte[] in, int off, int len)
Implements org. |
| public void | updateWithRecoveredMessage(byte[]
the signature that we are in the process of verifying. signature)Implements org. |
| public boolean | verifySignature(byte[] signature)
Implements org. |
| block | back to summary |
|---|---|
| private byte[] block | |
| cipher | back to summary |
|---|---|
| private AsymmetricBlockCipher cipher | |
| digest | back to summary |
|---|---|
| private Digest digest | |
| fullMessage | back to summary |
|---|---|
| private boolean fullMessage | |
| keyBits | back to summary |
|---|---|
| private int keyBits | |
| mBuf | back to summary |
|---|---|
| private byte[] mBuf | |
| messageLength | back to summary |
|---|---|
| private int messageLength | |
| preBlock | back to summary |
|---|---|
| private byte[] preBlock | |
| preSig | back to summary |
|---|---|
| private byte[] preSig | |
| recoveredMessage | back to summary |
|---|---|
| private byte[] recoveredMessage | |
| trailer | back to summary |
|---|---|
| private int trailer | |
| TRAILER_IMPLICIT | back to summary |
|---|---|
| public static final int TRAILER_IMPLICIT | |
| BaseISO9796d2Signer | back to summary |
|---|---|
| public BaseISO9796d2Signer(AsymmetricBlockCipher cipher, Digest digest, boolean implicit) Generate a signer with either implicit or explicit trailers for ISO9796-2.
| |
| clearBlock | back to summary |
|---|---|
| private void clearBlock(byte[] block) clear possible sensitive data | |
| generateSignature | back to summary |
|---|---|
| public byte[] generateSignature() throws CryptoException Implements org. generate a signature for the loaded message using the key we were initialised with. | |
| getRecoveredMessage | back to summary |
|---|---|
| public byte[] getRecoveredMessage() Implements org. Return a reference to the recoveredMessage message, either as it was added to a just generated signature, or extracted from a verified one.
| |
| hasFullMessage | back to summary |
|---|---|
| public boolean hasFullMessage() Implements org. Return true if the full message was recoveredMessage.
| |
| init | back to summary |
|---|---|
| public void init(boolean forSigning, CipherParameters param) Implements org. Doc from org. Initialise the signer for signing or verification.
| |
| isSameAs | back to summary |
|---|---|
| private boolean isSameAs(byte[] a, byte[] b) compare two byte arrays - constant time | |
| reset | back to summary |
|---|---|
| public void reset() Implements org. reset the internal state | |
| returnFalse | back to summary |
|---|---|
| private boolean returnFalse(byte[] block) | |
| update | back to summary |
|---|---|
| public void update(byte b) Implements org. update the internal digest with the byte b | |
| update | back to summary |
|---|---|
| public void update(byte[] in, int off, int len) Implements org. update the internal digest with the byte array in | |
| updateWithRecoveredMessage | back to summary |
|---|---|
| public void updateWithRecoveredMessage(byte[] signature) throws InvalidCipherTextException Implements org. Doc from org. Perform an update with the recovered message before adding any other data. This must be the first update method called, and calling it will result in the signer assuming that further calls to update will include message content past what is recoverable.
| |
| verifySignature | back to summary |
|---|---|
| public boolean verifySignature(byte[] signature) Implements org. return true if the signature represents a ISO9796-2 signature for the passed in message. | |