Jump to content

CLMUL instruction set

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Andre.holzner (talk | contribs) at 08:01, 12 August 2013 (CPUs with CLMUL instruction set: added a remark on how to test for the presence of the CLMUL instruction set, linking to the corresponding section in the CPUID wikipedia article). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Carry-less Multiplication (CLMUL) is an extension to the x86 instruction set used by microprocessors from Intel and AMD which was proposed by Intel in March 2008[1] and made available in the Intel Westmere processors announced in early 2010. The purpose is to improve the speed of applications doing block cipher encryption in Galois/Counter Mode, which depends on finite field multiplication. Finite field (GF(2k)) multiplication can be implemented more efficiently[2] with the new CLMUL instructions than with the traditional instruction set.[3] Another application is the fast calculation of CRC values.[4]

New instructions

Instruction Description
PCLMULQDQ Performs a carry-less multiplication of two 64-bit polynomials over the finite field GF(2).
PCLMULLQLQDQ xmmreg,xmmrm [rm: 66 0f 3a 44 /r 00]
PCLMULHQLQDQ xmmreg,xmmrm [rm: 66 0f 3a 44 /r 01]
PCLMULLQHQDQ xmmreg,xmmrm [rm: 66 0f 3a 44 /r 02]
PCLMULHQHQDQ xmmreg,xmmrm [rm: 66 0f 3a 44 /r 03]
PCLMULQDQ xmmreg,xmmrm,imm [rmi: 66 0f 3a 44 /r ib]

CPUs with CLMUL instruction set

The presence of the CLMUL instruction set can be checked by testing one of the CPU feature bits.

See also

References

  1. ^ "Intel Software Network". Intel. Retrieved 2008-04-05.
  2. ^ "Intel Carry-Less Multiplication Instruction and its Usage for Computing the GCM Mode - Rev 2".
  3. ^ Detailed description of instructions on Intel website
  4. ^ "Fast CRC Computation for Generic Polynomials Using PCLMULQDQ".
  5. ^ Dave Christie (6 May 2009). "Striking a balance". AMD Developer blogs. Retrieved 2011-03-11.