Skip to content

Commit bcb8d34

Browse files
author
Rubtsov, Vasily
committed
IPP Crypto 2019 Update 3
1 parent 67220e3 commit bcb8d34

File tree

3,450 files changed

+46366
-25526
lines changed

Some content is hidden

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

3,450 files changed

+46366
-25526
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

5-
## 2018-10-15
5+
## YYYY-MM-DD
66
- Added the new SM2 encryption scheme.
77
- Added the ability to build the Intel(R) IPP Cryptography library with the Microsoft* Visual C++ Compiler 2017.
88
- Added the ability to build the Intel(R) IPP Cryptography library with the Intel(R) C++ Compiler 19.

CMakeLists.txt

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#===============================================================================
2-
# Copyright 2017-2018 Intel Corporation
2+
# Copyright 2017-2019 Intel Corporation
33
# All Rights Reserved.
44
#
55
# If this software was obtained under the Intel Simplified Software License,
@@ -52,6 +52,17 @@ set(LIB_NAME ippcp)
5252

5353
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
5454

55+
cmake_policy(SET CMP0054 NEW)
56+
57+
if("${CMAKE_GENERATOR}" STREQUAL "NMake Makefiles")
58+
if(NOT(C_COMPILER STREQUAL ""))
59+
set(CMAKE_C_COMPILER ${C_COMPILER})
60+
endif()
61+
if(NOT(CXX_COMPILER STREQUAL ""))
62+
set(CMAKE_CXX_COMPILER ${CXX_COMPILER})
63+
endif()
64+
endif()
65+
5566
project(${PROJECT_NAME} C CXX)
5667

5768
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
@@ -61,13 +72,13 @@ endif()
6172

6273
find_package(PythonInterp REQUIRED)
6374

64-
if(WIN32)
75+
if(WIN32 AND (${CMAKE_GENERATOR} MATCHES "Visual Studio"))
6576
if(${CMAKE_GENERATOR} MATCHES "Win64")
6677
set(ARCH intel64)
6778
else()
6879
set(ARCH ia32)
6980
endif()
70-
endif(WIN32)
81+
endif(WIN32 AND (${CMAKE_GENERATOR} MATCHES "Visual Studio"))
7182

7283
if ((NOT NONPIC_LIB) AND (NOT ANDROID) AND (NOT CODE_COVERAGE))
7384
set(DYNAMIC_LIB ON)
@@ -162,4 +173,3 @@ endif()
162173
if(EXISTS "${CMAKE_SOURCE_DIR}/perf_tests/")
163174
add_subdirectory(perf_tests)
164175
endif()
165-

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ Intel, and the Intel logo are trademarks of Intel Corporation in the U.S. and/or
338338
339339
*Other names and brands may be claimed as the property of others.
340340
341-
© 2018 Intel Corporation.
341+
© 2019 Intel Corporation.
342342
343343
|Optimization Notice|
344344
|:------------------|

