简体   繁体   English

如何用彩虹表处理不同长度的破解密码?

[英]How to handle cracking passwords of different lengths with rainbow tables?

I'm doing a rainbow attack for homework and I'm getting some trouble on cracking passwords of different lengths. 我正在做家庭作业的彩虹攻击,我在破解不同长度的密码方面遇到了一些麻烦。 It means that I can crack every password of fixed length 8 for example in +- 2 minutes. 这意味着我可以破解固定长度为8的每个密码,例如在+ - 2分钟内。 However, I don't know how to handle passwords from lengths 5 to 8 without losing much time. 但是,我不知道如何处理长度为58的密码而不会浪费太多时间。

Supposing that it's impossible to know the length of the password only by having the hash, I've already tried to crack the hash by trying every length one by one. 假设只有通过哈希才能知道密码的长度,我已经尝试通过逐个尝试每个长度来破解哈希。 It means that I spend 2 x 4 minutes to crack only 1 password. 这意味着我花了2 x 4分钟来破解只有1个密码。

Should I reduce every possible password with the maximum password length and then check only first characters or it is a bad idea? 我应该用最大密码长度减少每个可能的密码,然后只检查第一个字符或者这是个坏主意吗?

I'm using a lower alphanumeric case rainbow table, sha256 algorithm and 50 000 different R functions. 我正在使用较低的字母数字案例彩虹表, sha256算法和50 000个不同的R函数。 I'd like to find a way to accelerate this operation. 我想找到一种加速这种操作的方法。 Thanks to anyone who can help. 感谢任何能提供帮助的人。

I suspect you're on the wrong road for improving performance. 我怀疑你在改善表现方面走错了路。 As you seem to suspect, shorter passwords are not related in any useful way to longer passwords. 您似乎怀疑,较短的密码与更长密码的任何有用方式无关。 There's no relationship between all passwords that start with a particular letter (assuming the hash function is cryptographic). 所有以特定字母开头的密码之间没有任何关系(假设散列函数是加密的)。

The important point is that the 7 character space is 36 times smaller than 8 character space (lowercase alphanumeric), and the 6 character space is 36 times smaller than that. 重要的是,7字符空间比8字符空间(小写字母数字)小36倍,6字符空间比它小36倍。 So checking the entire 6 character space costs around 0.1% of the 8 character space, and the smaller spaces are essentially free. 因此,检查整个6个字符空间的成本约为8个字符空间的0.1%,较小的空间基本上是免费的。

So your performance work should be focused on the per-hash cost. 因此,您的性能工作应该专注于每哈希成本。 You won't get much benefit by trying to short-cut the shorter password lengths because they represent such a tiny part of the search space. 尝试缩短较短的密码长度不会带来太多好处,因为它们代表搜索空间的一小部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM