Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Vladimir Chervanev vchervanev

🎯
Focusing
Block or report user

Report or block vchervanev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vchervanev
vchervanev / id_rsa_encryption.md
Created Mar 5, 2018 — forked from colinstein/id_rsa_encryption.md
Encrypt/Decrypt a File using your SSH Public/Private Key on Mac OS X
View id_rsa_encryption.md

A Guide to Encrypting Files with Mac OS X

This guide will demonstrate the steps required to encrypt and decrypt files using OpenSSL on Mac OS X. The working assumption is that by demonstrating how to encrypt a file with your own public key, you'll also be able to encrypt a file you plan to send to somebody else using their private key, though you may wish to use this approach to keep archived data safe from prying eyes.

Too Long, Didn't Read

Assuming you've already done the setup described later in this document, that id_rsa.pub.pcks8 is the public key you want to use, that id_rsa is the private key the recipient will use, and secret.txt is the data you want to transmit…

Encrypting

$ openssl rand 192 -out key
$ openssl aes-256-cbc -in secret.txt -out secret.txt.enc -pass file:key
View keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

You can’t perform that action at this time.