[Cryptography] XOR linked list & crypto

Kevin W. Wall kevin.w.wall at gmail.com
Mon Feb 15 19:52:17 EST 2016


On Mon, Feb 15, 2016 at 12:06 PM, Jerry Leichter <leichter at lrw.com> wrote:
>
>> A famous XOR hack (Knuth??) enables traversing a list in either direction:
>>
>> https://en.wikipedia.org/wiki/Xor_linked_list
>>
>> Of course, you need *two* successive pointers in order to access the list.
>>
>> "Features" "Given only one list item, one cannot immediately obtain the addresses of the other elements of the list"
>>
>> "Drawbacks" "The pointers will be unreadable if one isn't traversing the list"
>>
>> Yes, this inability is used as both a "feature" and as a "drawback".

Drawback is that it would be a REALLY MAJOR PITA to debug if you
screw up the implementation, because a regular debugger is not going
to help you follow the pointers.

-kevin
-- 
Blog: http://off-the-wall-security.blogspot.com/    | Twitter: @KevinWWall
NSA: All your crypto bit are belong to us.


More information about the cryptography mailing list