.Dd May 13th 2004 .Dt LEP 1 .Sh NAME .Nm lep .Nd "Lesser Encryption Project" .Sh SYNOPSIS .Nm .Op Fl o Ar [e][d][c][g][h][H][t[n]][s[n]][r][x[n]][R[n]]] .Op Fl k Ar file .Op Fl v .Op Fl t .Sh DESCRIPTION .Nm exists to provide a relatively lightweight interface to common crytography tasks, by wrapping some BSD crypto library calls (MD5, Blowfish) and providing other simple cipher recipes (Transposition, etc). .Pp The library calls are there for providing a simple alternative to the OpenSSL client itself, and the other encryption methods simply lack other unified software implementations. LEP's seemingly unique feature is that it can chain together operations in a single run, applying each to the buffer in turn. This is much more efficient than building long pipelines, and allows making 'hybrid' encryption methods easily. .Pp The following options are available: .Bl -tag -width indent .It Fl o Ar op Followed by any of the following letters, defines the operations to be performed. The default is just to generate a checksum. The operations (except g and c, which are performed at start and finish respectively) are performed in the order they are specified per-block. .Pp .Dq e encrypts the block .Pp .Dq d decrypts the block .Pp .Dq c makes LEP output a checksum instead of the actual data .Pp .Dq g generates a new key to the file specified by .Fl k . This new key is used in any Blowfish operations in the chain. . At present the key generation really only copies a kilobyte (unless compiled otherwise) of data from /dev/urandom to the file. .Pp .Dq h converts data to hex (note: this doubles the buffer size) .Pp .Dq H converts data from hex (note: this halves the buffer size and is intolerant of non-hex values) .Pp .Dq t transposes data in 2D squares. Square width can be specified after the .Dqt and defaults to 16 .Pp .Dq s reverses sets of n bytes, where n is the number specified after s or the default of 2. .Pp .Dq r reverses a block at a time (internally using the same swap function) .Pp .Dq R employs a Caesar cipher, moving letters n (where n is either specified, or the default rot13) places to the right. .Pp .Dq x performs a XOR encryption per-byte with the decimal value specified (defaults to 255, i.e. inverts all bits) .Pp .It Fl k Ar file Specifies the key file, either for input (-o[ed]) or output (-og). The default is .Pa ~/.lep.key .Pp .It Fl t Runs a set of internal tests to verify algorithm integrity and performance. .Pp .It Fl v Reports program version. .Pp .Sh EXAMPLES .Dl lep -og -k foo (Generates a fresh key and writes it to .Pa foo ) .Pp .Dl lep -ogec -k foo < /kernel (Generates a new key to .Pa foo , and encrypts the contents of .Pa /kernel with the key just generated, printing the checksum of the encrypted data) .Pp .Dl lep -ot (Runs the test suite) .Pp .Sh BUGS Scalability tests are imprecise, can be confused between linear, constant and unpredictable depending on very small differences. .Pp .Sh SEE ALSO .Xr openssl 1 .Sh AUTHORS .An Dmitri Nikulin Aq setagllib@optusnet.com.au