现在的位置: 首页 > 综合 > 正文

Crazy Test: How much time will be consume to exhaustive 16 bits numeral for all possible?

2014年01月30日 ⁄ 综合 ⁄ 共 2168字 ⁄ 字号 评论关闭

Scenario:

This is a interesting personal testing during my job. I have been had a question about code-breaking. And I always want to find out how many time will be consume if a person want to use the method of exhaustion to crack a 16 bits password.

OK, following is my testing. If someone wants to crack a 16 bits password with the method of exhaustion. He/She has to generate 16 bit sequence in real time. (Of course, you can use password dictionary instead of generate sequence in real time. But that will be took up many space on your disk.)

To simplify our question, I developed a simple code to generate 8 bits sequence with recursion.

Code:

  
Invoking:
  

Result:

Now, you can see that it will spend 8 seconds to trave all 8 bit sequence. There must be 100,000,000 possibilities. So, if someone wants to trave all possibilities for 16 bit sequence, there should be 10,000,000,000,000,000 = 100,000,000 X 100,000,000  numbers. Therefore, it’s not hard to estimate the time consuming should be 8X100,000,000=800,000,000 second.

To be clear, 800,000,000 seconds = 800,000,000/60/60/24/365 = 25.3678 years.

25 years is really a huge time consuming to generate 16 bit numeral. In this case, we didn’t consider time consuming on other resource, like Network Communication Consume, the Max of System  Continuous Running… In addition, if one password includes alphabet, numeral and punctuation, the work will be more terrible.

To summary, I think we can say that if we want to crack a 16 bit sequence, we must find out an faster way to generate these sequences. Otherwise, we have to wait untill 25 years later.

This is a quick testing for my interesting. If you have any good idea, please kindly share with me.

Thanks!

Xianyi.Ye

yexianyi@hotmail.com

抱歉!评论已关闭.