Skip to content

Commit 63d0e65

Browse files
committed
Linux 2.13.1 Open Source Gold Release
Upgraded Intel(R) Integrated Performance Primitives (IPP) Cryptography library to version 2020 update 3. Upgraded Intel(R) SGX Architecture Enclaves based on new IPP crypto library. Fixed bugs. Signed-off-by: Li, Xun <xun.li@intel.com>
1 parent c11985e commit 63d0e65

File tree

528 files changed

+6084
-6707
lines changed

Some content is hidden

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

528 files changed

+6084
-6707
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
[submodule "ipp-crypto"]
1313
path = external/ippcp_internal/ipp-crypto
1414
url = https://github.com/intel/ipp-crypto.git
15-
branch = ipp-crypto_2019_update5
15+
branch = ipp-crypto_2020_update3

build-scripts/sgx-asm-pp.py

Lines changed: 366 additions & 0 deletions
Large diffs are not rendered by default.

common/inc/internal/se_version.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@
3131
#ifndef _SE_VERSION_H_
3232
#define _SE_VERSION_H_
3333

34-
#define STRFILEVER "2.13.100.4"
34+
#define STRFILEVER "2.13.101.2"
3535
#define SGX_MAJOR_VERSION 2
3636
#define SGX_MINOR_VERSION 13
37-
#define SGX_REVISION_VERSION 100
37+
#define SGX_REVISION_VERSION 101
3838
#define MAKE_VERSION_UINT(major,minor,rev) (((uint64_t)major)<<32 | ((uint64_t)minor) << 16 | rev)
3939
#define VERSION_UINT MAKE_VERSION_UINT(SGX_MAJOR_VERSION, SGX_MINOR_VERSION, SGX_REVISION_VERSION)
4040

4141
#define COPYRIGHT "Copyright (C) 2021 Intel Corporation"
4242

43-
#define UAE_SERVICE_VERSION "2.3.207.4"
44-
#define URTS_VERSION "1.1.111.4"
45-
#define ENCLAVE_COMMON_VERSION "1.0.114.4"
46-
#define LAUNCH_VERSION "1.0.109.4"
47-
#define EPID_VERSION "1.0.109.4"
48-
#define QUOTE_EX_VERSION "1.1.109.4"
43+
#define UAE_SERVICE_VERSION "2.3.208.2"
44+
#define URTS_VERSION "1.1.112.2"
45+
#define ENCLAVE_COMMON_VERSION "1.0.115.2"
46+
#define LAUNCH_VERSION "1.0.110.2"
47+
#define EPID_VERSION "1.0.110.2"
48+
#define QUOTE_EX_VERSION "1.1.110.2"
4949

5050
#endif

download_prebuilt.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333

3434
top_dir=`dirname $0`
3535
out_dir=$top_dir
36-
optlib_name=optimized_libs_2.13.tar.gz
37-
ae_file_name=prebuilt_ae_2.13.tar.gz
36+
optlib_name=optimized_libs_2.13.1.tar.gz
37+
ae_file_name=prebuilt_ae_2.13.1.tar.gz
3838
binutils_file_name=as.ld.objdump.gold.r3.tar.gz
39-
checksum_file=SHA256SUM_prebuilt_2.13.cfg
40-
server_url_path=https://download.01.org/intel-sgx/sgx-linux/2.13
39+
checksum_file=SHA256SUM_prebuilt_2.13.1.cfg
40+
server_url_path=https://download.01.org/intel-sgx/sgx-linux/2.13.1
4141
server_optlib_url=$server_url_path/$optlib_name
4242
server_ae_url=$server_url_path/$ae_file_name
4343
server_binutils_url=$server_url_path/$binutils_file_name

