如何从哈希值中获取原始值? [英] how can get original value from hash value?

查看:185
本文介绍了如何从哈希值中获取原始值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的原始文字:"sanjay" SHA-1文本:"25ecbcb559d14a98e4665d6830ac5c99991d7c25"

My original Text : "sanjay" SHA-1 Text : "25ecbcb559d14a98e4665d6830ac5c99991d7c25"

现在如何从该哈希值中获取原始值-"sanjay"?

Now how can i get original value - "sanjay" from this hash value ?

有任何代码,算法或方法吗?

is there any code or algorithm or method?

推荐答案

否.这通常是重点-哈希处理通常是单向的.

No. That's usually the point -- the process of hashing is normally one-way.

这对于为密码或密码设计的哈希特别重要-与设计为哈希(例如,哈希映射)的哈希不同.同样,在输入长度不受限制的情况下,将产生无限数量的值,从而导致相同的哈希值.

This is especially important for hashes designed for passwords or cryptology -- which differ from hashes designed, for say, hash-maps. Also, with an unbounded input length, there is an infinite amount of values which result in the same hash.

可以使用的一种方法是散列一堆值(例如,来自aaaaaaaa-zzzzzzz的蛮力)并查看哪个值具有相同的散列.如果找到了这个,您就找到了价值"(时间并不便宜). 彩虹表"适用于此想法(但使用空间而不是时间),但被诺斯盐击败.

One method that can be used is to hash a bunch of values (e.g. brute-force from aaaaaaaa-zzzzzzz) and see which value has the same hash. If you have found this, you have found "the value" (the time is not cheap). "Rainbow tables" work on this idea (but use space instead of time), but are defeated with a nonce salt.

这篇关于如何从哈希值中获取原始值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