cryptol/tests/issues/issue187.cry

16 lines
379 B
Plaintext
Raw Normal View History

2014-04-18 02:34:25 +04:00
// 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
]