euclidean algorithm in cryptography