[Cryptography] XOR linked list & crypto

Henry Baker hbaker1 at pipeline.com
Mon Feb 15 22:00:30 EST 2016


At 04:52 PM 2/15/2016, Kevin W. Wall wrote:
>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.

More security through obscurity, no?

ASLR, anyone?

MSFT's now randomizing malloc, I seem to recall.



More information about the cryptography mailing list