标准 JavaScript 对象散列 table 实现中可能存在冲突?
Possible collisions in the standard JavaScript Object hash table implementation?
我最近碰巧想到 JavaScript 中的对象 属性 访问时间并遇到了 this question which seemed to reasonably suggest that it should be constant time. This also made me wonder if there is a limit on object property key lengths。显然,现代浏览器支持最大 2^30 的密钥长度,这对于哈希函数来说似乎相当不错。也就是说,
有没有人知道JS使用的哈希函数的种类
引擎?
是否可以实验性地创建 JavaScript 的碰撞
属性 访问器?
Is anyone aware of the kind of hash functions that is used by JS engines?
是的,他们的开发人员当然知道哈希函数及其存在的问题。事实上,attacks based on hash collisions 在 2011 年针对多种语言进行了演示,其中包括针对 node.js 服务器的 DOS 攻击。
v8 团队解决了这个问题,您可以在 https://v8project.blogspot.de/2017/08/about-that-hash-flooding-vulnerability.html 阅读详细信息。
Is it possible to experimentally create collisions of JavaScript's property accessors?
看起来是这样:https://github.com/hastebrot/V8-Hash-Collision-Generator
我最近碰巧想到 JavaScript 中的对象 属性 访问时间并遇到了 this question which seemed to reasonably suggest that it should be constant time. This also made me wonder if there is a limit on object property key lengths。显然,现代浏览器支持最大 2^30 的密钥长度,这对于哈希函数来说似乎相当不错。也就是说,
有没有人知道JS使用的哈希函数的种类 引擎?
是否可以实验性地创建 JavaScript 的碰撞 属性 访问器?
Is anyone aware of the kind of hash functions that is used by JS engines?
是的,他们的开发人员当然知道哈希函数及其存在的问题。事实上,attacks based on hash collisions 在 2011 年针对多种语言进行了演示,其中包括针对 node.js 服务器的 DOS 攻击。
v8 团队解决了这个问题,您可以在 https://v8project.blogspot.de/2017/08/about-that-hash-flooding-vulnerability.html 阅读详细信息。
Is it possible to experimentally create collisions of JavaScript's property accessors?
看起来是这样:https://github.com/hastebrot/V8-Hash-Collision-Generator