A key scheduler for encryption/decryption produces a new ciphering key by
a key expansion process or recovers a previous ciphering key by an
inverse expansion process. The key scheduler includes a set of adders and
transformation circuitry. Each of adders receives a portion of a round
key value as its first input. Some of the adders receive either a portion
of the round key value or the output of some of the adders, as its second
input, be control of arbitration devices. One adder receives as its
second input an output from the transformation circuitry, which output is
selected by an arbitration device from either a portion of the round key
value or an output of an adder. The selection done by the arbitration
devices depending on whether the process desired is the key expansion or
inverse expansion.