openssl pkeyutl
The OpenSSL subcommand that performs one public-key operation with a key file: sign, verify, encrypt, decrypt or derive a shared secret.
In more detail
You pick the operation with a flag such as -sign or -verify and the key with -inkey, adding -pubin when that key is a public key. For Ed25519 you also pass -rawin, because that algorithm signs the whole message rather than a precomputed hash. A successful check prints Signature Verified Successfully and a failed one prints Signature Verification Failure.
Examples
openssl pkeyutl -sign -rawin -inkey alice.key -in order.txt -out order.sigopenssl pkeyutl -verify -rawin -pubin -inkey alice.pub -in order.txt -sigfile order.sigRelated terms
- OpenSSL — A widely used toolkit and library for cryptography and TLS, including the openssl command-line tool.
- digital signature — A value computed from data and a secret key that lets anyone with the matching verification key confirm the data came from the key holder and was not changed.
- openssl genpkey — The OpenSSL subcommand that generates a new private key, such as an Ed25519 or RSA key, and writes it to a file.
- public key — The shareable half of a key pair, used by others to verify your signatures or encrypt data only you can read.
Taught in
- CIA Triad, Non-Repudiation & Parkerian Hexad — Cybersecurity Fundamentals, GRC & Cryptography
- Asymmetric Cryptography: RSA, ECC & Diffie-Hellman — Cybersecurity Fundamentals, GRC & Cryptography
- Post-Quantum Cryptography & Key Lifecycles — Cybersecurity Fundamentals, GRC & Cryptography