Intel® Integrated Performance Primitives Cryptography
Total Page:16
File Type:pdf, Size:1020Kb
Intel® Integrated Performance Primitives Cryptography Developer Reference Notices and Disclaimers Intel® Integrated Performance Primitives Cryptography Developer Reference Contents Notices and Disclaimers..................................................................... 11 Getting Help and Support................................................................... 12 Introducing Intel® Integrated Performance Primitives Cryptography ................................................................................. 13 What's New ....................................................................................... 14 Notational Conventions...................................................................... 15 Related Products ............................................................................... 16 Chapter 1: Overview Basic Features ........................................................................................ 17 Function Context Structures...................................................................... 17 Data Security Considerations .................................................................... 18 Chapter 2: Symmetric Cryptography Primitive Functions Block Cipher Modes of Operation ............................................................... 19 Rijndael Functions ................................................................................... 20 AESGetSize .................................................................................... 20 AESInit .......................................................................................... 21 AESSetKey ..................................................................................... 22 AESPack, AESUnpack....................................................................... 23 AESEncryptECB............................................................................... 23 AESDecryptECB .............................................................................. 24 AESEncryptCBC .............................................................................. 25 AESDecryptCBC .............................................................................. 26 AESEncryptCBC_CS ......................................................................... 27 AESDecryptCBC_CS......................................................................... 28 AESEncryptCFB............................................................................... 28 AES_EncryptCFB16_MB.................................................................... 29 AESDecryptCFB............................................................................... 30 AESEncryptOFB............................................................................... 31 AESDecryptOFB .............................................................................. 32 AESEncryptCTR............................................................................... 33 AESDecryptCTR .............................................................................. 34 AESEncryptXTS_Direct, AESDecryptXTS_Direct ................................... 35 Example of Using AES Functions........................................................ 37 AES-CCM Functions ................................................................................. 38 AES_CCMGetSize ............................................................................ 38 AES_CCMInit .................................................................................. 39 AES_CCMStart ................................................................................ 40 AES_CCMEncrypt ............................................................................ 40 AES_CCMDecrypt ............................................................................ 41 AES_CCMGetTag ............................................................................. 42 AES_CCMMessageLen ...................................................................... 42 AES_CCMTagLen ............................................................................. 43 AES-GCM Functions ................................................................................. 44 AES_GCMGetSize ............................................................................ 44 AES_GCMInit.................................................................................. 45 AES_GCMStart................................................................................ 46 AES_GCMReset ............................................................................... 46 2 Contents AES_GCMProcessIV ......................................................................... 47 AES_GCMProcessAAD ...................................................................... 48 AES_GCMEncrypt ............................................................................ 48 AES_GCMDecrypt............................................................................ 49 AES_GCMGetTag............................................................................. 50 AES-SIV Functions................................................................................... 50 AES_S2V_CMAC.............................................................................. 50 AES_SIVEncrypt.............................................................................. 51 AES_SIVDecrypt ............................................................................. 52 Usage Example ............................................................................... 54 AES-XTS Functions .................................................................................. 55 AES_XTSGetSize ............................................................................. 55 AES_XTSInit................................................................................... 55 AES_XTSEncrypt ............................................................................. 56 AES_XTSDecrypt............................................................................. 57 TDES Functions....................................................................................... 58 DESGetSize .................................................................................... 59 DESInit.......................................................................................... 60 DESPack, DESUnpack ...................................................................... 60 TDESEncryptECB............................................................................. 61 TDESDecryptECB ............................................................................ 62 TDESEncryptCBC............................................................................. 63 TDESDecryptCBC ............................................................................ 64 TDESEncryptCFB............................................................................. 65 TDESDecryptCFB............................................................................. 66 TDESEncryptOFB............................................................................. 67 TDESDecryptOFB ............................................................................ 69 TDESEncryptCTR............................................................................. 70 TDESDecryptCTR ............................................................................ 71 Example of Using TDES Functions...................................................... 72 SMS4 Functions ...................................................................................... 73 SMS4GetSize.................................................................................. 73 SMS4Init........................................................................................ 74 SMS4SetKey................................................................................... 75 SMS4EncryptECB ............................................................................ 75 SMS4DecryptECB ............................................................................ 76 SMS4EncryptCBC ............................................................................ 77 SMS4DecryptCBC............................................................................ 78 SMS4EncryptCBC_CS....................................................................... 79 SMS4DecryptCBC_CS ...................................................................... 80 SMS4EncryptCFB ............................................................................ 80 SMS4DecryptCFB ............................................................................ 81 SMS4EncryptOFB ............................................................................ 82 SMS4DecryptOFB ............................................................................ 83 SMS4EncryptCTR ............................................................................ 84 SMS4DecryptCTR ............................................................................ 85 ARCFour Functions .................................................................................. 86 ARCFourGetSize.............................................................................. 86 ARCFourCheckKey ........................................................................... 87 ARCFourInit.................................................................................... 88 ARCFourPack, ARCFourUnpack .......................................................... 88 ARCFourEncrypt .............................................................................. 89 ARCFourDecrypt.............................................................................