VerifyFileSignature

VerifyFileSignature[{"file",sig},key]

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

VerifyFileSignature[{"file",range,sig},key]

verifies the digital signature sig for the specified range of bytes in the file.

VerifyFileSignature[{{"file1",range1,sig1},{"file2",range2,sig2},},key]

verifies the digital signatures sigi for each of rangei of bytes in the filei, all using the specified public key.

VerifyFileSignature[key]

represents an operator form of VerifyFileSignature that can be applied to files.

Details

Examples

open allclose all

Basic Examples  (2)

Generate an RSAbased key pair:

Generate a digital signature of the file using your private key:

Verify a digital signature using your public key:

Sign a file using a hashing function of your choice:

Verification will automatically consider the hashing function used for signing:

Scope  (5)

File Types  (2)

Digitally sign and verify a signed CloudObject:

Create and verify a signature of the file specified by a File object:

Byte Ranges  (1)

If the signature was created for a range of bytes in the file, VerifyFileSignature will need the same range specified:

Compute a signature for the first 100 bytes of a file:

Verify the signature for the same range of bytes:

The signature will not be valid for a different range of bytes or the whole file:

Operator Form  (1)

Generate an elliptic curvebased key pair:

Apply the operator form of GenerateDigitalSignature to a file:

Verify a digital signature using your public key:

Multiple Files  (1)

Sign several files with the same set of keys:

Verify their signatures:

Properties & Relations  (1)

Uploading a file to the Wolfram Cloud keeps the contents of the file intact. When verifying the digital signatures of the original file and the cloud copy, they are both valid:

Copy a file to the cloud:

Create the signature for both the local and cloud copies of the file:

All possible combinations of files and signatures are valid:

Wolfram Research (2020), VerifyFileSignature, Wolfram Language function, https://reference.wolfram.com/language/ref/VerifyFileSignature.html.

Text

Wolfram Research (2020), VerifyFileSignature, Wolfram Language function, https://reference.wolfram.com/language/ref/VerifyFileSignature.html.

CMS

Wolfram Language. 2020. "VerifyFileSignature." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/VerifyFileSignature.html.

APA

Wolfram Language. (2020). VerifyFileSignature. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VerifyFileSignature.html

BibTeX

@misc{reference.wolfram_2024_verifyfilesignature, author="Wolfram Research", title="{VerifyFileSignature}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/VerifyFileSignature.html}", note=[Accessed: 07-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_verifyfilesignature, organization={Wolfram Research}, title={VerifyFileSignature}, year={2020}, url={https://reference.wolfram.com/language/ref/VerifyFileSignature.html}, note=[Accessed: 07-December-2024 ]}