Module: crypto/signature

crypto/signature

Requires

Methods

<static> sign(hash_algo, algo, publicMPIs, secretMPIs, data) → {Array.<module:type/mpi>}

Create a signature on data using the specified algorithm
Parameters:
Name Type Description
hash_algo Integer hash Algorithm to use (See RFC4880 9.4)
algo Integer Asymmetric cipher algorithm to use (See RFC4880 9.1)
publicMPIs Array.<module:type/mpi> Public key multiprecision integers of the private key
secretMPIs Array.<module:type/mpi> Private key multiprecision integers which is used to sign the data
data String Data to be signed
Source:
Returns:
Type
Array.<module:type/mpi>

<static> verify(algo, hash_algo, msg_MPIs, publickey_MPIs, data) → {Boolean}

Parameters:
Name Type Description
algo Integer public Key algorithm
hash_algo Integer Hash algorithm
msg_MPIs Array.<module:type/mpi> Signature multiprecision integers
publickey_MPIs Array.<module:type/mpi> Public key multiprecision integers
data String Data on where the signature was computed on.
Source:
Returns:
true if signature (sig_data was equal to data over hash)
Type
Boolean