Comments (2)
Hi @madaster97 , I got the issue.
The n of wrong form has leading zero for two's supplement.
AKLMe2qRcXdeqt...
=>
00a2cc7b6a9171775... (in hexadecimal)
osx7apFxd16q1gSIDkK...
=>
a2cc7b6a9171775...
I'll fix the issue.
from jsrsasign.
For reference, here's the script I used to convert the "wrong" form of the public key into the right form, using JOSE v4.11.1:
const jose = require('jose');
(async () => {
const key = await jose.importJWK({
"kty": "RSA",
"e": "AQAB",
"use": "sig",
"kid": "jwk-rsa",
"n": "AKLMe2qRcXdeqtYEiA5Cv64eA3TOI_eoZbwoyl20E-skY4gCExE3BBugEdyFaKiopGVczSIQJwlzI2-mJYwMBz8iDsAx913E2it84LjTELP-9D5F1N9R50eH76raBq0SxfIx-vL0mVFX7o9A6032lnwMLI3Dhj2HxGD7ZVvaj7l2mypPA2zad6JkcS6XSugI-lXxWtTHln4FxtvG7kjEpBQtjZXcsJgU-wsxdxPRIxCtm0aznSogjHgrtSuD4nsN6OAiWz154JUCq0WcB6VBMR-LaH68iSWpAjyv4sMvEVXkOOr-vqXMAhsYedKWF2496bHUhDtGMqILqprqbed3Rz0="
}, "RS256");
const pub = await jose.exportSPKI(key);
console.log(pub);
const jwkPub = await jose.exportJWK(key);
console.log(JSON.stringify(jwkPub,null,2));
})();
from jsrsasign.
Related Issues (20)
- KJUR.jws.JWS.sign is very slow. HOT 3
- Property 'jws' does not exist on type 'typeof jsrsasign' HOT 3
- jsrsasign vulnerable to the Marvin Attack HOT 3
- crypto-js PBKDF2 vulnerability HOT 2
- Wechat mini program SHA1withRSA signature function is very slow HOT 1
- Uncaught Syntax Error HOT 1
- Can't verify valid ECDSA singature HOT 7
- OpenSSL "Verification failure" with jsrsasign Signature HOT 1
- KEYUTIL.getKey() fails because KJUR.crypto.Cipher is undefined HOT 3
- Generating a CSR with RSA as algorithm does not work with sample script HOT 1
- The CSR API sample is not working. Throws TypeError: rs.KJUR.asn1.x509.CertificationRequest is not a constructor at Object.<anonymous> HOT 2
- Will new version support RSA and RSAOAEP encryption? HOT 1
- X509 getExtBasicConstraints() not outputting the CA JSON key and value HOT 10
- X509 method getExtKeyUsage() not returning the critical flag value HOT 6
- [Question] Does this package work in Expo (React Native) applications? HOT 1
- verifyJWT error TypeError: Cannot read property 'alg' of undefined HOT 6
- RSAOAEP256 is gone, howto en/decrypt async? HOT 6
- Started to bugs, version 11.0. HOT 1
- The extended key Usage values for IP Sec are not supported HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsrsasign.