mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-17 04:44:39 +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
|