Some changes to the oneway function:
A test program oneway16bit.js was created. (type go(); in the left pane after loading)
It was found that the oneway add and xor modes produce the same results. The xor mode doesn’t require the modit function. The add mode produces a lot of hash collisions. As written with a seed of all 1’s the xor and add modes produce 4 collisions over a field of 1024 values.
This results are shown in oneway16bit1024.xlxs.
The program was modified oneway16bita.js. (type go(); in the left pane after loading)
The function is seeded with the initial data in place of all 1’s.
This change eliminated the collisions in the xor mode.
The results are shown in oneway16bita1024.xlxs.
The changes have been applied in cryptomsg5.js
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Some changes to the oneway function:
A test program oneway16bit.js was created. (type go(); in the left pane after loading)
It was found that the oneway add and xor modes produce the same results. The xor mode doesn’t require the modit function. The add mode produces a lot of hash collisions. As written with a seed of all 1’s the xor and add modes produce 4 collisions over a field of 1024 values.
This results are shown in oneway16bit1024.xlxs.
The program was modified oneway16bita.js. (type go(); in the left pane after loading)
The function is seeded with the initial data in place of all 1’s.
This change eliminated the collisions in the xor mode.
The results are shown in oneway16bita1024.xlxs.
The changes have been applied in cryptomsg5.js
4 Attachments