Blowfish (OMFFBLOWFISH)

Blowfish is an encryption algorithm devised by Bruce Schneier. It is described in [1] Bruce Schneier, ``Description of a New Variable-Length Key, 64-bit Block Cipher (Blowfish)'', Fast Software Encryption, Cambridge Security Workshop, p. 191--204, December 09--11, 1993.

The Blowfish algorithm takes input data and a key, and combines the two to produce output data that is cryptographically encrypted or decrypted, as the case may be.

This library consists of four filter functions that encode and decode using the Blowfish algorithm, and two constants for specifying the trimming mode on decryption.

  • reader-encrypt is a string source function that reads an input string sourceand encrypts it using a supplied encryption key.
  • reader-decrypt is a string source function that reads an input string source and decrypts it using a supplied encryption key.
  • writer-encrypt is a string sink function that encrypts data written to it using a supplied encryption key, and then outputs it to a string sink that was supplied as an argument.
  • writer-decrypt is a string sink function that decrypts data written to it using a supplied encryption key, and then outputs it to a string sinkthat was supplied as an argument.

The reader-decrypt and writer-decrypt functions can be given one of two trimming modes:

  • no-trimming is the default, and means that the null-padding should be left alone.
  • null-trimming specifies that the null-padding should be trimmed from the decoded data.

Requirements

To use OMFFBLOWFISH, you must import it into your program using a statement like this:

  import "omffblowfish.xmd" prefixed by blowfish.
            

(Please see the import topic for more on importing.)