Class Index | File Index

Classes


Class KJUR.crypto.DSA

class for DSA signing and verifcation
Defined in: dsa-modified-1.0.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
class for DSA signing and verification

CAUTION: Most of the case, you don't need to use this class.

Method Summary
Method Attributes Method Name and Description
<static>  
KJUR.crypto.DSA.parseASN1Signature(hSigVal)
parse hexadecimal ASN.1 DSA signature value
<static>  
KJUR.crypto.DSA.setPrivate(p, q, g, y, x)
set DSA private key by key specs
<static>  
KJUR.crypto.DSA.setPublic(p, q, g, y)
set DSA public key by key specs
<static>  
KJUR.crypto.DSA.signWithMessageHash(sHashHex)
sign to hashed message by this DSA private key object
<static>  
KJUR.crypto.DSA.verifyWithMessageHash(sHashHex, hSigVal)
verify signature by this DSA public key object
Class Detail
KJUR.crypto.DSA()
class for DSA signing and verification

CAUTION: Most of the case, you don't need to use this class. Please use KJUR.crypto.Signature class instead.

This class was originally developped by Recurity Labs GmbH for OpenPGP JavaScript library. (See https://github.com/openpgpjs/openpgpjs/blob/master/src/ciphers/asymmetric/dsa.js)

Method Detail
<static> {Array} KJUR.crypto.DSA.parseASN1Signature(hSigVal)
parse hexadecimal ASN.1 DSA signature value
Parameters:
{String} hSigVal
hexadecimal string of ASN.1 encoded DSA signature value
Since:
dsa-modified 1.0.0
Returns:
{Array} array [s1, s2] of DSA signature value. Both s1 and s2 are BigInteger.

<static> KJUR.crypto.DSA.setPrivate(p, q, g, y, x)
set DSA private key by key specs
Parameters:
{BigInteger} p
prime P
{BigInteger} q
sub prime Q
{BigInteger} g
base G
{BigInteger} y
public key Y
{BigInteger} x
private key X
Since:
dsa-modified 1.0.0

<static> KJUR.crypto.DSA.setPublic(p, q, g, y)
set DSA public key by key specs
Parameters:
{BigInteger} p
prime P
{BigInteger} q
sub prime Q
{BigInteger} g
base G
{BigInteger} y
public key Y
Since:
dsa-modified 1.0.0

<static> {String} KJUR.crypto.DSA.signWithMessageHash(sHashHex)
sign to hashed message by this DSA private key object
Parameters:
{String} sHashHex
hexadecimal string of hashed message
Since:
dsa-modified 1.0.0
Returns:
{String} hexadecimal string of ASN.1 encoded DSA signature value

<static> {Boolean} KJUR.crypto.DSA.verifyWithMessageHash(sHashHex, hSigVal)
verify signature by this DSA public key object
Parameters:
{String} sHashHex
hexadecimal string of hashed message
{String} hSigVal
hexadecimal string of ASN.1 encoded DSA signature value
Since:
dsa-modified 1.0.0
Returns:
{Boolean} true if the signature is valid otherwise false.

© 2012 Kenji Urushima, All rights reserved
Documentation generated by JsDoc Toolkit 2.4.0