当前位置:网站首页>Why is sha256 irreversible and how secure is sha256
Why is sha256 irreversible and how secure is sha256
2022-07-21 16:04:00 【Hak tribe】
sha256 It is one of the most popular computer algorithms , It is also one of the strongest encryption functions . because sha256 Very powerful , Therefore, it is used in cryptocurrencies such as bitcoin .sha256 Is an unbreakable function , its 256 The bit key has never been compromised . that ,sha256 How safe is it , Why? sha256 Irreversible ? This article will discuss these problems .
sha256 Why not reversible
sha256 It's irreversible . because sha256 Is a definite one-way hash function , Developed by the national security agency SHA-2 One of the members of the cryptographic hash function . in other words sha256 It's a mathematical function , Accept input of any size , But return fixed size input , Like a digital fingerprint of a file or string .
meanwhile , It is also deterministic , Because the same input always produces the same output . Irreversibility , When you know x Of HASH value , It's impossible to work out x; The so-called no conflict , When you know x, I can't figure out one y, send x And y Of HASH Same value .
sha256 How to work ?
sha256 Very safe , Even if we change only one digit in the input , The output will also change completely . For messages of any length ,sha256 There will be a 256 bit Long hash value , It's called a message digest . This summary is equivalent to a length of 32 An array of bytes , Usually use a length of 64 Hexadecimal string to represent . in other words , No matter how long the input is , It always comes back 64 A hexadecimal string of characters .
Here are some examples
stay md5、sha256 Online encryption and decryption website :https://md5.cn/ Perform the following tests .
Input :Bye
After the hash function SHA256 The resulting hash value is :128901223aac8df3b89cd75d7ec644f9924ed9dcd01e0c65ae99334a3cf9273a
Input :bye
After the hash function sha256 The resulting hash value is :
b49f425a7e1f9cff3856329ada223f2f9d368f15a00cf48df16ca95986137fe8
From the example above , It's not hard to see , No matter what the input length , It will return a 64 Character string . and , Even if a letter becomes lowercase, it will completely change the hash value , We can't pass the hash function , Guess Bye and bye Very similar .
sha256 How safe is it ?
sha256 Very safe , as a result of : Only by inputting the same file or string can we get the same hash value , Even a small adjustment will completely change the output hash value . You can try some interesting things with this algorithm , Like taking a picture , adopt sha256 function , The output hash value may never appear in this world .
sha256 Is a one-way hash function , Therefore, it is irreversible . meanwhile , Because it has a strong ability to resist strong collisions , And the same input information passes sha256 The output value of is unique , When used SHA256 When the encrypted information is modified , Even small modifications , The results will be completely different . therefore sha256 Very safe .
边栏推荐
猜你喜欢
【STC15控制WS2812 RGB彩灯级联】
【DIP/简易数字图像处理系统实现】高分课程设计论文分享
Esp32-cam - intranet penetration tutorial
学习白银k线图应该从哪几方面入手
C | | structure consortium enumeration type
-实体建模-
ESP8266-NodeMCU——使用WiFiManager库连接wifi
修改标注样式文字填充颜色
TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation
What aspects should we start from to learn the silver K-line chart
随机推荐
Dot multiplication
DTOS帝拓思的3D引擎将取代游戏引擎巨兽,实现国产化替代
What can I do with buying a cloud server? What are the new ways to play?
根据圆心角求离心角
阿里云国际版账户登录不上去什么原因?
Five reasons why developers use Klocwork for software security
How to make localstorage support expiration time setting?
[error]runtimeerror: expected scalar type double but found float (torch)
Wechat vaccine appointment applet graduation design of applet completion work (2) applet function
Because mongodb didn't get started, I lost an internship
Word report reference format
Realize joint testing through TPT fusion platform
【Flutter -- 实战】快速入门 Flutter
开发人员使用Klocwork进行软件安全的五大原因
Net core 3.1 solution to sign oidc reporting correlation failed when logging in with identityserver
2022 eye care lamp exhibition, traditional Chinese medicine eye conditioning exhibition, Shandong eye health exhibition, China eye Expo
Imitate the widget control of VTK, and make the control that draws a rectangle
解决突然跳出命令行(闪烁)
Draw circles and rectangles with VTK controls
专注跨境支付一体化服务 iPayLinks荣获《财资》(The Asset)3A亚洲奖!