当前位置:网站首页>MD5 encryption
MD5 encryption
2022-07-02 15:28:00 【Killer is not too cold!】
MD5 encryption
Basic concept information
** First, what is encryption ?** encryption , Is a special algorithm to change the original information data , Enables unauthorized users to obtain encrypted information , But I don't know how to decrypt , Still unable to understand the content of the information .
** Symmetric encryption ?** Symmetric encryption uses the same key for encryption and decryption .
** Asymmetric encryption ?** Asymmetric encryption uses different keys for encryption and decryption . Cailin now wants to pass a piece of data to Bob , But if Kailin uses clear text transmission on the Internet , She is worried that her information will be obtained by others , So what to do ? Cailin can get Bob's public key first , Then use Bob's public key to encrypt the plaintext , Encrypted into ciphertext , When Bob finally got the ciphertext , Then use your private key to decrypt , That's it .
Abstract algorithm ? The digest algorithm is also called hash algorithm , Hash algorithm , Data of any length can be converted into a Fixed length , Irreversible numbers . What is fixed length ? It's your data, no matter how long , Finally, it is converted into a summary, and then the length is fixed ; What is an irreversible number ? Unlike symmetric algorithm and asymmetric algorithm , Because they can be decrypted after encryption , However, the abstract algorithm cannot obtain the original text through decryption after encryption , Its encryption is irreversible .
As long as the original text is different , The result of calculation must be different ( There is little need to consider repetition ). The algorithm is used to compare whether the information sources are consistent , Because as long as the data source changes , The summary information obtained must be different , Usually used for signature verification .
The characteristics of message digest algorithm :
- No matter how long the message is entered , Always calculate the length of the message that comes out of the digest .
- The message digest is not really random , Because the same message is used for two abstracts , The result must be the same .
- The message digest function is a one-way function without trap gate , That is to say, only forward information summarization can be carried out , No message can be recovered from the digest , Even no information related to the original information can be found .
Common summary algorithms are :MD5,SHA-1,MAC,CRC etc. .
It is widely used to verify the integrity of data and the transmission and storage of sensitive information .
MD5 Algorithm :MD5 Information digest algorithm , A widely used cryptographic hash function , I can produce one 128 position (16 byte ) Hash value , Used to ensure complete and consistent transmission of information .2004 year , confirmed MD5 Algorithms can't prevent collisions (collision), So it doesn't apply to security certification , Such as SSL Public key authentication or digital signature .
** What is called collision ?** We use MD5 Encrypted ciphertext cannot be restored , But if we have one to save common passwords and MD5 Encrypted database of ciphertext mapping relationship , Then we can compare the ciphertext , And then know what the corresponding original text is .
Basic applications
**md5-min.js and md5.js The difference between ?**md5.js Well formed js, It's for developers ;md5-min.js It's a compressed version js, It's for browsers .
md5 The front-end encryption is as follows :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript" src="./md5.js"></script>
<script type="text/javascript"> /** * md5 After encryption admin => 21232f297a57a5a743894a0e4a801fc3 * */ console.log("md5 => "+hex_md5("admin")); /** * Add salt (MD5 There is no way to decrypt by algorithm , But it can be brutally cracked 【 Rainbow watch 】, Not enough security , The rainbow table is actually a plaintext and ciphertext * Mapped database tables ) * Salt is a specific string ( Make it your own ) Of , Used to mix with encrypted content , The mixed content is carried out again md5 encryption , Data is more secure * such as : * admin salt => 0x3d1eaaa * Let the text and salt Mix ( at will ) * admin0x3d1eaaa * Then the mixed text is md5 Encryption operation , In this way, even if our ciphertext is cracked , But it also doesn't know what our plaintext is * */ </script>
</head>
<body class="index">
I am a body
</body>
</html>
边栏推荐
猜你喜欢
08_ strand
Equipped with Ti am62x processor, Feiling fet6254-c core board is launched!
4. Jctree related knowledge learning
04_ Stack
. Net again! Happy 20th birthday
Set set you don't know
Solve the problem of frequent interruption of mobaxterm remote connection
Yolov5 code reproduction and server operation
05_ queue
03_ Linear table_ Linked list
随机推荐
搭建自己的语义分割平台deeplabV3+
Case introduction and problem analysis of microservice
Application and practice of Jenkins pipeline
LeetCode刷题——统计各位数字都不同的数字个数#357#Medium
List集合&UML图
18_Redis_Redis主从复制&&集群搭建
14_Redis_乐观锁
Build your own semantic segmentation platform deeplabv3+
08_ 串
TiDB 软件和硬件环境建议配置
Kibana basic operation
学习使用php将时间戳转换为大写日期的方法代码示例
14_ Redis_ Optimistic lock
How to choose a third-party software testing organization for automated acceptance testing of mobile applications
Libcurl Lesson 13 static library introduces OpenSSL compilation dependency
使用 TiUP 部署 TiDB 集群
Recommended configuration of tidb software and hardware environment
Engineer evaluation | rk3568 development board hands-on test
02_线性表_顺序表
21_Redis_浅析Redis缓存穿透和雪崩