pythagoras theorem in cryptography