Posts

Showing posts with the label openssl

Importance of SSL Certificates and Understanding Their Formats

Image
In today's digital world, security is paramount, especially when it comes to the transfer of sensitive information over the internet. One of the foundational elements of securing online communications is the use of SSL (Secure Sockets Layer) certificates. SSL certificates are critical for establishing a secure connection between a web server and a client, ensuring that the data transmitted remains private and integral. This article delves into the importance of SSL certificates, the various formats they come in, and provides practical guidance on handling the PFX format, including how to convert it to other commonly used formats. The Question: Why SSL Certificates are Important? The SSL certificates provides the transport layer security and hence it's important in modern web apps accessible over http/ https protocol. Following are some of the key advantages of SSL certificates - Data Encryption -  SSL certificates encrypt the data exchanged between the client and the server. Th...

Export public-private keys from PFX file

Image
In this blog I'll share the snippets used to export the public key & private key from a PFX file. Sometimes we have to perform the data encryption/decryption using the digital signature by taking the public key(so called as SSL certificate or public keys)  to encrypt the data and private key to decrypt the data. Let's take the sample DSCs provided by eMudhra- https://www.e-mudhra.com/Repository/ I have taken " e-Mudhra sub CA for Class 3 Individual 2014"  for this blog. This zip contains two files as- Class 3 individiual test_encryption.pfx- For data encryption/decryption Class 3 individiual test_Signature.pfx- For signing the document We'll take the file  Class 3 individiual test_encryption.pfx for this blog and follow the below steps to obtain the public key & private key. A linux machine with openssl utility Run the following command to extract the private key openssl pkcs12 -in Class_3_individiual_test_encryption.pfx -nocerts -out private_key.key If pr...