Skip to content

Commit

Permalink
5.0.14 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kjur committed Aug 11, 2016
1 parent ac3dd27 commit 0eba50a
Show file tree
Hide file tree
Showing 21 changed files with 1,694 additions and 1,122 deletions.
20 changes: 20 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@

ChangeLog for jsrsasign

* Changes between 5.0.13 to 5.0.14
- keyutil 1.0.12 to 1.0.13
- KEYUTIL.getJWKFromKey() method added to get
RFC 7517 JSON Web Key(JWK) object from RSAKey or
KJUR.crypto.ECDSA public/private key object.
- KEYUTIL.generateKeypair()
do also setPublicKeyHex for EC private key in
as aligned to PEM private key
loading.
- KEYUTIL.getKey(JWK_EC_PRV)
made change to set public x y too.
- ecdsa-modified 1.0.4 to 1.0.5
- getPublicKeyXYHex() method added
- getShortNISTPCurveName() method added
- npm
- missed to export KJUR.lang now fixed
- sample_node/genjwk added to generate keypair and save as JWK
- tool_certview.html
- loading script fix

* Changes between 5.0.12 to 5.0.13
- base64x.js
- KJUR.lang.String class added and its some static
Expand Down
4 changes: 2 additions & 2 deletions api/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ <h2><a href="symbols/src/ecdsa-modified-1.0.js.html">ecdsa-modified-1.0.js</a></


<dt class="heading">Version:</dt>
<dd>1.0.4 (2013-Oct-06)</dd>
<dd>1.0.5 (2016-Aug-11)</dd>



Expand Down Expand Up @@ -689,7 +689,7 @@ <h2><a href="symbols/src/keyutil-1.0.js.html">keyutil-1.0.js</a></h2>


<dt class="heading">Version:</dt>
<dd>keyutil 1.0.12 (2015-Oct-14)</dd>
<dd>keyutil 1.0.13 (2016-Aug-11)</dd>



Expand Down
75 changes: 75 additions & 0 deletions api/symbols/KEYUTIL.html
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,17 @@ <h1 class="classTitle">
</td>
</tr>

<tr>
<td class="attributes">&lt;static&gt; &nbsp;</td>
<td class="nameDescription">
<div class="fixedFont">KEYUTIL.<b><a href="../symbols/KEYUTIL.html#.getJWKFromKey">getJWKFromKey</a></b>()
</div>
<div class="description">convert from RSAKey/KJUR.crypto.ECDSA public/private key object to RFC 7517 JSON Web Key(JWK)
This static method convert from RSAKey/KJUR.crypto.ECDSA public/private key object
to RFC 7517 JSON Web Key(JWK)</div>
</td>
</tr>

<tr>
<td class="attributes">&lt;static&gt; &nbsp;</td>
<td class="nameDescription">
Expand Down Expand Up @@ -1307,6 +1318,70 @@ <h1 class="classTitle">



<hr />

<a name=".getJWKFromKey"> </a>
<div class="fixedFont">&lt;static&gt;

<span class="light">{Object}</span>
<span class="light">KEYUTIL.</span><b>getJWKFromKey</b>()

</div>
<div class="description">
convert from RSAKey/KJUR.crypto.ECDSA public/private key object to RFC 7517 JSON Web Key(JWK)
This static method convert from RSAKey/KJUR.crypto.ECDSA public/private key object
to RFC 7517 JSON Web Key(JWK)


</div>



<pre class="code">kp1 = KEYUTIL.generateKeypair("EC", "P-256");
jwkPrv1 = KEYUTIL.getJWKFromKey(kp1.prvKeyObj);
jwkPub1 = KEYUTIL.getJWKFromKey(kp1.pubKeyObj);

kp2 = KEYUTIL.generateKeypair("RSA", 2048);
jwkPrv2 = KEYUTIL.getJWKFromKey(kp2.prvKeyObj);
jwkPub2 = KEYUTIL.getJWKFromKey(kp2.pubKeyObj);

// if you need RFC 7636 JWK thumprint as kid do like this:
jwkPub2.kid = KJUR.jws.JWS.getJWKthumbprint(jwkPub2);</pre>




<dl class="detailList">
<dt class="heading">Parameters:</dt>

<dt>
<span class="light fixedFont">{Object}</span> <b>RSAKey/KJUR.crypto.ECDSA</b>

</dt>
<dd>public/private key object</dd>

</dl>



<dl class="detailList">
<dt class="heading">Since:</dt>
<dd>keyutil 1.0.13 jsrsasign 5.0.14</dd>
</dl>
</dl>



