Keeping Secrets with OpenSSL

A Public Key Based Encryption example using OpenSSL.

Asymmetric Encryption

Otherwise known as Public-Key Cryptography relies on two keys. One private key which is kept secret and is used only to decode and a another publicly shared key that is used to encode all messages. Messages encoded with the public key can only be decoded quickly using the private key.

The strength of these types of cryptograohy mechanisms depend on the power of the ciphers and algorithms used in the encoding and key generation phases. The methods utilized rely on the validity of certain mathematical operations being quick to perform in one direction but being orders of magnitude slower in the reverse direction thus making it computionally infeasible to deduce the private key from the public key in a reasonable amount of time.

For example, one can think of the process as being akin to mixing two primary colours to produce a entirely new colour like in the instance of combining Yellow and Blue to produce Green. However, the reverse operation, that is to seperate Green into its constituent primary colours, is not trival. A similar math operation would be the multiplication of prime numbers to generate a hash whose result would have to reversed by factorization to deterime the two original numbers combined. This is a simple mental operation when the numbers are small but becomes exceedly difficult as the size of the numbers being multiplied increases.

Operation #1 needs to very quick (multiplication) i.e AxB = C

Operation #2 needs to be very slow (factoring) i.e C (D1,D2) = (A,B)


OpenSSL is a library and command line utility developed by the OpenSSL Project team. The toolset comes standard on most Unix and Linux systems. It is also commonly used to implement SSL/TLS on webservers which is needed for the HTTPS protocol. OpenSSL also supports many SSH, SFTP, and SCP applications.


Read the full post at www.bigthinkingapplied.