What is OpenSSL?
OpenSSL is an open-source library and command-line tool for cryptography. It creates keys and certificates, checks website certificates, calculates hashes and encrypts files.
How OpenSSL works
-
1
Make a key
Generate a private and public key pair.
-
2
Prove identity
A certificate authority signs your certificate.
-
3
Agree a secret
TLS sets up a session key between browser and server.
-
4
Encrypt
Everything after that travels protected.
Words to know
- Encryption: lock data so only the right key opens it
- Hash: a one-way fingerprint
- Certificate: proof that a public key belongs to a website
Learn by doing
Hash a file, change one letter, hash again — the result changes completely.
OpenSSL first steps
openssl versionCheck the version
openssl dgst -sha256 file.txtFingerprint a file
openssl rand -base64 24Make a strong random value
openssl s_client -connect example.com:443View a website certificate chain
openssl enc -aes-256-cbc -pbkdf2 -in notes.txt -out notes.encEncrypt your own file with a password
Use OpenSSL safely and legally
Keep private keys secret (chmod 600) and never post them online.
Practise only on your own computer, your own network or a lab that gives you permission. Using security tools on systems that are not yours can be a crime (in India under the IT Act).
OpenSSL — common questions
What is OpenSSL used for?
OpenSSL is an open-source library and command-line tool for cryptography. It creates keys and certificates, checks website certificates, calculates hashes and encrypts files.
Encryption kya hai?
Encryption data ko aise lock karta hai ki sahi key wala hi use padh sake.
Is hashing the same as encryption?
No. Encryption can be reversed with a key; a hash cannot.
Why do certificates expire?
To limit risk if a key leaks and to keep information current.
Related topics: openssl tutorial · encryption kya hai · ssl certificate basics · sha256 hash