“盐”有什么作用?在字符串到键(s2k)说明符中引用?

发布于 2024-09-01 22:38:59 字数 629 浏览 7 评论 0原文

字符串到键 (s2k) 说明符中的“salt”指的是什么?

它似乎是一个随机数生成器来改变事物,但我想知道“盐”代表什么?

例如,它写道:

3.6.1.2. Salted S2K

   This includes a "salt" value in the S2K specifier -- some arbitrary
   data -- that gets hashed along with the passphrase string, to help
   prevent dictionary attacks.

       Octet 0:        0x01
       Octet 1:        hash algorithm
       Octets 2-9:     8-octet salt value

   Salted S2K is exactly like Simple S2K, except that the input to the
   hash function(s) consists of the 8 octets of salt from the S2K
   specifier, followed by the passphrase.

但是盐没有定义,尽管它的含义似乎很清楚。

What does 'salt' refer to in string-to-key (s2k) specifier?

It appears to be a random number generator to shake things up, but I would like to know what 'salt' stands for?

For example it is written:

3.6.1.2. Salted S2K

   This includes a "salt" value in the S2K specifier -- some arbitrary
   data -- that gets hashed along with the passphrase string, to help
   prevent dictionary attacks.

       Octet 0:        0x01
       Octet 1:        hash algorithm
       Octets 2-9:     8-octet salt value

   Salted S2K is exactly like Simple S2K, except that the input to the
   hash function(s) consists of the 8 octets of salt from the S2K
   specifier, followed by the passphrase.

But salt is not defined, although its meaning seems clear.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

最终幸福 2024-09-08 22:38:59

来自维基百科

在密码学中,盐由随机位组成,用作密钥导出函数的输入之一。其他输入通常是密码或密码短语。密钥派生函数的输出存储为密码的加密版本。

盐只是一些用于提高系统安全性的位。它们有助于防止预计算字典攻击

From Wikipedia:

In cryptography, a salt comprises of random bits that are used as one of the inputs to a key derivation function. The other input is usually a password or passphrase. The output of the key derivation function is stored as the encrypted version of the password.

A salt is just some bits that are used to increase the security of the system. They help prevent pre-computed dictionary attacks.

影子的影子 2024-09-08 22:38:59

盐可以是任何一致的值。

可以是常量,也可以是用户 ID。如果两者都包含就更好了。

这用于防止预生成的彩虹表工作。

The salt can be any consistent value.

Either a constant, or the user ID. Better if it includes both.

This is used to prevent pre generated rainbow tables from working.

铃予 2024-09-08 22:38:59

我认为您是在问这个术语的起源,而不是定义。

是时候进行一轮民间词源了! (直到有人给出真正的答案。)

我的猜测是,这是烹饪中的类比:盐是一种改进的添加剂。一点点就会有很长的路要走。

I think you're asking the origin of the term, not the definition.

Time for a round of folk etymology! (Until someone gives the real answer.)

My guess is that it is an analogy from cooking: the salt is an improving additive. And a little bit goes a long way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文