Valid
	XHTML 1.1! Valid CSS!
Created 2008-06-11   Modified 2009-04-11
Chelton Evans

../images/book_uni.gif OpenSSL Notes home

Intro
Tripple DES
Bash Tripple DES File Utility
ssh

Intro

OpenSSL is free cryptography command line tool.

Tripple DES

Encryption/Decryption with OpenSSL
Encryp

openssl des3 -salt -in file02.txt.tar -out file02.txt.tar.des3

Decrypt

openssl des3 -d -salt -in file02.txt.tar.des3 -out file03.txt.tar

To pass the password for use in automated scripts

tar -zcf - t3 | openssl des3 -salt -out t3.tar.gz.des3 -k password
shred -uz file
- good practise to shred sensitive docs,

The issue with passwords at the command line is that they are recordered in the command line history.
history -c clears history
unset HISTFILE at login may kill it

RSA

Encrypting files less than the keylength.

Setting up

openssl genrsa -out key.txt 4000
openssl rsa -in key.txt -pubout -out key-pub.txt

Encrypting a file

$ openssl rsautl -encrypt -in test01.txt -pubin -inkey pub-key.txt -out test01.enc

Decrypting the file

$ openssl rsautl -decrypt -inkey key.txt -in test01.txt.enc -out test02.txt

Bash Tripple DES File Utility

shellcrypt.sh - utility to encrypt and decrypt a file with Tripple DES and a basic file management stategy.

Directory with examples where two files are being encryped, file.txt is in an encrypted state, and img01.png is in an un-encrypted state.
d01