PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, August 14, 2022

[FIXED] How do I find Hash type If I know INPUT an OUTPUT

 August 14, 2022     cryptography, encryption, hash, output, types     No comments   

Issue

I have an encrypted hash and I don't know the HASH TYPE.
I have 2 alternatives, one of them is surely correct (matches INPUT with OUTPUT). How can I find the hashtype using them?

INPUT1 = 123459999
OUTPUT1 = eb6ae08384753f42445b7418661924c1632d36c06d1f3695e2ec90c192e7f92a

INPUT2 = 123-45-9999
OUTPUT2 = eb6ae08384753f42445b7418661924c1632d36c06d1f3695e2ec90c192e7f92a

I would rlly appreciate If someone can find the HASH TYPE or explain how should I find it, please :)


Solution

There is no specific way to know what hash function is used here. A cryptographic hash function produces output indistinguishable from random, so we can't distinguish between the outputs of different secure hash functions (or we'd be able to also distinguish them from random).

However, there are some common hash functions that are in use. Since this is a 256-bit output, you could try SHA-256, SHA-512/256, SHA-3-256, BLAKE2s, or BLAKE2b-256 and see if one of those produces the expected output. However, it is also equally plausible that somebody produced these hashes using a 256-bit MAC, like HMAC-SHA-256, which is essentially a hash function with a key, in which case there's no way to reproduce the hash without knowing the key.



Answered By - bk2204
Answer Checked By - Clifford M. (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing