Skip to content

Commit 3b6ae09

Browse files
committed
Added multi-buffer implementation of AES-CFB optimized with Intel(R) AES-NI and vector extensions of Intel(R) AES-NI instruction sets
1 parent 19b408c commit 3b6ae09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+3157
-3103
lines changed

BUILD.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
# How to Build Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography) <!-- omit in toc -->
22

33
- [Software Requirements](#software-requirements)
4-
- [Common](#common)
5-
- [Linux* OS](#linux-os)
6-
- [Windows* OS](#windows-os)
7-
- [macOS*](#macos)
4+
- [Common tools](#common-tools)
5+
- [Linux* OS](#linux-os)
6+
- [Windows* OS](#windows-os)
7+
- [macOS*](#macos)
88
- [Building Intel IPP Cryptography on Linux\* OS](#building-intel-ipp-cryptography-on-linux-os)
99
- [Building Intel IPP Cryptography on Windows\* OS](#building-intel-ipp-cryptography-on-windows-os)
1010
- [Building Intel IPP Cryptography on macOS\*](#building-intel-ipp-cryptography-on-macos)
1111
- [CMake Build Options](#cmake-build-options)
12-
- [Common for all operating systems](#common-for-all-operating-systems)
13-
- [Windows\* OS](#windows-os-1)
14-
- [Linux\* OS](#linux-os-1)
12+
- [Common for all operating systems](#common-for-all-operating-systems)
13+
- [Windows\* OS](#windows-os)
14+
- [Linux\* OS](#linux-os)
1515
- [CMake Commands FAQ](#cmake-commands-faq)
16-
- [How to build a 32-bit library?](#how-to-build-a-32-bit-library)
17-
- [How to build a 64-bit generic library without any CPU-specific optimizations?](#how-to-build-a-64-bit-generic-library-without-any-cpu-specific-optimizations)
18-
- [How to build two libraries with optimizations for Intel® Advanced Vector Extensions 2 and Intel® Advanced Vector Extensions 512 instruction sets?](#how-to-build-two-libraries-with-optimizations-for-intel%c2%ae-advanced-vector-extensions-2-and-intel%c2%ae-advanced-vector-extensions-512-instruction-sets)
19-
- [How to build a library to work in a kernel space?](#how-to-build-a-library-to-work-in-a-kernel-space)
20-
- [Incorporating Intel IPP Cryptography sources into custom build system](#incorporating-intel%c2%ae-ipp-cryptography-sources-into-custom-build-system)
16+
- [How to build a 32-bit library?](#how-to-build-a-32-bit-library)
17+
- [How to build a 64-bit generic library without any CPU-specific optimizations?](#how-to-build-a-64-bit-generic-library-without-any-cpu-specific-optimizations)
18+
- [How to build two libraries with optimizations for Intel® Advanced Vector Extensions 2 and Intel® Advanced Vector Extensions 512 instruction sets?](#how-to-build-two-libraries-with-optimizations-for-intel-advanced-vector-extensions-2-and-intel-advanced-vector-extensions-512-instruction-sets)
19+
- [How to build a library to work in a kernel space?](#how-to-build-a-library-to-work-in-a-kernel-space)
20+
- [Incorporating Intel® IPP Cryptography sources into custom build system](#incorporating-intel-ipp-cryptography-sources-into-custom-build-system)
21+
2122

2223
## Software Requirements
23-
### Common
24+
### Common tools
2425
- [CMake\*](https://cmake.org/download) 3.15 or higher
2526
- Python 2.7.15
26-
- The Netwide Assembler (NASM) 2.15\*
27+
- The Netwide Assembler (NASM) 2.15
2728

28-
> **NOTE**: Until NASM 2.15 is officially released, please use [this](https://www.nasm.us/pub/nasm/snapshots/20191023/) NASM snapshot.
2929
### Linux* OS
30-
- [Common tools](#common-software-requirements)
30+
- [Common tools](#common-tools)
3131
- Intel® C++ Compiler 19.0 Update 4 for Linux\* OS
3232
- GCC 8.3
3333
- GCC 9.1
3434
- GNU binutils 2.32
3535
### Windows* OS
36-
- [Common tools](#common-software-requirements)
36+
- [Common tools](#common-tools)
3737
- Intel® C++ Compiler 19.0 Update 4 for Windows\* OS
3838
- Microsoft Visual C++ Compiler\* version 19.16 provided by Microsoft Visual Studio\* 2017 version 15.9
3939
### macOS*
40-
- [Common tools](#common-software-requirements)
40+
- [Common tools](#common-tools)
4141
- Intel® C++ Compiler 19.0 Update 4 for macOS\*
4242
## Building Intel IPP Cryptography on Linux\* OS
4343

@@ -188,7 +188,7 @@ To build the Intel IPP Cryptography library on macOS*, complete the following st
188188
- `-B<build-dir>` - defines the build directory. This is the directory where CMake puts the generated Microsoft Visual Studio\* solution or makefiles.
189189

190190
- `-DARCH=<ia32|intel64>` - on Linux* OS and macOS*, defines the target architecture for the build of the Intel IPP Cryptography library.
191-
> **NOTE:** On Windows* OS, use `-G`/`-A` instead. See the description of these options [below](#windows-os-specific).
191+
> **NOTE:** On Windows* OS, use `-G`/`-A` instead. See the description of these options [below](#windows-os-1).
192192

193193
- `-DMERGED_BLD:BOOL=<on|off>` - optional. Defines the configuration of the Intel IPP Cryptography library to build:
194194

@@ -280,4 +280,4 @@ endif()
280280
# `IPPCRYPTO_LIBRARIES` - static library name
281281
# `IPPCRYPTO_INCLUDE_DIRS` - path to Intel IPP Cryptography headers
282282
# `IPPCRYPTO_ROOT_DIR` - library root dir (a folder with 'include' and 'lib' directories)
283-
```
283+
```

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
This is a list of notable changes to Intel(R) IPP Cryptography, in reverse chronological order.
44

5+
## YYYY-MM-DD
6+
7+
## 2020-08-19
8+
- Added multi-buffer implementation of AES-CFB optimized with Intel(R) AES-NI and vector extensions of Intel(R) AES-NI instruction sets.
9+
- Fixed compatibility issue with x64 ABI (restored non-volatile registers after function call in AVX/AVX2 assembly code).
10+
- Updated Intel IPP Custom Library Tool.
11+
512
## 2020-06-09
613
- AES-GCM algorithm was optimized for Intel(R) Microarchitecture Code Named Cascade Lake with Intel(R) AES New Instructions (Intel(R) AES-NI).
714
- Crypto Multi-buffer library installation instructions update.

CMakeLists.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cmake_minimum_required(VERSION 3.1)
2222

2323
set(PROJECT_FULL_NAME "Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)")
2424
set(PROJECT_NAME "Intel(R) IPP Crypto")
25-
set(PROJECT_VERSION, "2020.0.0")
25+
set(PROJECT_VERSION "2020.0.2")
2626

2727
set(LIB_NAME ippcp)
2828

@@ -41,7 +41,9 @@ if("${CMAKE_GENERATOR}" STREQUAL "NMake Makefiles")
4141
endif()
4242
endif()
4343

44-
project(${PROJECT_NAME} C CXX)
44+
project(${PROJECT_NAME}
45+
VERSION ${PROJECT_VERSION}
46+
LANGUAGES C CXX)
4547

4648
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
4749
message(STATUS "CMAKE_BUILD_TYPE is unset, defaulting to Release")
@@ -80,6 +82,15 @@ if("${MERGED_BLD}" STREQUAL "")
8082
set(MERGED_BLD ON)
8183
endif()
8284

85+
# Set default installation directories
86+
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
87+
if (UNIX)
88+
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/intel/ippcp_${PROJECT_VERSION}" CACHE PATH "..." FORCE)
89+
else()
90+
set(CMAKE_INSTALL_PREFIX "c:/Program Files (x86)/IntelSWTools/ippcp_${PROJECT_VERSION}" CACHE PATH "..." FORCE)
91+
endif()
92+
endif()
93+
8394
set(IPP_CRYPTO_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
8495
set(IPP_CRYPTO_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
8596
set(IPP_CRYPTO_SOURCES_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/sources/include")
@@ -136,6 +147,7 @@ message (STATUS "IPP_CRYPTO_SOURCES_INCLUDE_DIR ........ " ${IPP_CRYPTO_SOURCES_
136147
message (STATUS "IPP_CRYPTO_SOURCES_DIR ................ " ${IPP_CRYPTO_SOURCES_DIR})
137148
message (STATUS "ARCH .................................. " ${ARCH})
138149
message (STATUS "DYNAMIC_LIB ........................... " ${DYNAMIC_LIB})
150+
message (STATUS "CMAKE_INSTALL_PREFIX .................. " ${CMAKE_INSTALL_PREFIX})
139151

140152
if(Python_Interpreter_FOUND)
141153
message (STATUS "PYTHON_VERSION_STRING ................. " ${Python_VERSION})

include/ippcp.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* limitations under the License.
1515
*******************************************************************************/
1616

17-
/*
17+
/*
1818
//
1919
// Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)
20-
//
20+
//
2121
*/
2222

2323
#if !defined( IPPCP_H__ ) || defined( _OWN_BLDPCS )
@@ -209,6 +209,12 @@ IPPAPI(IppStatus, ippsAESDecryptXTS_Direct,(const Ipp8u* pSrc, Ipp8u* pDst, int
209209
const Ipp8u* pKey, int keyBitsize,
210210
int dataUnitBitsize))
211211

212+
/* AES multi-buffer functions */
213+
IPPAPI(IppStatus, ippsAES_EncryptCFB16_MB, (const Ipp8u* pSrc[], Ipp8u* pDst[], int len[],
214+
const IppsAESSpec* pCtx[],
215+
const Ipp8u* pIV[],
216+
IppStatus status[],
217+
int numBuffers))
212218

213219
/* SMS4 */
214220
IPPAPI(IppStatus, ippsSMS4GetSize,(int *pSize))
@@ -825,7 +831,7 @@ IPPAPI(IppStatus, ippsRSA_ValidateKeys,(int* pResult,
825831
/* encryption scheme: RSAES-OAEP */
826832
IPP_DEPRECATED(OBSOLETE_API) \
827833
IPPAPI(IppStatus, ippsRSAEncrypt_OAEP,(const Ipp8u* pSrc, int srcLen,
828-
const Ipp8u* pLabel, int labLen,
834+
const Ipp8u* pLabel, int labLen,
829835
const Ipp8u* pSeed,
830836
Ipp8u* pDst,
831837
const IppsRSAPublicKeyState* pKey,
@@ -841,7 +847,7 @@ IPPAPI(IppStatus, ippsRSADecrypt_OAEP,(const Ipp8u* pSrc,
841847
Ipp8u* pBuffer))
842848

843849
IPPAPI(IppStatus, ippsRSAEncrypt_OAEP_rmf,(const Ipp8u* pSrc, int srcLen,
844-
const Ipp8u* pLabel, int labLen,
850+
const Ipp8u* pLabel, int labLen,
845851
const Ipp8u* pSeed,
846852
Ipp8u* pDst,
847853
const IppsRSAPublicKeyState* pKey,

0 commit comments

Comments
 (0)