DigitalSignature

DigitalSignature[]

represents a digital signature object.

Details

  • Digital signatures can be created with GenerateDigitalSignature and GenerateFileSignature.
  • DigitalSignature[]["prop"] yields properties of the digital signature.
  • The signing algorithm type is indicated by the "Type" property of the signature. Possible types include "RSA" and "EllipticCurve".
  • Additional properties for "RSA" include:
  • "HashingMethod"hashing method
    "HashName"hash name used in padding
    "Padding"padding scheme
    "Signature"digital signature
  • Additional properties for "EllipticCurve" include:
  • "CurveName"elliptic curve used for calculating digital signature
    "HashingMethod"hashing method
    "SignatureType"mode of digital signature generation
    "R"r, first element of digital signature pair
    "S"s, second element of digital signature pair
  • For a Bitcoin blockchain digital signature, additional properties include:
  • "DER"digital signature in DER format
  • For an Ethereum blockchain digital signature, additional properties include:
  • "RecoveryParameter"recovery parameter used for public key recovery
  • DigitalSignature[]["Properties"] gives a list of available properties.
  • The digital signature of an expr may be verified by using VerifyDigitalSignature.
  • The digital signature of a file may be verified by using VerifyFileSignature.

Examples

open allclose all

Basic Examples  (1)

Get a digital signature object by signing a message:

Get a property of the digital signature object:

Get a list of available properties of this digital signature:

Scope  (2)

Cryptocurrencies  (2)

Get the DER-encoded digital signature typically used in Bitcoin transactions:

Get the recovery parameter used for public key recovery in the Ethereum network:

Applications  (2)

Generate a digital signature compatible with Bitcoin network requirements:

Verify the signature:

Generate a digital signature compatible with Ethereum network requirements:

Verify the signature:

Introduced in 2019
 (12.0)
 |
Updated in 2020
 (12.1)