Skip to content

ShubhamTatvamasi/openssl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

openssl

Docker Cloud Build Status Docker Image Size (tag) Docker Pulls MicroBadger Layers (tag) Docker Cloud Automated build

Generate RSA private key, 4096 bit

openssl genrsa 4096

Generate RSA private key, 2048 bit with password

openssl genrsa -aes256

Save the generated RSA private key

openssl genrsa -aes256 -out private.pem

Generate and save public key from private key

openssl rsa -in private.pem -outform PEM -pubout -out public.pem

Standard RSA SSL key used by most websites

RSA 2048 bit key

# Generate Certifcate Request
openssl req -new -newkey rsa:2048 -nodes -keyout shubhamtatvamasi.key -out shubhamtatvamasi.csr

# Self-Sign Certificate
openssl x509 -req -in shubhamtatvamasi.csr -signkey shubhamtatvamasi.key -out shubhamtatvamasi.crt -days 365

Self-Signed Certificate

Get the list of curves available

openssl ecparam -list_curves

Only secp384r1 and prime256v1 keys are compatible with modern browsers

Generate new private key

openssl ecparam -name secp384r1 -genkey -out ec_key.pem

Generate certificate

openssl req -new -key ec_key.pem -x509 -nodes -days 3650 -out cert.pem

OpenSSL DH Parameters

Generate Diffie-Hellman key exchange

openssl dhparam -out dhparam.pem 4096

add -dsaparam flag for faster key generation


Speed Test

ecdhp256 vs ecdhp384, operations per second

openssl speed ecdhp256 ecdhp384

Read information of your SSL certificate

openssl x509 -text -noout -in certificate.crt

Convert a PEM based file to JSON

awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' cert-name.pem

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published