“随机数”和“随机数”有什么区别?和“GUID”?

发布于 2024-09-09 03:14:26 字数 312 浏览 2 评论 0原文

这个问题这里是关于创建身份验证方案。 AviD 给出的接受答案指出

您使用的加密随机数是 同样重要的是,许多人倾向于跳过 过度 - 例如“让我们只使用 GUID”...


这引出了我的问题。为什么不直接使用 GUID 呢?

This question here is about creating an authentication scheme. The accepted answer given by AviD states

Your use of a cryptographic nonce is
also important, that many tend to skip
over - e.g. "lets just use a GUID"...


Which leads me to my question. Why wouldn't you just use a GUID?

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

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

发布评论

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

评论(2

变身佩奇 2024-09-16 03:14:26

每当您随机生成一个用于密码学的随机数时,您应该确实确定该数字确实是随机的。 GUID 往往是基于可以发现、猜测或推断的值生成的,例如当前系统时间或网卡 MAC 地址,因此可能会猜测到随机数。

Whenever you randomly generate a random number intended to be used in cryptography, you should be really sure that the number is really random. GUIDs tend to be generated based on values that can be discovered, guessed or inferred, such as current system time or a network card MAC address, and thus the nonce could potentially be guessed.

相思故 2024-09-16 03:14:26

随机数应该是随机的(或者至少是不可猜测的)。 GUID 有相当多的非随机性(我不确定 GUID 中有多少位熵)。

Nonces should be random (or at least non-guessable). GUIDs have quite a bit of non-randomness to them (I'm not sure how many bits of entropy are in a GUID).

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