Loading

MSIGN

crypto

The MSIGN function creates a cryptographic signature of a macro. The cryptographic signature is itself a macro with the following structure:

<%
  'CURVE'
  'PUBKEY'
  'SIG'
  MSIG
%>

where CURVE is the name of the Elliptic Curve Cryptography to use, PUBKEY is the hex encoded public key (Q parameter) which can be used to verify the signature and SIG is the hex encoded SHA256WITHECSDA signature of the UTF-8 content of the snapshot of the macro.

The resulting signature macro can be concatenated at the end of the original unsigned macro to create a signed macro. The signature macro can then be extracted using MSIG or MDETACH.

MSIGN is available since version 2.7.8.

See also

Signatures

Examples

<% PI * %> 'secp256r1' ECGEN DROP ECPRIVATE MSIGN