当前位置:网站首页>加密和解密
加密和解密
2022-07-04 03:59:00 【Lzg_na】
1. 概述
加密分为单向加密
和双向加密
单向加密:单向加密是不可逆加密,生成密文后无法根据密文得到原始内容。所以单向加密往往是为了验证内容的完整性和原始性,而不是为了安全性。例如MD5算法
双向加密:双向加密指生成密文后,可以解密为明文。通常应用于安全传输和权限申请。例如RSA算法.
1.1 双向加密简介
双向解密又大致分为对称加密
和非对称加密
对称加密
:加密和解密是使用的同一个密钥
,非对称加密
:加密和解密使用的密钥不相同,加密使用私钥,解密使用公钥,必须配对使用。
1.1.1 对称加密
- 优点:对称加密和解密算法比较快,适合对大量数据进行加密。
- 缺点:由于加密和解密使用的密钥相同,容易破解,需要大量密钥对不同的消息进行加密和解密。
1.1.2 非对称加密
- 优点:公钥进行加密,私钥进行解密。或者使用私钥签名,使用公钥验签。安全性高,私钥和公钥分开保管,不用传输公钥和密钥.
- 缺点:非对称加密非常耗费性能,非常非常。
说到这里必须说一下公钥和私钥的作用:
公钥和私钥必须成对出现,两者都可用于加密,但必须使用对方解密。不同场景下使用不同。
- 公钥加密,私钥解密:保证密文传输,突出保密。
- 私钥加密,公钥解密:进行签名和验签,保证签名没有被修改过,突出真实。
边栏推荐
- 【MATLAB】通信信号调制通用函数 — 窄带高斯白噪声的生成
- Use units of measure in your code for a better life
- 6-5漏洞利用-SSH弱口令破解利用
- Many founders of technology companies provided enterpriser first with a round C financing of up to US $158million to help it invest in the next generation of global innovators
- Operate the server remotely more gracefully: the practice of paramiko Library
- Drozer tool
- Asahi Kasei participated in the 5th China International Import Expo (5th ciie) for the first time
- Network equipment emergency response Guide
- Rhcsa 01 - create partitions and file systems
- Kivy tutorial 07 component and attribute binding implementation button button click to modify the label component (tutorial includes source code)
猜你喜欢
Unity 接入天气系统
Formatted text of Kivy tutorial (tutorial includes source code)
[security attack and Defense] how much do you know about serialization and deserialization?
GUI 应用:socket 网络聊天室
附件六:防守工作簡報.docx
1. Mx6u-alpha development board (LED drive experiment in C language version)
Annex VI: defense work briefing docx
Yolov6 practice: teach you to use yolov6 for object detection (with data set)
Many founders of technology companies provided enterpriser first with a round C financing of up to US $158million to help it invest in the next generation of global innovators
RPC - grpc simple demo - learn / practice
随机推荐
Deep parsing structured exception handling (SEH) - by Matt Pietrek
Architecture practice camp - graduation project of module 9 of phase 6
MIN_ RTO dialog
【MATLAB】通信信号调制通用函数 — 傅里叶变换
A beautiful API document generation tool
Kivy tutorial custom fonts (tutorial with source code)
【MATLAB】MATLAB 仿真模拟调制系统 — VSB 系统
Kivy教程之 自定义字体(教程含源码)
PaddleHub人脸识别方案部署,将训练好的模型在pytchrom中进行部署应用
附件六:防守工作簡報.docx
[go] database framework Gorm
最长递增子序列问题(你真的会了吗)
Cmake compilation option setting in ros2
自动化测试selenium基础篇——webdriverAPI
Keysight n9320b RF spectrum analyzer solves tire pressure monitoring scheme
Rhcsa 07 - user and group management
MySQL JDBC编程
MySQL JDBC programming
How to view installed r packages in R language
红队视角下的防御体系突破之第一篇介绍、阶段、方法