https://github.com/n1ghtf1re/digital-signature
Digital signature using RSA algorithm
https://github.com/n1ghtf1re/digital-signature
cryptography digital-signature digital-signatures rsa rsa-algorithm rsa-signature sha1 sha1-hash sha256 sha256-hash
Last synced: 3 months ago
JSON representation
Digital signature using RSA algorithm
- Host: GitHub
- URL: https://github.com/n1ghtf1re/digital-signature
- Owner: N1ghtF1re
- License: mit
- Created: 2018-11-11T08:46:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-22T16:12:34.000Z (over 6 years ago)
- Last Synced: 2025-02-19T05:46:17.076Z (4 months ago)
- Topics: cryptography, digital-signature, digital-signatures, rsa, rsa-algorithm, rsa-signature, sha1, sha1-hash, sha256, sha256-hash
- Language: Java
- Size: 38.1 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Digital Signature
## About the library
The library contains contains RSA digital signature algorithm## Class RSASignature:
### Constructors:
- **RSASignature(BigInteger p, BigInteger q, BigInteger privateexp, CryptoHash hashFunction)**
- p,q - prime number
- privateexp - private exponent, 1 < p < (p-1)(q-1), gcd(privateexp, (p-1)(q-1)) = 1,
- hashFunction - The object to get the hash function (Must implement the interface CryptoHash)
### Methods:
- **BigInteger sign(byte[] message)** - Sign an array of bytes
- return signature = hash(message)^d mod r- static boolean checkSignature(RSAPublicKey key, BigInteger signature, byte[] message, CryptoHash hashFunction) - Verifies signature validity