是否可以解密SHA1

是否可以解密SHA1

本文介绍了是否可以解密SHA1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用SHA1算法解密(保留实际字符串)保存在db中的密码.

Is it possible to decrypt(retain the actual string) the password which is saved in db using SHA1 algorithm.

示例:如果密码是 "password" 并且它以 "sha1$4fb4c$2bc693f8a86e2d87f757c382a32e3d50fc945b24" 的形式存储在 db 中,是否有机会保留相同的 密码"(字符串) 来自 sha1$4fb4c$2bc693f8a86e2d87f757c382a32e3d50fc945b24"

Example:If password is "password" and it is stored in db as "sha1$4fb4c$2bc693f8a86e2d87f757c382a32e3d50fc945b24",is any chance to retain the same "password"(string) from "sha1$4fb4c$2bc693f8a86e2d87f757c382a32e3d50fc945b24"

推荐答案

SHA1 是一个加密哈希函数,所以设计的目的是为了避免你想要做的事情.

SHA1 is a cryptographic hash function, so the intention of the design was to avoid what you are trying to do.

然而,打破 SHA1 哈希在技术上是可能的.您可以通过尝试猜测散列的内容来做到这一点.这种蛮力方法当然效率不高,但这几乎是唯一的方法.

However, breaking a SHA1 hash is technically possible. You can do so by just trying to guess what was hashed. This brute-force approach is of course not efficient, but that's pretty much the only way.

所以回答您的问题:是的,这是可能的,但您需要强大的计算能力.一些研究人员估计它的成本为 $70k - $120k.

So to answer your question: yes, it is possible, but you need significant computing power. Some researchers estimate that it costs $70k - $120k.

据我们今天所知,除了猜测散列输入之外别无他法.这是因为诸如 mod 之类的操作会从您的输入中消除信息.假设您计算 mod 5 并得到 0.输入是什么?是 05 还是 500?你看,在这种情况下你不能真正回去".

As far as we can tell today, there is also no other way but to guess the hashed input. This is because operations such as mod eliminate information from your input. Suppose you calculate mod 5 and you get 0. What was the input? Was it 0, 5 or 500? You see, you can't really 'go back' in this case.

这篇关于是否可以解密SHA1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 03:38