include/ippcp.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2002-2018 Intel Corporation
2+
* Copyright 2002-2019 Intel Corporation
33
* All Rights Reserved.
44
*
55
* If this software was obtained under the Intel Simplified Software License,
@@ -70,6 +70,10 @@ extern "C" {
7070
#endif
7171
#endif
7272

73+
#pragma warning(push)
74+
#ifdef _MSC_VER
75+
#pragma warning(disable : 4100) // for MSVC, unreferenced param
76+
#endif
7377

7478
/* /////////////////////////////////////////////////////////////////////////////
7579
// Name: ippcpGetLibVersion
@@ -519,6 +523,8 @@ IPPAPI(IppStatus, ippsHashGetTag_rmf,(Ipp8u* pMD, int tagLen, const IppsHashStat
519523
IPPAPI(IppStatus, ippsHashFinal_rmf,(Ipp8u* pMD, IppsHashState_rmf* pState))
520524
IPPAPI(IppStatus, ippsHashMessage_rmf,(const Ipp8u* pMsg, int len, Ipp8u* pMD, const IppsHashMethod* pMethod))
521525

526+
IPPAPI(IppStatus, ippsHashMethodGetInfo,(IppsHashInfo* pInfo, const IppsHashMethod* pMethod))
527+
IPPAPI(IppStatus, ippsHashGetInfo_rmf,(IppsHashInfo* pInfo, const IppsHashState_rmf* pState))
522528
/* general MGF Primitives*/
523529
IPPAPI(IppStatus, ippsMGF,(const Ipp8u* pSeed, int seedLen, Ipp8u* pMask, int maskLen, IppHashAlgId hashAlg))
524530
IPPAPI(IppStatus, ippsMGF1_rmf,(const Ipp8u* pSeed, int seedLen, Ipp8u* pMask, int maskLen, const IppsHashMethod* pMethod))
@@ -1221,6 +1227,8 @@ IPPAPI(IppStatus, ippsGFpECVerifySM2,(const IppsBigNumState* pMsgDigest,
12211227
IppECResult* pResult,
12221228
IppsGFpECState* pEC, Ipp8u* pScratchBuffer))
12231229

1230+
IPPAPI(IppStatus, ippsGFpECGetInfo_GF,(IppsGFpInfo* pInfo, const IppsGFpECState* pEC))
1231+
12241232
IPPAPI(IppStatus, ippsGFpECESGetSize_SM2, (const IppsGFpECState* pEC, int* pSize))
12251233
IPPAPI(IppStatus, ippsGFpECESInit_SM2, (IppsGFpECState* pEC,
12261234
IppsECESState_SM2* pState, int avaliableCtxSize))
@@ -1238,6 +1246,7 @@ IPPAPI(IppStatus, ippsGFpECESFinal_SM2, (Ipp8u* pTag, int tagLen, IppsECESState_
12381246
IPPAPI(IppStatus, ippsGFpECESGetBuffersSize_SM2, (int* pPublicKeySize,
12391247
int* pMaximumTagSize, const IppsECESState_SM2* pState))
12401248

1249+
#pragma warning(pop)
12411250
#ifdef __cplusplus
12421251
}
12431252
#endif

include/ippcpdefs.h

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2012-2018 Intel Corporation
2+
* Copyright 2012-2019 Intel Corporation
33
* All Rights Reserved.
44
*
55
* If this software was obtained under the Intel Simplified Software License,
@@ -302,7 +302,7 @@ typedef enum {
302302
#define ippCPUID_SSE42 0x00000080 /* Intel(R) Streaming SIMD Extensions 4.2 instruction set */
303303
#define ippCPUID_AVX 0x00000100 /* Intel(R) Advanced Vector Extensions instruction set */
304304
#define ippAVX_ENABLEDBYOS 0x00000200 /* Intel(R) Advanced Vector Extensions instruction set is supported by OS */
305-
#define ippCPUID_AES 0x00000400 /* Intel(R) AES New Instructions */
305+
#define ippCPUID_AES 0x00000400 /* */
306306
#define ippCPUID_CLMUL 0x00000800 /* Intel(R) instruction PCLMULQDQ */
307307
#define ippCPUID_ABR 0x00001000 /* Reserved */
308308
#define ippCPUID_RDRAND 0x00002000 /* Intel(R) instruction RDRAND */
@@ -334,6 +334,10 @@ typedef enum {
334334
#define ippCPUID_GETINFO_A INT64_SUFFIX(0x616f666e69746567) /* Force ippGetCpuFeatures to work as cpuid instruction */
335335
#define ippAVX512_ENABLEDBYOS INT64_SUFFIX(0x200000000) /* Intel(R) Advanced Vector Extensions 512 is supported by OS */
336336

337+
#define ippCPUID_AVX512GFNI INT64_SUFFIX(0x400000000) /* */
338+
#define ippCPUID_AVX512VAES INT64_SUFFIX(0x800000000) /* */
339+
#define ippCPUID_AVX512VCLMUL INT64_SUFFIX(0x1000000000) /* */
340+
337341

338342
#endif /* IPP_CPU_FEATURES__ */
339343

@@ -776,18 +780,22 @@ typedef struct _cpGFpEC IppsECCPState;
776780
typedef struct _cpGFpECPoint IppsECCPPointState;
777781

778782
typedef struct {
779-
const IppsGFpState* pBasicGF;
780-
const IppsGFpState* pGroundGF;
783+
int hashSize;
784+
int msgBlockSize;
785+
} IppsHashInfo;
786+
787+
typedef struct {
788+
//const IppsGFpState* pBasicGF;
789+
//const IppsGFpState* pGroundGF;
790+
int parentGFdegree;
781791
int basicGFdegree;
782-
int groundGFdegree;
783-
int elementLen;
792+
int basicElmBitSize;
784793
} IppsGFpInfo;
785794

786795
typedef struct _cpStateECES_SM2 IppsECESState_SM2;
787796

788797
#endif /* !defined( _OWN_BLDPCS ) */
789798

790-
#ifndef _PCS
791799
IPPAPI( IppStatus, ippcpGetCpuFeatures, ( Ipp64u* pFeaturesMask ))
792800
IPPAPI( IppStatus, ippcpSetCpuFeatures, ( Ipp64u features ))
793801
IPPAPI( Ipp64u, ippcpGetEnabledCpuFeatures, ( void ) )
@@ -797,7 +805,6 @@ IPPAPI( IppStatus, ippcpGetNumThreads, (int* pNumThr) )
797805
IPPAPI( const char*, ippcpGetStatusString, ( IppStatus StsCode ))
798806
IPPAPI( int, ippcpGetEnabledNumThreads, ( void ) )
799807
IPPAPI( Ipp64u, ippcpGetCpuClocks, (void) )
800-
#endif
801808

802809
#ifdef __cplusplus
803810
}

include/ippversion.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2001-2018 Intel Corporation
2+
* Copyright 2001-2019 Intel Corporation
33
* All Rights Reserved.
44
*
55
* If this software was obtained under the Intel Simplified Software License,
@@ -51,8 +51,8 @@
5151

5252
#define IPP_VERSION_MAJOR 2019
5353
#define IPP_VERSION_MINOR 0
54-
#define IPP_VERSION_UPDATE 1
54+
#define IPP_VERSION_UPDATE 3
5555

56-
#define IPP_VERSION_STR "2019.0.1 Gold"
56+
#define IPP_VERSION_STR "2019.0.3"
5757

5858
#endif /* IPPVERSION_H__ */

sources/cmake/android/Intel18.0.0.cmake

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#===============================================================================
2-
# Copyright 2017-2018 Intel Corporation
2+
# Copyright 2017-2019 Intel Corporation
33
# All Rights Reserved.
44
#
55
# If this software was obtained under the Intel Simplified Software License,
@@ -65,6 +65,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -diag-error 266 -diag-disable 13366
6565
# Stack-based Buffer Overrun Detection
6666
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
6767

68+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
69+
6870
# Format string vulnerabilities
6971
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat -Wformat-security")
7072

@@ -83,8 +85,8 @@ if(CODE_COVERAGE)
8385
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -prof-gen:srcpos -prof-dir ${PROF_DATA_DIR}")
8486
endif()
8587

86-
set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -w3" CACHE STRING "" FORCE)
87-
set (CMAKE_C_FLAGS_RELEASE_INIT " -O3 -DNDEBUG -w3" CACHE STRING "" FORCE)
88+
set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -w3 -Werror" CACHE STRING "" FORCE)
89+
set (CMAKE_C_FLAGS_RELEASE_INIT " -O3 -DNDEBUG -w3 -Werror" CACHE STRING "" FORCE)
8890

8991
if(${ARCH} MATCHES "ia32")
9092
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -no-sox -Zp16 -gcc -falign-stack=maintain-16-byte -Wa,--32 -no-use-asm -m32")

sources/cmake/android/Intel19.0.0.cmake

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#===============================================================================
2-
# Copyright 2017-2018 Intel Corporation
2+
# Copyright 2017-2019 Intel Corporation
33
# All Rights Reserved.
44
#
55
# If this software was obtained under the Intel Simplified Software License,
@@ -65,6 +65,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -diag-error 266 -diag-disable 13366
6565
# Stack-based Buffer Overrun Detection
6666
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
6767

68+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
69+
6870
# Format string vulnerabilities
6971
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat -Wformat-security")
7072

@@ -83,8 +85,8 @@ if(CODE_COVERAGE)
8385
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -prof-gen:srcpos -prof-dir ${PROF_DATA_DIR}")
8486
endif()
8587

86-
set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -w3" CACHE STRING "" FORCE)
87-
set (CMAKE_C_FLAGS_RELEASE_INIT " -O3 -DNDEBUG -w3" CACHE STRING "" FORCE)
88+
set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -w3 -Werror" CACHE STRING "" FORCE)
89+
set (CMAKE_C_FLAGS_RELEASE_INIT " -O3 -DNDEBUG -w3 -Werror" CACHE STRING "" FORCE)
8890

8991
if(${ARCH} MATCHES "ia32")
9092
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -no-sox -Zp16 -gcc -falign-stack=maintain-16-byte -Wa,--32 -no-use-asm -m32")

sources/cmake/android/common.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#===============================================================================
2-
# Copyright 2017-2018 Intel Corporation
2+
# Copyright 2017-2019 Intel Corporation
33
# All Rights Reserved.
44
#
55
# If this software was obtained under the Intel Simplified Software License,

sources/cmake/linux/Intel18.0.0.cmake

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#===============================================================================
2-
# Copyright 2017-2018 Intel Corporation
2+
# Copyright 2017-2019 Intel Corporation
33
# All Rights Reserved.
44
#
55
# If this software was obtained under the Intel Simplified Software License,
@@ -53,7 +53,8 @@ set(LINK_FLAG_SECURITY "${LINK_FLAG_SECURITY} -Wl,-z,noexecstack")
5353
# Data relocation and protection (RELRO)
5454
set(LINK_FLAG_SECURITY "${LINK_FLAG_SECURITY} -Wl,-z,relro -Wl,-z,now")
5555

56-
set(LINK_FLAG_DYNAMIC_LINUX "${LINK_FLAG_SECURITY} -nostdlib -Wl,-shared -Wl,-call_shared,-lc -Wl,-call_shared,-lm")
56+
#gres set(LINK_FLAG_DYNAMIC_LINUX "${LINK_FLAG_SECURITY} -nostdlib -Wl,-shared -Wl,-call_shared,-lc -Wl,-call_shared,-lm")
57+
set(LINK_FLAG_DYNAMIC_LINUX "${LINK_FLAG_SECURITY} -nostdlib -Wl,-shared -Wl,-call_shared,-ldl -Wl,-call_shared,-lc -Wl,-call_shared,-lm")
5758
if(${ARCH} MATCHES "ia32")
5859
set(LINK_FLAG_DYNAMIC_LINUX "${LINK_FLAG_DYNAMIC_LINUX} -Wl,-m,elf_i386")
5960
endif(${ARCH} MATCHES "ia32")
@@ -86,6 +87,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -diag-error 266 -diag-disable 13366
8687
# Stack-based Buffer Overrun Detection
8788
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
8889

90+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
91+
8992
# Format string vulnerabilities
9093
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat -Wformat-security")
9194

@@ -100,8 +103,8 @@ if(CODE_COVERAGE)
100103
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -prof-gen:srcpos -prof-dir ${PROF_DATA_DIR}")
101104
endif()
102105

103-
set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -w3" CACHE STRING "" FORCE)
104-
set (CMAKE_C_FLAGS_RELEASE_INIT " -O3 -DNDEBUG -w3" CACHE STRING "" FORCE)
106+
set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -w3 -Werror" CACHE STRING "" FORCE)
107+
set (CMAKE_C_FLAGS_RELEASE_INIT " -O3 -DNDEBUG -w3 -Werror" CACHE STRING "" FORCE)
105108

106109
if(${ARCH} MATCHES "ia32")
107110
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -no-sox -Zp16 -gcc -falign-stack=maintain-16-byte -Wa,--32 -no-use-asm -m32")

0 commit comments

Comments
 (0)