external/epid-sdk/ext/ipp/include/sgx_ippcp.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2011-2019 Intel Corporation. All rights reserved.
2+
* Copyright (C) 2011-2021 Intel Corporation. All rights reserved.
33
*
44
* Redistribution and use in source and binary forms, with or without
55
* modification, are permitted provided that the following conditions
@@ -83,6 +83,7 @@ extern "C" {
8383
#define ippsAESDecryptCTR sgx_disp_ippsAESDecryptCTR
8484
#define ippsAESEncryptXTS_Direct sgx_disp_ippsAESEncryptXTS_Direct
8585
#define ippsAESDecryptXTS_Direct sgx_disp_ippsAESDecryptXTS_Direct
86+
#define ippsAES_EncryptCFB16_MB sgx_disp_ippsAES_EncryptCFB16_MB
8687
#define ippsSMS4GetSize sgx_disp_ippsSMS4GetSize
8788
#define ippsSMS4Init sgx_disp_ippsSMS4Init
8889
#define ippsSMS4SetKey sgx_disp_ippsSMS4SetKey
@@ -347,6 +348,14 @@ extern "C" {
347348
#define ippsRSAVerify_PKCS1v15 sgx_disp_ippsRSAVerify_PKCS1v15
348349
#define ippsRSASign_PKCS1v15_rmf sgx_disp_ippsRSASign_PKCS1v15_rmf
349350
#define ippsRSAVerify_PKCS1v15_rmf sgx_disp_ippsRSAVerify_PKCS1v15_rmf
351+
#define ippsRSA_MB_GetBufferSizePublicKey sgx_disp_ippsRSA_MB_GetBufferSizePublicKey
352+
#define ippsRSA_MB_GetBufferSizePrivateKey sgx_disp_ippsRSA_MB_GetBufferSizePrivateKey
353+
#define ippsRSA_MB_Encrypt sgx_disp_ippsRSA_MB_Encrypt
354+
#define ippsRSA_MB_Decrypt sgx_disp_ippsRSA_MB_Decrypt
355+
#define ippsRSA_MB_Sign_PSS_rmf sgx_disp_ippsRSA_MB_Sign_PSS_rmf
356+
#define ippsRSA_MB_Verify_PSS_rmf sgx_disp_ippsRSA_MB_Verify_PSS_rmf
357+
#define ippsRSA_MB_Sign_PKCS1v15_rmf sgx_disp_ippsRSA_MB_Sign_PKCS1v15_rmf
358+
#define ippsRSA_MB_Verify_PKCS1v15_rmf sgx_disp_ippsRSA_MB_Verify_PKCS1v15_rmf
350359
#define ippsDLGetResultString sgx_disp_ippsDLGetResultString
351360
#define ippsDLPGetSize sgx_disp_ippsDLPGetSize
352361
#define ippsDLPInit sgx_disp_ippsDLPInit
@@ -509,7 +518,9 @@ extern "C" {
509518
#define ippsGFpECSetPointRandom sgx_disp_ippsGFpECSetPointRandom
510519
#define ippsGFpECMakePoint sgx_disp_ippsGFpECMakePoint
511520
#define ippsGFpECSetPointHash sgx_disp_ippsGFpECSetPointHash
521+
#define ippsGFpECSetPointHashBackCompatible sgx_disp_ippsGFpECSetPointHashBackCompatible
512522
#define ippsGFpECSetPointHash_rmf sgx_disp_ippsGFpECSetPointHash_rmf
523+
#define ippsGFpECSetPointHashBackCompatible_rmf sgx_disp_ippsGFpECSetPointHashBackCompatible_rmf
513524
#define ippsGFpECGetPoint sgx_disp_ippsGFpECGetPoint
514525
#define ippsGFpECGetPointRegular sgx_disp_ippsGFpECGetPointRegular
515526
#define ippsGFpECSetPointOctString sgx_disp_ippsGFpECSetPointOctString

external/ippcp_internal/Makefile

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ include ../../buildenv.mk
3434
DIR = $(CURDIR)
3535

3636
IPP_CONFIG = -Bbuild -DCMAKE_VERBOSE_MAKEFILE=on
37-
# Set the mitigation version assembler for IPP assembly code build
38-
IPP_CONFIG += -DCMAKE_ASM-ATT_COMPILER="$(BINUTILS_DIR)/as"
37+
3938
# Ignore the CMAKE C/C++ compiler check to avoid conflicts with mitigation options
4039
IPP_CONFIG += -DCMAKE_C_COMPILER_WORKS=TRUE -DCMAKE_CXX_COMPILER_WORKS=TRUE
4140
IPP_SOURCE = ipp-crypto
@@ -49,29 +48,23 @@ ENC_CXXFLAGS = $(ENC_CFLAGS)
4948

5049
IPP_CONFIG += -DCMAKE_C_FLAGS="$(ENC_CFLAGS)"
5150
IPP_CONFIG += -DCMAKE_CXX_FLAGS="$(ENC_CXXFLAGS)"
52-
comma:= ,
53-
ASM_FLAGS = $(subst -Wa$(comma),,$(MITIGATION_ASFLAGS))
54-
ENC_ASM_FLAGS = $(patsubst -fno-plt, , $(ASM_FLAGS))
55-
56-
IPP_CONFIG += -DCMAKE_ENC_ASM_FLAGS="$(ENC_ASM_FLAGS)"
5751

5852
SUB_DIR = no_mitigation
5953
ifeq ($(MITIGATION-CVE-2020-0551), LOAD)
6054
SUB_DIR = cve_2020_0551_load
55+
PRE_CONFIG= ASM_NASM="python $(DIR)/../../build-scripts/sgx-asm-pp.py --assembler=nasm --MITIGATION-CVE-2020-0551=LOAD"
6156
else ifeq ($(MITIGATION-CVE-2020-0551), CF)
6257
SUB_DIR = cve_2020_0551_cf
58+
PRE_CONFIG= ASM_NASM="python $(DIR)/../../build-scripts/sgx-asm-pp.py --assembler=nasm --MITIGATION-CVE-2020-0551=CF"
6359
endif
6460
OUT_DIR = lib/linux/$(ARCH)/$(SUB_DIR)/
6561

66-
PATCH_LOG = $(shell cd ./$(IPP_SOURCE) && git log --oneline --grep='Add mitigation support to assembly code' | cut -d' ' -f 3)
67-
CHECK_PATCHED :=
62+
CHECK_SOURCE :=
6863
# For reproducibility build in docker, the code should be
6964
# prepared before build. So skip the code check to avoid
7065
# triggering network request
7166
ifneq ($(origin NIX_PATH), environment)
72-
ifneq ($(PATCH_LOG), mitigation)
73-
CHECK_PATCHED:= ipp_source
74-
endif
67+
CHECK_SOURCE:= ipp_source
7568
endif
7669

7770
.PHONY: all build_ipp
@@ -80,23 +73,21 @@ all: build_ipp
8073
$(MKDIR) $(OUT_DIR)
8174
$(CP) ipp-crypto/build/.build/RELEASE/lib/libippcp.a $(OUT_DIR)
8275
$(CP) ipp-crypto/include/* ./inc/
83-
patch ipp-crypto/include/ippcp.h -i ./inc/ippcp19u5.patch -o ./inc/ippcp.h
76+
patch ipp-crypto/include/ippcp.h -i ./inc/ippcp20u3.patch -o ./inc/ippcp.h
8477
$(MKDIR) license
8578
$(CP) ipp-crypto/LICENSE ./license/
8679

87-
build_ipp: $(CHECK_PATCHED)
88-
cd $(IPP_SOURCE) && cmake CMakeLists.txt $(IPP_CONFIG) && cd build && make ippcp_s
80+
build_ipp: $(CHECK_SOURCE)
81+
cd $(IPP_SOURCE) && $(PRE_CONFIG) cmake CMakeLists.txt $(IPP_CONFIG) && cd build && make ippcp_s
8982

9083
.PHONY: ipp_source
9184
ipp_source:
92-
## Need to enable below code when release
93-
#ifeq ($(shell git rev-parse --is-inside-work-tree), true)
94-
# git submodule update -f --init --recursive --remote -- $(IPP_SOURCE)
95-
#else
85+
ifeq ($(shell git rev-parse --is-inside-work-tree), true)
86+
git submodule update -f --init --recursive --remote -- $(IPP_SOURCE)
87+
else
9688
$(RM) -rf $(IPP_SOURCE)
97-
git clone -b ipp-crypto_2019_update5 https://github.com/intel/ipp-crypto.git --depth 1 $(IPP_SOURCE)
98-
#endif
99-
cd $(IPP_SOURCE) && git am ../0001-Add-mitigation-support-to-assembly-code.patch
89+
git clone -b ipp-crypto_2020_update3 https://github.com/intel/ipp-crypto.git --depth 1 $(IPP_SOURCE)
90+
endif
10091

10192
.PHONY: clean
10293
clean:

external/ippcp_internal/inc/ippcp19u5.patch

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--- ipp-crypto/include/ippcp.h 2021-01-15 01:05:21.173829157 -0800
2+
+++ inc/ippcp.h 2021-01-15 01:13:36.269813105 -0800
3+
@@ -23,6 +23,9 @@
4+
#if !defined( IPPCP_H__ ) || defined( _OWN_BLDPCS )
5+
#define IPPCP_H__
6+
7+
+#ifndef _SGX_IPPCP_H_
8+
+#include "sgx_ippcp.h"
9+
+#endif
10+
11+
#ifndef IPPCPDEFS_H__
12+
#include "ippcpdefs.h"

0 commit comments

Comments
 (0)