mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-11-28 17:33:13 +03:00
7 lines
264 B
Plaintext
7 lines
264 B
Plaintext
encrypt : {a}(fin a) => [8] -> [a][8] -> [a][8]
|
|
encrypt key plaintext = [pt ^ key | pt <- plaintext ]
|
|
|
|
decrypt : {a}(fin a) => [8] -> [a][8] -> [a][8]
|
|
decrypt key ciphertext = [ct ^ key | ct <- ciphertext ]
|
|
|
|
property roundtrip k ip = decrypt k (encrypt k ip) == ip |