如何识别哈希字符串?我怎么知道它是MD5,SHA1,SHA256还是其他哈希? [英] How can I Identify a Hash string? How do I know if it is an MD5, SHA1, SHA256 or other hash?

查看:768
本文介绍了如何识别哈希字符串?我怎么知道它是MD5,SHA1,SHA256还是其他哈希?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经能够基于一串文本生成哈希。但我想在someones文件中拆分文本并尝试确定哈希的类型,找到这个的方法是什么。



MSDN仅显示如何通过比较验证哈希值,但不是通过识别何种类型的哈希值它是。整晚都在寻找,放弃并上床睡觉。



正在寻找类似在线哈希ID 但在MSDN中

I'm already able to generate a hash based on a string of text. But I want to split the text in someones file and try to determine the type of hash, what would be the method to find this.

MSDN Only shows how to verify a hash by comparison, but not by identifying what type of hash it is. Tried searching all night, gave up and went to bed.

Was looking for something similar to Online Hash ID but within MSDN

推荐答案

无法识别用于生成哈希值的哈希算法。您必须拥有生成哈希的原始源代码。
It's not possible to identify the hash algorithm used to generate a hash value. You have to have the original source code that generated the hash.


除了解决方案2.不仅不可能。我认为一些更强硬的陈述是正确的:
In addition to Solution 2. Not only it is impossible. I think some stronger statements are correct:


  1. 没有哈希类型这样的概念,或者说,哈希函数类型。
  2. 确定用于生成给定散列值的函数的假设能力不是加密散列函数的必要条件。
  3. 确定用于生成给定散列值的函数的假设能力将与要求相矛盾对于加密哈希函数。



顺便说一下,如果一个人知道用于计算函数值的特定函数/算法,那么这个信息对于在此函数的输入中计算原始图像。这是对加密哈希函数的要求的结果。



要理解它,您需要了解加密哈希函数的概念,其目的和要求算法: https://en.wikipedia.org/wiki/Cryptographic_hash_function [ ^ ]。



根据此目的,没有这样的情况,用于产生某些给定散列值的特定加密散列函数的信息可能是有用的。只有开发团队成员才需要这样的知识,以确保使用正确的功能 - 这种功能的候选者已被破坏,不应用于加密目的。







在查看问题的第8节后,我甚至浪费了一些时间来测试在线哈希ID服务 。我不知道它是为什么编写的,但当然它不会识别哈希类型。 我认为这是一个纯粹的伪造。作为对hash的回应,它只是返回给定大小的散列的散列函数列表,所有这些函数为作者所知。这就是所有秘密。



-SA


By the way, if one knows a particular function/algorithm which was used for calculation of the function value, this information should be useless for calculation of the original image in input of this function. This is the consequence from the requirements to a cryptographic hash function.

To understand it, you need to understand the notion of cryptographic hash function, its purpose, and requirements imposed on the algorithm: https://en.wikipedia.org/wiki/Cryptographic_hash_function[^].

According to this purpose, there are no such situations where the information on a particular cryptographic hash function used to produce some given hash value could possibly be useful. Such knowledge is only needed for the members of development team, to make sure that correct function is used — such candidates for such function have been broken and should never be used for cryptographic purposes.



After looking at v.8 of the question I even wasted some time to "test" the "Online hash ID" "service". I have no idea what it was written for, but of course it does not "identity" the "hash type". I think this is a pure bogus. In response to hash, it simply list of hash function returning the hash of given size, all such functions known to the author. That's all the "secret".

—SA


这篇关于如何识别哈希字符串?我怎么知道它是MD5,SHA1,SHA256还是其他哈希?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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