当前位置:网站首页>What is MD5
What is MD5
2022-07-07 09:20:00 【Wow, it's a small dish】
What is? md5?
md5 Is an irreversible hash algorithm
- Irreversible : Ciphertext can be obtained from plaintext , But you can't get plaintext from ciphertext .
- hash : Get a mapping value through a function , It could be repetitive ! But the probability of repetition is relatively low , For example, set characters + Case letters + Digital password , The probability of getting the same ciphertext through hashing is very, very low .
Application scenarios
Password storage :
On safety grounds , Native passwords cannot be stored directly in the database , If the data is leaked, it will cause many problems , therefore , Will pass the password md5 Encrypted and stored in the database , I'm sure you know that .Consistency check :
This is a usage I found when making payment signatures , Not used before . When the client calls the third-party payment , Need is to use http(s) Transmission request , Once the request is blocked , Be modified , For example, payment 1000 element , Intercepted as 1 element , After successful payment , The third party returns the result of successful payment , It will cause serious damage .So people use a ciphertext , Process the request parameters into a string : for example “amount=50&payMethod=native&id=012345”, Then encrypt the string , Send with the request . After receiving the request, make a consistency check with the plaintext parameters , Check the consistency of parameters .
Of course , The real encryption means involving payment will be more complex , For example, certificates and so on , Using this example is just an illustration md5 It can be used as a means to verify the consistency of passwords .
How to improve security
Add salt
Salt value is a meaningless random string , It can be a paragraph uuid, It can also be a random number . Adding salt can prevent hackers from using some comparison tables to crack simple passwords ( such as 123456,password These common passwords , The frequency of use is very high , You can find ).Multiple encryption
Will be encrypted md5 Re encrypt the password , Cycle a few times , The ciphertext thus formed cannot be found through the comparison table .
边栏推荐
- 信息安全实验四:Ip包监视程序实现
- Implementation of corner badge of Youmeng message push
- Cesium load vector data
- Record of structured interview
- Pytest+request+allure+excel interface automatic construction from 0 to 1 [five nails / flying Book notice]
- 二叉树高频题型
- H3C vxlan configuration
- Druid monitoring - Introduction to JMX usage and principle
- How does the project manager write the weekly summary and weekly plan?
- Serial port experiment - simple data sending and receiving
猜你喜欢
stm32和电机开发(从单机版到网络化)
Skill review of test engineer before interview
Entity of cesium data visualization (Part 1)
Pycharm importing third-party libraries
Unityshader introduction essentials personal summary -- Basic chapter (I)
四、机器学习基础
Zen - batch import test cases
Pytest installation (command line installation)
MySql数据库-索引-学习笔记
Reading notes of pyramid principle
随机推荐
串口實驗——簡單數據收發
Why is access to the external network prohibited for internal services of the company?
External interrupt to realize key experiment
OpenGL 3D graphics rendering
Unityshader introduction essentials personal summary -- Basic chapter (I)
OpenGL frame buffer
Unity shader beginner's Essentials (I) -- basic lighting notes
端口复用和重映像
UnityShader入门精要个人总结--基础篇(一)
PMP experience learning and sharing process
Locust performance test 3 (high concurrency, parameter correlation, assembly point)
2022-06-30 unity core 8 - model import
Locust performance test 2 (interface request)
Leetcode question brushing record (array) combination sum, combination sum II
2020 year end summary
NVIC中断优先级管理
Jenkins modifies the system time
Mysql database lock learning notes
Led analog and digital dimming
Mysql database index study notes