.TH "SSHPK\-VERIFY" "" "October 2018" "" "" .SH "NAME" \fBsshpk-verify\fR .SH NAME .P sshpk\-verify \- verify a signature on data using an SSH key .SH SYNOPSYS .P \fBsshpk\-verify\fP \-i KEYPATH \-s SIGNATURE [OPTION\.\.\.] .SH DESCRIPTION .P Takes in arbitrary bytes and a Base64\-encoded signature, and verifies that the signature was produced by the private half of the given SSH public key\. .SH EXAMPLES .P .RS 2 .nf $ printf 'foo' | sshpk\-verify \-i ~/\.ssh/id_ecdsa \-s MEUCIQCYp\.\.\. OK $ printf 'foo' | sshpk\-verify \-i ~/\.ssh/id_ecdsa \-s GARBAGE\.\.\. NOT OK .fi .RE .SH EXIT STATUS .P \fB0\fP Signature validates and matches the key\. .P \fB1\fP Signature is parseable and the correct length but does not match the key or otherwise is invalid\. .P \fB2\fP The signature or key could not be parsed\. .P \fB3\fP Invalid commandline options were supplied\. .SH OPTIONS .P \fB\-v, \-\-verbose\fP Print extra information about the key and signature to stderr when verifying\. .P \fB\-i KEY, \-\-identity=KEY\fP Select the key to be used for verification\. \fBKEY\fP must be a relative or absolute filesystem path to the key file\. Any format supported by the \fBsshpk\fP library is supported, including OpenSSH formats and standard PEM PKCS\. .P \fB\-s BASE64, \-\-signature=BASE64\fP Supplies the base64\-encoded signature to be verified\. .P \fB\-f PATH, \-\-file=PATH\fP Input file to verify instead of stdin\. .P \fB\-H HASH, \-\-hash=HASH\fP Set the hash algorithm to be used for signing\. This should be one of \fBsha1\fP, \fBsha256\fP or \fBsha512\fP\|\. Some key types may place restrictions on which hash algorithms may be used (e\.g\. ED25519 keys can only use SHA\-512)\. .P \fB\-t FORMAT, \-\-format=FORMAT\fP Choose the signature format to use, from \fBasn1\fP, \fBssh\fP or \fBraw\fP (only for ED25519 signatures)\. The \fBasn1\fP format is the default, as it is the format used with TLS and typically the standard in most non\-SSH libraries (e\.g\. OpenSSL)\. The \fBssh\fP format is used in the SSH protocol and by the ssh\-agent\. .SH SEE ALSO .P sshpk\-sign(1) .SH BUGS .P Report bugs at Github \fIhttps://github\.com/arekinath/node\-sshpk/issues\fR