Secure Software Development – Hashing, Encryption and Openssl

In this “Secure Software Development – Hashing, Encryption and Openssl” article includes following topics.

  1. hashing a text file using MD5 hashing algorithm on Ubuntu, using the terminal
  2. 3DES or AES symmetric key encryption on a text file on Ubuntu using the openssl package on the terminal.
  3. RSA asymmetric key encryption on a text file using the openssl package on the terminal.


01. hashing a text file using MD5 hashing algorithm on Ubuntu, using the terminal


1.1 creating a Text File – touch FILE_NAME.txt


1.2 Get into that text file or edit – nano YOUR_FILE_NAME.txt


1.3 Add some text and save using ctrl + x and “y”


1.4 Generating the hash code using “md5sum” algorithm – md5sum YOUR_FILE_NAME.txt


02. 3DES or AES symmetric key encryption on a text file on Ubuntu using the openssl package on the terminal.


2.1 Encrypt the key using openssl and output file will be enc_text.txt – openssl aes-256-cbc –in YOUR_FILE_NAME.txt –out enc_text.txt


2.2 Open enc_text.txt using nano enc_text.txt


2.3 Decrypted using openssl and store in dec_text.txt


2.4 Open dec_text.txt file using nano dec_text.txt


2.5 Generate private Key using openssl and store in private_key.pem – openssl genrsa -out private_key.pem 4096


2.6 Open private_key.pem file


2.7 Private_key.pem file


2.8 Generate public key using openssl and store in public_key.pem – openssl rsa in private_key.pem -outform pem -pubout -out public_key.pem


2.9 Open public_key.pem file – nano public_key.pem


03. RSA asymmetric key encryption on a text file using the openssl package on the terminal.


3.1 Encrypt using openssl and public key – openssl rsautl -encrypt -inkey public_key.pem -pubin -in it18140330.txt -out asy_enc_text.txt


3.2 Open asy_enc_text.txt file using nano asy_enc_text.txt


3.3 Decrypt using private key


3.4 Open asy_dec_text.txt using nano asy_dec_text.txt


This is the end of the “secure software development” article. Thank you for reading. If you are interesting on my article, make sure to follow my other articles as well. Make sure to leave a comment.

guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x