The present invention provides an apparatus and method for performing
cryptographic operations on a plurality of input data blocks within a
microprocessor, where the size cryptographic key that is employed is
programmable. In one embodiment, an apparatus for performing
cryptographic operations is provided. The apparatus includes fetch logic
and execution logic. The fetch logic is disposed within a microprocessor,
and receives a cryptographic instructionsingle atomic cryptographic
instruction as part of an instruction flow executing on the
microprocessor. The cryptographic instructionsingle atomic cryptographic
instruction prescribes one of the cryptographic operations, and also one
of a plurality of cryptographic key sizes. The execution logic disposed
within the microprocessor and is operatively coupled to the single atomic
cryptographic instruction. The execution logic executes the one of the
cryptographic operations. The execution logic has a cryptographic key
size controller that employs the one of a plurality of cryptographic key
sizes during execution of the one of the cryptographic operations.