National Ukrainian standard of digital signature based on elliptic curves (DSTU 4145-2002).
| Modifier and Type | Field and Description |
|---|---|
| private ECKeyParameters | |
| private static final BigInteger | |
| private SecureRandom |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected ECMultiplier | |
| private static BigInteger | |
| private static BigInteger | generateRandomInteger(BigInteger n, SecureRandom random)
Generates random integer such, than its bit length is less than that of n |
| public BigInteger[] | generateSignature(byte[]
the message to be signed. message)Implements org. sign the passed in message (usually the output of a hash function). |
| public BigInteger | getOrder()
Implements org. Get the order of the group that the r, s values in signatures belong to. |
| private static ECFieldElement | |
| public void | init(boolean
true if we are generating a signature, false
otherwise. forSigning, CipherParameters key parameters for signature generation. param)Implements org. initialise the signer for signature generation or signature verification. |
| private static BigInteger | |
| public boolean | verifySignature(byte[]
the message that was supposed to have been signed. message, BigInteger the r signature value. r, BigInteger the s signature value. s)Implements org. verify the message message against the signature values r and s. |
| key | back to summary |
|---|---|
| private ECKeyParameters key | |
| ONE | back to summary |
|---|---|
| private static final BigInteger ONE | |
| random | back to summary |
|---|---|
| private SecureRandom random | |
| DSTU4145Signer | back to summary |
|---|---|
| public DSTU4145Signer() | |
| createBasePointMultiplier | back to summary |
|---|---|
| protected ECMultiplier createBasePointMultiplier() | |
| fieldElement2Integer | back to summary |
|---|---|
| private static BigInteger fieldElement2Integer(BigInteger n, ECFieldElement fe) | |
| generateRandomInteger | back to summary |
|---|---|
| private static BigInteger generateRandomInteger(BigInteger n, SecureRandom random) Generates random integer such, than its bit length is less than that of n | |
| generateSignature | back to summary |
|---|---|
| public BigInteger[] generateSignature(byte[] message) Implements org. Doc from org. sign the passed in message (usually the output of a hash function).
| |
| getOrder | back to summary |
|---|---|
| public BigInteger getOrder() Implements org. Doc from org. Get the order of the group that the r, s values in signatures belong to. | |
| hash2FieldElement | back to summary |
|---|---|
| private static ECFieldElement hash2FieldElement(ECCurve curve, byte[] hash) | |
| init | back to summary |
|---|---|
| public void init(boolean forSigning, CipherParameters param) Implements org. Doc from org. initialise the signer for signature generation or signature verification.
| |
| truncate | back to summary |
|---|---|
| private static BigInteger truncate(BigInteger x, int bitLength) | |
| verifySignature | back to summary |
|---|---|
| public boolean verifySignature(byte[] message, BigInteger r, BigInteger s) Implements org. Doc from org. verify the message message against the signature values r and s.
| |