Make-Cfb

(make-cfb encryption-key initialization-vector encryption-function) -> cfb

Creates a <cfb> which may be used with cfb-encrypt or cfb-decrypt. At every use, the cipher will mutate according to a set pattern. So, two copies of a cfb created with identical arguments to make-cfb are needed: one for encryption, another for decryption.

Example:

>> (define e-cfb (make-cfb alpha iv aes-encrypt))
:: #f
>> (define d-cfb (make-cfb alpha iv aes-encrypt))
:: #f

The raw result of the above, from the repl, is as follows:

>> (make-cfb alpha iv aes-encrypt)
:: [cfb [aes-key] "??EW,?.
u3?7/O" [prim]]

Important

Make-CFB is a very forgiving function: it will accept almost any 3 arguments without validating them as to their proper place within a CFB. Note the following examples:

>> (make-cfb 1 1 1)
:: [cfb 1 1 1]
>> (make-cfb "Larry" "Moe" "Curly")
:: [cfb "Larry" "Moe" "Curly"]

Either of these would test true for cfb?. The error would not become apparent until the "cfb" was used with cfb-encrypt. Care should be taken, therefore, to be certain that the correct arguments are passed to this function.