Concepts about RSA, public key, private key, encryption, and signature

Source: Internet
Author: User

Concepts about RSA, public key, private key, encryption, and signature
Preface

As a programmer, I often hear such words as encryption and decryption. Asymmetric encryption is widely used. This article does not describe the principles of encryption technology. It just hopes to give you a simple analogy to understand the concepts of common words in asymmetric encryption and their functions.

Introduction

There are two encryption and decryption methods in the RSA algorithm:

Public key encryption, Private Key decryption (encryption algorithm) private key encryption, Public Key decryption (signature authentication algorithm)
These two methods have different effects.

We can make the following analogy:

Public Key-> safe deposit box private key-> safe deposit box Password

Note that a password can be used to open all the safes with this password !!!
The private key is only known to you, while the Public Key is public.

Public key encryption Private Key decryption

In this process, we put things in the safe box. Only those with passwords can open the safe box and know what the inside is.
Information is transmitted from the public key to the private key. Because others do not have a private key, they cannot decrypt the specific information.

Private Key Encryption Public Key decryption

This encryption method is mainly used for identity authentication to determine whether you are the owner of the safe.
Generally, we add the SSH Public Key in Github.
We told Github the public key and accessed it through the private key. We found that the safe can be opened, so we can be sure that I have access permissions for this Github repository.
Information is transmitted from the private key to the public key.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.