Crack sha256 when you know the pass form -


is possible write code can crack sha256 hash when know form of password? example password form *-********** 12-13 characters long and:

  1. the first char 1 number 1 25
  2. second 1 hyphen
  3. in each char third 1 end, can put a...z, a...z , 0...9

after guessing each pass, code converts pass sha256 , see whether result hash equal our hash or not , print correct pass.

i know possible numbers big number (26+26+10)^10 want know that:

  1. is possible write such code?
  2. if yes, possible run whole code in less 1 day (because think takes lot of time complete whole code)?
  3. since can't ask write code me, how , can ask code?

you cannot "crack" sha256 hash no matter how information know plaintext (assuming crack mean derive plaintext hash). if knew password not determine procedure reversing hash. in technical terms, there no known way perform preimage attack on sha256 hash.

that means have resort guessing or brute forcing password:

you have prefix, can value in [1-25]- , 10 additional characters in [a-za-z0-9]. means total number of possible passwords is: 25 * 62^10 or 20,982,484,146,708,505,600.

if able compute , check billion passwords per second take 20,982,484,146 seconds generate every possible hash. if start you'll finished in 665 years.

if able leverage more computing power , generate trillion hashes per second take bit more half year. news computing hashes can done in parallel, easy utilize multiple machines. bad news kind of computing power isn't going cheap.

to answer questions:

  1. is possible write such code? possible write program iterate on entire range of possible passwords , check against hash(es) want determine plaintext for.
  2. if yes, possible run whole code in less 1 day. yes, if can compute , check around 10^15 hashes per second.
  3. how , can ask code? least of problems.

fortunately, since bitcoin uses sha256, pretty easy find rough numbers on amount of computing power takes generate number of hashes need.

if numbers in this article correct raspberry pi can generate 2*10^5 hashes per second. believe newer raspberry pis more powerful i'm going double 4*10^5. need generate 10^15 hashes per second done in less day.

you're going need 250,000,000 raspberry pis.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -