In the Kademlia paper it mentions using the XOR
of the NodeID
interpreted as an integer. Let's pretend my NodeID1
is aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
and my NodeID2
is ab4d8d2a5f480a137067da17100271cd176607a1
. What's the appropriate way to interpret this as an integer for comparison of NodeID1
and NodeID2
? Would I convert these into BigInt
and XOR
those two BigInt
s? I saw that in one implementation. Could I also just convert each NodeID
into decimal and XOR
those values?
I found this question but I'm trying to better understand exactly how this works.
Note: This isn't for implementation, I'm just trying to understand how the integer interpretation works.