This solution stands of the shoulders of a number of people who provided reference
implementations and ideas. We wish to express appreciation for their published work:
- RSA key utility by Kenju Urushima https://github.com/kjur/jsrsasign
- ASN.1 parser by Lapo Luchini https://github.com/lapo-luchini/asn1js
- BIGINT math by Tom Hu http://www-cs-students.stanford.edu/~tjw
- SHA512 message digest by Michael Tritton https://github.com/trittimo/SHA512
- A private key file holds secret prime numbers
- An ASN key reader handles the binary file format
- The message to sign consists of a JSON Web Token
- Then a SHA512 hash reduces the message to a big integer
- Finally the RSA signer executes the modPow signature math
Blob signature = CryptoRsaSha512.sign(message, privateKey);
While we can't provide ad-hoc support for this code, please contact us with your company
name and address if you need a warranty for its use and we will assist: www.streamscript.com/contact