Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon EC2 Instance IDs - Why XOR?

According to Guy Rosen and RightScale the Amazon EC2 instance IDs contain two XORs against the first and second half of the "Inner ID" and all three against their own constant.

I understand that we won't know exactly why Amazon does this. However, from a general perspective, has anyone implemented or seen this sort of XOR and why would this XOR be implemented?

Is the only purpose to help obfuscate the ID?

like image 683
Rob Olmos Avatar asked Nov 14 '22 06:11

Rob Olmos


1 Answers

Obfuscation via a straightforward binary operator seems a little silly considering how little it apparently worked to prevent people from figuring it out. I would assume that Mr. Rosen stumbled across one possible use for it, the only other I can think of is some form of resource tracking.

Of course, until someone from Amazon tells us this will all be pure idle speculation.

like image 99
Anthony Corbelli Avatar answered Dec 22 '22 07:12

Anthony Corbelli