Encrypting data with a public key and decrypting it with a private key is called encryption and decryption.
Encrypting data with a private key and decrypting it with a public key is generally known as signing and verifying signatures.
RSA/DSA
The general public key will not be transmitted in clear text to others, under normal circumstances will generate a file, this file is the public key file, and then this file can be given to others for encryption, but the transmission process if someone malicious damage, your public key into his public key, and then get the public key of the side of the encrypted data, not he can be decrypted with his own key. With his own key decryption to see the data, in order to solve this problem, the need for a notary party to do this, anyone can find it to confirm the public key is who sent. This is the CA, CA to confirm the principle of the public key is very simple, it will release its own public key to all, and then a person who wants to release their public key can send their public key and some identity information to the CA, CA encrypted with their own key, which can also be referred to as a signature. Then the file containing your public key and your information can be called a certificate file. In this way, all the people who get some of the public key file, through the CA's public key to decrypt the file, if the normal decryption of the confidentiality of the information inside must be true, because the encryption party can only be the CA, other people do not have its key ah. This way you unlock the public key file, look at the information inside to know if this is the public key you need to use to encrypt.
The only two key file formats generated by OpenSSL are PEM and DER,
PEM is a base64 encoded representation of the key, which opens directly into a string of letters
DER is a binary key file
References: URLs
Uncontextualized / Git Bash on PowerShell:
Reference: gitlab.com