Tag: #cryptography
An encrypted diary using OpenSSL
Generate a master keypair. Encrypting each diary entry with a one-time shared secret. Encrypt the shared secret with the public key. Decrypt entries using the private key and the shared secret. 2017-12-03
How do I create a message digest using
openssl
? Create message digests using the
openssl dgst
command, specifying the hash algorithm (e.g. -sha512
) and optionally signing with a shared password using -hmac
. 2017-03-13How do I hash a password with
openssl
? The
openssl passwd
command hashes passwords using the outdated crypt algorithm, with truncation to 8 characters - a poor choice for secure password hashing. 2017-03-12How do I generate random bytes with
openssl
? Generate random bytes with
openssl rand
, which uses a PRNG seeded with entropy from ~/.rnd
. 2017-03-10How do I encrypt text with
openssl
? Encrypt and decrypt text using the
openssl enc
command with a password and AES-256 cipher. The encrypted text is base64-encoded. 2017-03-09How does a stream cipher work?
A stream cipher works like a one-time pad, but uses a pseudorandom “keystream” from a PRNG seeded by a secret key and nonce, preventing attacks based on pad disclosure or reuse. 2016-11-21
What is symmetric cryptography?
Symmetric cryptography uses a shared secret key for both encryption and authentication, providing confidentiality and integrity. We look at the API, HMAC, and Authenticated Encryption. 2016-11-19
All content copyright James Fisher.