Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the principle of MySQL password authentication?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces you what is the principle of MySQL password authentication, the content is very detailed, interested friends can refer to, hope to be helpful to you.

1. The server will randomly generate a random string to send to the client.

two。 After the client receives the random string, it encrypts the hash.

The first step is to hash the password to get the hash value hash _ stage1; eg.hash_stage1=sha1 ("password")

The second step, the second hash, to get hash_stage2; eg. Hash_stage2=sha1 (hash_stage1)

The third step is to hash the value obtained by the password secondary hash with random string to get hash_stage3; eg. Hash_stage3=sha1 ("random string", hash_stage2)

In the fourth step, XOR processing is ready to be sent to the server to get reply=xor (hash_stage1,hash_stage3).

Finally, the value of reply is sent to the server. Www.2cto.com

3. After receiving reply, the server also performs hash operation.

The first step is to hash the saved password hashpassword in hash form with random string to get server_hash_stage1=sha1 ("random string", "hashpassword")

The second step is to XOR the reply sent by the client and the hash value just obtained to get xor_value; eg. Xor_value=xor (reply,server_hash_stage1)

The third step is to hash the XOR value to get server_hash_stage2; eg. Server_hash_stage2=sha1 (server_hash_stage1)

The fourth step is to verify that the resulting hash value server _ hash_stage2 is compared with the saved password hashpassword. Eg. Server_hash_stage2==hashpassword, if it is equal, the verification passes.

What is the principle of MySQL password authentication is shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report