OpenSSL Notes
Intro
Tripple DES
Bash Tripple DES File Utility
ssh
OpenSSL is free cryptography command line tool.
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
- good practise to shred sensitive docs,
shred -uz file
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
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
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