当前位置:网站首页>Encrypt / decrypt public / private key
Encrypt / decrypt public / private key
2022-06-10 05:40:00 【Driver: Zhaosi】
One : encryption / Decrypt
encryption : The process of converting plaintext into ciphertext
Decrypt : The process of converting ciphertext into plaintext
Two : Secret key
The essence of a secret key is a string , Its unit of measurement is bit( position ), According to the way the secret key is used , Encryption can be divided into two categories , Symmetric and asymmetric encryption , Symmetric encryption means that both encryption and decryption use the same secret key , At present, the most popular symmetric encryption algorithm is AES encryption algorithm , The length of the secret key is 128、192 or 256, High security , Good performance .
- Encrypted packet mode : Encrypt plaintext groups , Used in wechat payment AEAD_AES_256_GCM Group encryption .
Asymmetric encryption means that only the private key can be used for decryption after public key encryption , In turn, , After the private key is encrypted, it can only be decrypted with the public key , among RSA Encryption algorithm is the most famous asymmetric encryption algorithm .
for instance : If Tom、Jerry To a friend zhangsan Send a message ,zhangsan You can distribute your public key to Tom and Jerry, such Tom and Jerry You can use this public key to encrypt , At this time, only those who have the private key zhangsan Can decrypt the message , Ensure the confidentiality of the message . Conversely, suppose zhangsan Encrypt with the private key ,Tom And Jerry After receiving the message, use zhangsan Decrypt the distributed public key , Successful decryption indicates that the message is zhangsan Sent .
3、 ... and : Symmetric encryption VS Asymmetric encryption
Symmetric encryption :
advantage ; It's fast
shortcoming : The secret key needs to be shared by both sides of the information exchange , Once stolen , The message will be cracked
Asymmetric encryption :
advantage : Private key is strictly confidential , Public key arbitrary distribution , Hackers can't crack the ciphertext after obtaining the public key
shortcoming : It's very slow
Four :HTTPS Encrypted transmission process

stay HTTPS In transit , Both transmission speed and transmission security shall be ensured , At this time, the server public key can be transmitted asymmetrically , After the server obtains the encrypted session master secret key , Then decrypt the server private key to obtain the session master key , Then use symmetric encryption for data transmission to ensure transmission efficiency .
边栏推荐
- Sequential search, binary search
- Flutter file operation
- npm命令大全
- Hevc HM learning 02
- Model Lightweight - cutting distillation Series yolov5 nonestructive Cutting (attached source)
- 浏览器安装这款插件瞬间漂亮多了,有类似苹果手机一样的自定义组件功能
- . Net C Foundation (7): interface - how people interact with cats
- Common English abbreviations of display
- Curator - implement service registration and discovery
- 最高奖项!2022数博会领先科技成果“新技术”授予OceanBase数据库
猜你喜欢

An analysis of DuPont analysis: the financial situation of East China Construction Group Co., Ltd

生成boot_para.img

MySQL Part 2 (core technology)

Three principles of layout design

The meaning of likelihood function

QT配置OpenCV-4.5.1并运行程序

Thesis reading (53):universal advantageous perturbations

Harbor cannot log in with the correct password

Landing of global organizational structure control

LeetCode326-3的幂-数学
随机推荐
冒泡排序bubble_sort
每日一题—LeetCode497—非重叠矩形中的随机点-前缀和-二分
英语太差怎么办,快来写一个“百词斩”软件给自己背单词
MKS h3615ns DC motor drive instruction manual
Win10 installation process
AssertJ 的异常(Exception )断言
MTK based on gat tool and spoffinedebugsuite tool dump capture and parsing
Flutter DIO example
The world's first financial chart database test benchmark project was approved, and ant group opened patent Co Construction
Best practice | zero basis implementation of applet voice input method
The R language catools package divides the data, randomforest package constructs the random forest model, uses the predict function to carry out model prediction and reasoning on the test data set, an
Simple and interesting Snake growth game -- greedy snake
Import Base64 collection and export large pictures
[how much management knows] Chinese "other", English "other", Japanese "other"
. Net C Foundation (7): interface - how people interact with cats
【对话直播】图计算是下一个科技前沿
【软件工程导论】知识点汇总 | 适用于考试复习 | 轻松通过考试
Sql2008 database
openGauss数据库性能调优概述及实例分析
第六章 软件测试工具(此章完结)