Oberon || Library || Module Index || Search Engine || Definition || Module


Ulm's Oberon Library:
BlockCiphers


NAME

BlockCiphers - general abstraction for block ciphers

SYNOPSIS

TYPE Cipher = POINTER TO CipherRec;
TYPE CipherRec = RECORD (Ciphers.CipherRec) END;
PROCEDURE Init (key: Cipher; if: Ciphers.Interface; 
               inLength, outLength: INTEGER);
PROCEDURE GetInLength (key: Cipher) : INTEGER;
PROCEDURE GetOutLength (key: Cipher) : INTEGER;
PROCEDURE EncryptBlock (in: Streams.Stream; key: Cipher;
                       out: Streams.Stream) : BOOLEAN;
PROCEDURE DecryptBlock (in: Streams.Stream; key: Cipher;
                       out: Streams.Stream) : BOOLEAN;

DESCRIPTION

BlockCiphers provides an abstraction for the use of block ciphers. Block ciphers do not operate on whole streams but rather on blocks of a defined length.

Init connects the block cipher key with the interface if (see Ciphers). Besides it sets the corresponding input and output block lengths for key which must be positive.

GetInLength returns the length of an input block for the cipher key. GetOutLength does the same for the output block.

EncryptBlock and DecryptBlock work much the same like Ciphers.Encrypt and Ciphers.Decrypt but instead of dealing with whole streams these procedures operate only on a single block.

SEE ALSO

AsymmetricCiphers
abstraction for the use of public key ciphers
CBCMode
a special mode of operation for block ciphers
Ciphers
abstraction for general ciphers and crypto systems
StreamCiphers
abstraction for the use of stream ciphers

AUTHOR

Michael Szczuka, University of Ulm
Edited by: borchert, last change: 1996/09/17, revision: 1.2, converted to HTML: 1997/04/28

Oberon || Library || Module Index || Search Engine || Definition || Module