Skip to content

Commit

Permalink
8.0.18 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kjur committed Jun 20, 2020
1 parent 861ab27 commit 6087412
Show file tree
Hide file tree
Showing 18 changed files with 254 additions and 165 deletions.
11 changes: 11 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@

ChangeLog for jsrsasign

RSA decryption and RSA signature validation maleability fix
* Changes from 8.0.17 to 8.0.18
- ext/rsa2.js
- RSADecrypt fixed for zero prepending maleability (#???)
- RSADecryptOAEP fixed for zero prepending maleability
- src/rsasign.js
- verifyWithMessageHash fixed for zero prepending maleability
- test
- qunit-do-crypto-cipher.html: some test case added for above

* Changes from 8.0.16 to 8.0.17
- src/rsasign.js
- verifyWithMessageHashPSS fixed for prepending zeros maleability (#438)
Expand Down Expand Up @@ -102,6 +112,7 @@ SHA384/512withECDSA wrong signature fix and add some curves support
- ext/ec.js
- mitigate Minerva timing attack in ECPointFp.multiply method
   https://minerva.crocs.fi.muni.cz/
https://www.npmjs.com/advisories/1505
- test/qunit-do-crypto-ecdsa.html
- testcase fix
- sample_node/tsr2certs added
Expand Down
2 changes: 1 addition & 1 deletion api/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ <h2><a href="symbols/src/rsasign-1.2.js.html">rsasign-1.2.js</a></h2>


<dt class="heading">Version:</dt>
<dd>jsrsasign 8.0.17 rsasign 1.3.2 (2020-Jun-19)</dd>
<dd>jsrsasign 8.0.18 rsasign 1.3.3 (2020-Jun-21)</dd>



Expand Down
268 changes: 136 additions & 132 deletions api/symbols/src/rsasign-1.2.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kjur-jsrsasign",
"version": "8.0.17",
"version": "8.0.18",
"main": "jsrsasign-all-min.js",
"description": "The 'jsrsasign' (RSA-Sign JavaScript Library) is an opensource free cryptography library supporting RSA/RSAPSS/ECDSA/DSA signing/validation, ASN.1, PKCS#1/5/8 private/public key, X.509 certificate, CRL, OCSP, CMS SignedData, TimeStamp, CAdES, JWS and JWT in pure JavaScript.",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion ext/rsa2-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions ext/rsa2.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ function RSADoPrivate(x) {
// Return the PKCS#1 RSA decryption of "ctext".
// "ctext" is an even-length hex string and the output is a plain string.
function RSADecrypt(ctext) {
if (ctext.length != Math.ceil(this.n.bitLength() / 4.0)) {
throw new Error("wrong ctext length");
}

var c = parseBigInt(ctext, 16);
var m = this.doPrivate(c);
if(m == null) return null;
Expand All @@ -244,6 +248,10 @@ function RSADecrypt(ctext) {
// Return the PKCS#1 OAEP RSA decryption of "ctext".
// "ctext" is an even-length hex string and the output is a plain string.
function RSADecryptOAEP(ctext, hash, hashLen) {
if (ctext.length != Math.ceil(this.n.bitLength() / 4.0)) {
throw new Error("wrong ctext length");
}

var c = parseBigInt(ctext, 16);
var m = this.doPrivate(c);
if(m == null) return null;
Expand Down
Loading

0 comments on commit 6087412

Please sign in to comment.