On Fri, Feb 29, 2008 at 2:40 PM, Enrico Weigelt wrote:
> I need some interface(s) which can handle virtually any cipher.


under inferno, i've used ssl(3) to implement a simple algorithm-agnostic
crypto command; you could use tls(3) or ssl(3) under plan 9 to do the
same thing. they're straightforward to use.
the algorithms provided by each of these is different:

inferno ssl:
descbc desecb des_56_cbc des_56_ecb des_40_cbc des_40_ecb rc4 rc4_256
rc4_128 rc4_40 ideacbc ideaecb

plan 9 tls:
clear rc4_128 3des_ede_cbc

plan 9 ssl:
descbc desecb des_56_cbc des_56_ecb des_40_cbc des_40_ecb rc4 rc4_256
rc4_128 rc4_40

these are all implemented by the kernel, so not a great example
for you, perhaps, but a nice example of a simple, uniform interface without
any of the usual API cruft.

see for example: http://plan9.bell-labs.com/magic/man2html/3/ssl