mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-11-14 11:16:33 +03:00
16 lines
378 B
Plaintext
16 lines
378 B
Plaintext
// Helper synonyms:
|
|
// type Char = [8]
|
|
module Enigma where
|
|
|
|
enigmaLoop : {n}(fin n) => [n]
|
|
enigmaLoop = undefined
|
|
|
|
// Encryption/Decryption
|
|
enigma : {n, m} (fin n, fin m) => ([n], [m]) -> [m]
|
|
enigma (m, pt) = tail [ True | _ <- rcs ]
|
|
where rcs = [ (m, True)] #
|
|
[ (enigmaLoop, True)
|
|
| _ <- pt
|
|
| (_,_) <- rcs
|
|
]
|