彩虹表是使用GPU还是CPU运行的?

huangapple go评论70阅读模式
英文:

Does rainbow table run with GPU or CPU?

问题

我知道彩虹表,但这个问题是在面试中问我的,我无法回答。所以我的问题如标题所述,我想知道彩虹表是否使用GPU还是CPU。以及原因。提前谢谢!

我做了一些关于这个问题的研究,但一些资源说彩虹表使用GPU,一些说同时使用CPU,还有一些说两者都使用。所以我需要一个明确的答案。

英文:

I know about rainbow tables but this question was asked to me during an interview and I couldn't answer . So my question is as it's said in the title I want to know if rainbow tables use GPU or CPU. And the reason for that. Thank you in advance!

I did some research about this but some resources said that rainbow tables use GPU some said both CPU and some said both. So I need a clear answer.

答案1

得分: 1

答案是两者兼有也两者皆非。原因在于我们谈论的是彩虹表,即具有特定内容的数据结构,而通过术语“运行”,我们将这个主题扩展为一种算法,该算法可以生成彩虹表或搜索彩虹表,另一方面,我们谈论硬件,即GPU与CPU。

首先让我们了解一下什么是彩虹表。

简而言之,彩虹表是一张将所有可能的密钥与它们的值(考虑散列值)进行映射的表格。更多信息请参见这里:https://www.techtarget.com/whatis/definition/rainbow-table

它本身并不是在运行,就像文件默认情况下不在运行一样。但是,关于彩虹表,您可以采取一些措施。

首先,您可以生成它们,也就是说,您可以循环所有可能的值,运行您想要为这些输入映射的散列算法,并将结果存储在某个地方。

其次,您可以通过值(通常是哈希值)搜索密钥。

因此,正如我们所看到的,关于彩虹表已经有了两个主要操作,人们可以想象进一步的操作,比如对这些表进行索引,以便可以快速找到值等等。

现在,CPU和/或GPU是可以执行算法的媒介。您正在谈论破解密码,从技术上讲,CPU和GPU都可以用于这个任务。然而,您可能打算通过在更快的硬件上运行它来加速慢算法的过程,这就是为什么黑客可能选择使用GPU而不是CPU来运行彩虹表的生成和索引。但是,CPU也完全能够完成这个任务。至于搜索,这比生成完整映射要轻量级得多,因为您只需查看值的相等性,可能还使用索引,而不是为所有可能的值运行散列算法。

英文:

The answer is both and neither. The reason for this is that we are speaking about rainbow tables, that is, a data-structure with a specific content and, by the term "running", we extend this topic with an algorithm that either generates a rainbow table or searching for one and, on the other hand, we speak about hardware, that is, GPU vs. CPU.

Let's first understand what a rainbow table is.

To put it plainly, a rainbow table is a table which maps all possible keys with their values (think of hashes). See more here: https://www.techtarget.com/whatis/definition/rainbow-table

It is not running per se, just like a file is not running by default. But there are things you could do regarding rainbow tables.

First of all, you can generate them, that is, you can loop all possible values, run the hashing algorithm you want to map for these inputs and store the results somewhere.

Second, you can search a key by the value, usually the hash.

So, as we can see, there are already two main operations regarding rainbow tables and one can imagine further operations, such as indexing these tables so values can be quickly found, etc.

Now, CPU and/or GPU are mediums where algorithms can be executed. You are speaking about hacking passwords, so, technically speaking both CPU and GPU can be used for this task. Yet, you may intend to quicken the process of a slow algorithm by running it on faster hardware, this is why a hacker may choose to run the generation and indexing of a rainbow table using GPU rather than CPU. However, CPU is also perfectly capable for this task. As about searching, that's a more lightweight operation than generating the full mapping, as you are only looking at the equality of values, possibly using an index as well rather than running the hashing algorithm for all possible values.

huangapple
  • 本文由 发表于 2023年6月22日 16:07:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/76529772.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定