CLMUL instruction set
|This article may rely excessively on sources too closely associated with the subject, potentially preventing the article from being verifiable and neutral. (January 2015)|
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 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 with the new CLMUL instructions than with the traditional instruction set. Another application is the fast calculation of CRC values.
The instruction computes the 128-bit product of two 64-bit values. The destination is a 128-bit XMM register. The source may be another XMM register or memory. An immediate operand specifies which halves of the 128-bit operands are multiplied. Mnemonics specifying specific values of the immediate operand are also defined:
||Perform a carry-less multiplication of two 64-bit polynomials over the finite field GF(2).|
||Multiply the low halves of the two registers.|
||Multiply the high half of the destination register by the low half of the source register.|
||Multiply the low half of the destination register by the high half of the source register.|
||Multiply the high halves of the two registers.|
CPUs with CLMUL instruction set
The presence of the CLMUL instruction set can be checked by testing one of the CPU feature bits.
- Finite field arithmetic
- AES instruction set
- FMA3 instruction set
- FMA4 instruction set
- AVX instruction set
- "Intel Software Network". Intel. Retrieved 2008-04-05.
- "Intel Carry-Less Multiplication Instruction and its Usage for Computing the GCM Mode - Rev 2".
- Detailed description of instructions on Intel website
- "Fast CRC Computation for Generic Polynomials Using PCLMULQDQ".
- Dave Christie (6 May 2009). "Striking a balance". AMD Developer blogs. Retrieved 2011-03-11.
- "Slide detailing improvements of Jaguar over Bobcat". AMD. Retrieved August 3, 2013.