A method of designing an optimum encryption algorithm and an optimized
encryption apparatus are disclosed. In the encryption apparatus, a
function block produces a first ciphertext of length 2n by encrypting a
first plaintext of length 2n with an encryption code of length 4n
generated from a key scheduler, and a second ciphertext of length m by
encrypting the first ciphertext with a second plaintext of length m under
the control of a controller. A memory stores the second ciphertext.