<dl class="detailList">
<dt class="heading">Returns:</dt>

<dd><span class="light fixedFont">{Object}</span> JWK object</dd>

</dl>




<hr />

<a name=".getKey"> </a>
Expand Down
108 changes: 106 additions & 2 deletions api/symbols/KJUR.crypto.ECDSA.html
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,24 @@ <h1 class="classTitle">
</td>
</tr>

<tr>
<td class="attributes">&lt;static&gt; &nbsp;</td>
<td class="nameDescription">
<div class="fixedFont">KJUR.crypto.ECDSA.<b><a href="../symbols/KJUR.crypto.ECDSA.html#.getPublicKeyXYHex">getPublicKeyXYHex</a></b>()
</div>
<div class="description">get X and Y hexadecimal string value of public key</div>
</td>
</tr>

<tr>
<td class="attributes">&lt;static&gt; &nbsp;</td>
<td class="nameDescription">
<div class="fixedFont">KJUR.crypto.ECDSA.<b><a href="../symbols/KJUR.crypto.ECDSA.html#.getShortNISTPCurveName">getShortNISTPCurveName</a></b>()
</div>
<div class="description">get NIST curve short name such as "P-256" or "P-384"</div>
</td>
</tr>

<tr>
<td class="attributes">&lt;static&gt; &nbsp;</td>
<td class="nameDescription">
Expand Down Expand Up @@ -790,8 +808,8 @@ <h1 class="classTitle">

<pre class="code">var ec = new KJUR.crypto.ECDSA({'curve': 'secp256r1'});
var keypair = ec.generateKeyPairHex();
var pubhex = keypair.ecpubhex; // hexadecimal string of EC private key (=d)
var prvhex = keypair.ecprvhex; // hexadecimal string of EC public key</pre>
var pubhex = keypair.ecpubhex; // hexadecimal string of EC public key
var prvhex = keypair.ecprvhex; // hexadecimal string of EC private key (=d)</pre>



Expand All @@ -816,6 +834,92 @@ <h1 class="classTitle">



<hr />

<a name=".getPublicKeyXYHex"> </a>
<div class="fixedFont">&lt;static&gt;

<span class="light">{Array}</span>
<span class="light">KJUR.crypto.ECDSA.</span><b>getPublicKeyXYHex</b>()

</div>
<div class="description">
get X and Y hexadecimal string value of public key


</div>



<pre class="code">ec = new KJUR.crypto.ECDSA({'curve': 'secp256r1', 'pub': pubHex});
ec.getPublicKeyXYHex() &rarr; { x: '01bacf...', y: 'c3bc22...' }</pre>






<dl class="detailList">
<dt class="heading">Since:</dt>
<dd>ecdsa-modified 1.0.5</dd>
</dl>
</dl>



<dl class="detailList">
<dt class="heading">Returns:</dt>

<dd><span class="light fixedFont">{Array}</span> associative array of x and y value of public key</dd>

</dl>




<hr />

<a name=".getShortNISTPCurveName"> </a>
<div class="fixedFont">&lt;static&gt;

<span class="light">{String}</span>
<span class="light">KJUR.crypto.ECDSA.</span><b>getShortNISTPCurveName</b>()

</div>
<div class="description">
get NIST curve short name such as "P-256" or "P-384"


</div>



<pre class="code">ec = new KJUR.crypto.ECDSA({'curve': 'secp256r1', 'pub': pubHex});
ec.getShortPCurveName() &rarr; "P-256";</pre>






<dl class="detailList">
<dt class="heading">Since:</dt>
<dd>ecdsa-modified 1.0.5</dd>
</dl>
</dl>



<dl class="detailList">
<dt class="heading">Returns:</dt>

<dd><span class="light fixedFont">{String}</span> short NIST P curve name such as "P-256" or "P-384" if it's NIST P curve otherwise null;</dd>

</dl>




<hr />

<a name=".hexRSSigToASN1Sig"> </a>
Expand Down
2 changes: 1 addition & 1 deletion api/symbols/KJUR.jws.JWS.html
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ <h4>SUPPORTED SIGNATURE ALGORITHMS</h4>
<dt class="heading">Parameters:</dt>

<dt>
<span class="light fixedFont">{String}</span> <b>o</b>
<span class="light fixedFont">{Object}</span> <b>o</b>

</dt>
<dd>JWK object to be calculated thumbprint</dd>
Expand Down
Loading

0 comments on commit 0eba50a

Please sign in to comment.