文本处理——提取明文

Text Processing - Extracting Cleartext

我下面的脚本只是用 sha256sum 散列 "Bob"。然而,有可能逆转这个过程吗?因此,基本上使用脚本的输出来查找明文 'Bob'.

#!/bash/bash
echo -n Bob | sha256sum

我在网上查过这个问题,但所有主题都是关于散列字符串的,而不是相反。如果这是一个愚蠢的问题,我很抱歉,因为我是脚本新手。

sha256sum 应该是单向散列。如果你能轻易地反转它,那就证明它是失败的。

sha256sum 被设计为 加密散列函数 并且 Wikipedia explains:

The ideal cryptographic hash function has four main properties:

  • it is quick to compute the hash value for any given message

  • it is infeasible to generate a message from its hash value except by trying all possible messages

  • a small change to a message should change the hash value so extensively that the new hash value appears uncorrelated with the old hash value

  • it is infeasible to find two different messages with the same hash value

所以,不,没有明智的方法来反转它。