Forrest logo
back to the openssl tool

openssl-dgst:tldr:5ae71

openssl-dgst: Verify an ECDSA signature.
$ openssl dgst -verify ${public_key_file} -signature ${signature_file} ${signature_message_file}
try on your machine

This command is using the OpenSSL utility to verify the signature of a message using a public key.

Here is a breakdown of the command:

  • openssl: This is the command to invoke the OpenSSL utility.
  • dgst: This is the digest command within OpenSSL, which performs a cryptographic hash function on the input data.
  • -verify ${public_key_file}: This option specifies the public key file that will be used for verification. The ${public_key_file} placeholder should be replaced with the actual filename/path of the public key file.
  • -signature ${signature_file}: This option specifies the signature file that contains the cryptographic signature generated using the private key. The ${signature_file} placeholder should be replaced with the actual filename/path of the signature file.
  • ${signature_message_file}: This is the file that contains the original message, for which the signature is being verified. The ${signature_message_file} placeholder should be replaced with the actual filename/path of the message file.

In summary, the command takes a public key, a signature, and a message file. It then verifies whether the provided signature was generated using the corresponding private key and matches the message. If the verification is successful, it implies that the message has not been tampered with and was indeed signed by the private key corresponding to the given public key.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the openssl tool