Module ec

ec module to create EC keys and do EC key processes.

Functions

sign (eckey, digest, digest) do EC sign
verify (eckey, digest, signature, digest) do EC verify, input msg is digest result


Functions

sign (eckey, digest, digest)
do EC sign

Parameters:

  • eckey ec_key
  • digest evp_md, string or nid digest alg identity, default is sm3
  • digest evp_md, string or nid digest alg identity, default is sm3

Returns:

    string signature
verify (eckey, digest, signature, digest)
do EC verify, input msg is digest result

Parameters:

  • eckey ec_key
  • digest evp_md, string or nid digest alg identity
  • signature string
  • digest evp_md, string or nid digest alg identity

Returns:

  1. boolean true for verified, false for invalid signature
  2. nil for error, and followed by error message
generated by LDoc 1.5.0 Last updated 2024-05-16 23:31:39