An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

Digital Signature



Stars
Total Downloads
Latest Stable Version
License

## 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