Methods and systems for implementing a switch box (S-box) in a
cryptographic application are described. An input to the S-box is
converted from a Galois field representation GF(N.sup.2) to a Galois
subfield representation GF(N).sup.2. The input is converted using a
generating polynomial of the form x.sup.2+Ax+B, where A and B are
elements in GF(N) and where A has a value other than unity. The
multiplicative inverse of the Galois subfield representation GF(N).sup.2
is determined. The multiplicative inverse is converted back to the Galois
field representation GF(N.sup.2). An affine transformation of the
multiplicative inverse is then performed.