VerifyDigitalSignature

VerifyDigitalSignature[{expr,sig},key]

verifies the digital signature sig for expr using the specified public key.

VerifyDigitalSignature[{{expr1,sig1},{expr2,sig2},},key]

verifies the digital signatures sigi for each of the expri, all using the specified public key.

VerifyDigitalSignature[key]

is an operator form of VerifyDigitalSignature, suitable for application to {expr,sig} or a list of such pairs.

Details

Examples

open allclose all

Basic Examples  (2)

Generate an elliptic curvebased key pair:

Generate a digital signature using your private key:

Verify a digital signature using your public key:

Sign a message using a hashing function of your choice:

Verification will automatically consider the hashing function used for signing:

Scope  (3)

Single Signature  (1)

Generate a digital signature of an existing message digest:

When verifying the signature, the digest will not be hashed again:

Multiple Signatures  (1)

Create signatures of several messages:

Verify their signatures:

Operator Form  (1)

Generate an elliptic curvebased key pair:

Generate a digital signature using your private key:

Verify a digital signature using your public key:

Applications  (4)

Cryptocurrencies Networks  (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:

Byte Arrays  (1)

Use ByteArray data directly:

Use "HashingMethod"->None if you have an already hashed digest:

When verifying the signature, the digest will not be hashed again:

Sign Files  (1)

Generate a pair of elliptic curve keys:

Import the contents of the file you wish to sign:

Create a signature for the imported bytes of the file:

Equivalently, this can be done using GenerateFileSignature on the file directly:

Both signatures are verifiable:

Introduced in 2019
 (12.0)