Show Menu
Cheatography

Linux Cryptography Cheat Sheet (DRAFT) by

Simple guide to cryptography

This is a draft cheat sheet. It is a work in progress and is not finished yet.

OpenSSL

Command
Purpose
openssl version
Version
openssl rand -hex 16
Generate random data
openssl dgst -sha256 FILE
SHA-256 digest
openssl x509 -in cert.pem -text -noout
View certif­icate
openssl s_client -connect host:443
Inspect server certif­icate

Hashing

Command
Purpose
md5sum FILE
MD5 hash
sha1sum FILE
SHA-1 hash
sha256sum FILE
SHA-256 hash
sha512sum FILE
SHA-512 hash
sha256 sum -c file.s­ha256
Verify checksum
 

GPG

Command
Purpose
gpg --gen-key
Generate key
gpg -e FILE
Encrypt
gpg --list­-keys
List keys
gpg --verify FILE.sig
Verify signature