“随机数”和“随机数”有什么区别?和“GUID”?
这个问题这里是关于创建身份验证方案。 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
每当您随机生成一个用于密码学的随机数时,您应该确实确定该数字确实是随机的。 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.
随机数应该是随机的(或者至少是不可猜测的)。 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).