Last active
September 26, 2016 08:29
-
-
Save dignifiedquire/b2e211605e0e5c58dfb221f7a9307aac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This should be valid | |
// according to https://tools.ietf.org/html/rfc3447#appendix-A.1.2 | |
const RSAPrivateKey = asn1.define('RSAPrivateKey', function () { | |
this.seq().obj( | |
this.key('version').int(), | |
this.key('modulus').int(), | |
this.key('publicExponent').int(), | |
this.key('privateExponent').int(), | |
this.key('prime1').int(), | |
this.key('prime2').int(), | |
this.key('exponent1').int(), | |
this.key('exponent2').int(), | |
this.key('coefficient').int(), | |
this.key('otherPrimeInfos').use(OtherPrimeInfos) | |
) | |
}) | |
const OtherPrimeInfos = asn1.define('OtherPrimeInfos', function () { | |
this.seq().obj( | |
this.key('prime').int(), | |
this.key('exponent').int(), | |
this.key('coefficient').int() | |
) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment