gpt4 book ai didi

language-agnostic - 是否有任何不明显的滥用 GUIDes 的方式?

转载 作者:行者123 更新时间:2023-12-04 07:48:44 28 4
gpt4 key购买 nike

GUID 通常用于唯一标识各种实体 - 来自外部系统、文件等的请求。像魔术一样工作 - 您调用“GiveMeGuid()”(Windows 上的 UuidCreate())函数 - 一个全新的 GUID 为您服务。

鉴于我的代码每次需要一个新的 GUID 时都会真正调用“GiveMeGuid()”函数,是否有任何不那么明显的方法可以滥用它?

最佳答案

刚刚找到一个老问题的答案:How deterministic Are .Net GUIDs? .重新引用它:

It's not a complete answer, but I can tell you that the 13th hex digit is always 4 because it denotes the version of the algorithm used to generate the GUID (id est, v4); also, and I quote Wikipedia:

Cryptanalysis of the WinAPI GUID generator shows that, since the sequence of V4 GUIDs is pseudo-random, given the initial state one can predict up to the next 250 000 GUIDs returned by the function UuidCreate. This is why GUIDs should not be used in cryptography, e.g., as random keys.



所以,如果你幸运地得到相同的种子,你将依次破坏 25 万个镜像。引用另一个 Wikipedia piece :

While each generated GUID is not guaranteed to be unique, the total number of unique keys (2128 or 3.4×1038) is so large that the probability of the same number being generated twice is extremely small.



底线:可能是一种误用形式,它认为 GUID 始终是唯一的。

关于language-agnostic - 是否有任何不明显的滥用 GUIDes 的方式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1907513/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com