Update to cryptopp 8.1
This commit is contained in:
parent
a8aeec2f75
commit
7b742f41e3
7
vendor/README
vendored
7
vendor/README
vendored
@ -2,11 +2,6 @@ This directory contains external projects, taken from the following locations:
|
||||
googletest: https://github.com/google/googletest/tree/4e4df226fc197c0dda6e37f5c8c3845ca1e73a49
|
||||
- changed: added NOLINT comment as workaround for clang-tidy warning https://github.com/google/googletest/issues/853
|
||||
spdlog: https://github.com/gabime/spdlog/tree/v0.16.3/include/spdlog
|
||||
cryptopp: https://github.com/weidai11/cryptopp/tree/CRYPTOPP_8_0_0
|
||||
cryptopp: https://github.com/weidai11/cryptopp/tree/CRYPTOPP_8_1_0
|
||||
- changed: added CMakeLists.txt and cryptopp-config.cmake from https://github.com/noloader/cryptopp-cmake/tree/CRYPTOPP_8_0_0
|
||||
- changed: commented out line including winapifamily.h in CMakeLists.txt
|
||||
- cherry-picked commits to get OpenMP for scrypt on Windows:
|
||||
- https://github.com/weidai11/cryptopp/commit/aa043b38a7930725c31a0cd7016986d1c581c573
|
||||
- https://github.com/weidai11/cryptopp/commit/672f5c7f3dad8ae12b2d0ce0940ccb7c8e257bf8
|
||||
- https://github.com/weidai11/cryptopp/commit/7e96a283a3192d29aac5b60e5b4ff19248f00d9a
|
||||
- https://github.com/weidai11/cryptopp/commit/ca32b63038d5f7b13e2e00809cd9184a1efe8c24
|
||||
|
54
vendor/cryptopp/vendor_cryptopp/.appveyor.yml
vendored
54
vendor/cryptopp/vendor_cryptopp/.appveyor.yml
vendored
@ -1,54 +0,0 @@
|
||||
# Appveyor's documentation is at https://www.appveyor.com/docs/build-phase/,
|
||||
# and a sample configuration file is at https://www.appveyor.com/docs/appveyor-yml/.
|
||||
# I have to admit its a bit complex and I don't fully understand it.
|
||||
|
||||
version: 1.0.{build}
|
||||
clone_depth: 3
|
||||
skip_tags: true
|
||||
|
||||
configuration:
|
||||
|
||||
- Debug
|
||||
- Release
|
||||
|
||||
platform:
|
||||
|
||||
- Win32
|
||||
- x64
|
||||
|
||||
image:
|
||||
|
||||
- Visual Studio 2017
|
||||
- Visual Studio 2015
|
||||
- Visual Studio 2013
|
||||
|
||||
environment:
|
||||
|
||||
matrix:
|
||||
|
||||
- BUILD_MODE: MSBuild
|
||||
|
||||
# Disable build through solution file
|
||||
build: off
|
||||
|
||||
# Build through commands in script below
|
||||
test_script:
|
||||
|
||||
- ps: >-
|
||||
|
||||
msbuild /t:Build /p:platform="$env:platform" /p:configuration="$env:configuration" cryptlib.vcxproj
|
||||
|
||||
msbuild /t:Build /p:platform="$env:platform" /p:configuration="$env:configuration" cryptest.vcxproj
|
||||
|
||||
msbuild /t:CopyCryptestToRoot cryptest.vcxproj
|
||||
|
||||
.\cryptest.exe v
|
||||
|
||||
.\cryptest.exe tv all
|
||||
|
||||
notifications:
|
||||
- provider: Email
|
||||
to:
|
||||
- cryptopp-build@googlegroups.com
|
||||
on_build_success: true
|
||||
on_build_failure: true
|
@ -1 +0,0 @@
|
||||
*.sh eol=lf
|
@ -1,15 +0,0 @@
|
||||
### Crypto++ Issue Report
|
||||
|
||||
Thanks for taking the time to report an issue. Reporting issues helps us improve stability and reliability for all users, so it is a valuable contribution.
|
||||
|
||||
Please do not ask questions in the bug tracker. Please ask questions on the Crypto++ Users List at http://groups.google.com/forum/#!forum/cryptopp-users.
|
||||
|
||||
There is a wiki page with information on filing useful bug reports. If you have some time please visit http://www.cryptopp.com/wiki/Bug_Report on the wiki. The executive summary is:
|
||||
|
||||
* State the operating system and version (Ubutnu 17 x86_64, Windows 7 Professional x64, etc)
|
||||
* State the version of the Crypto++ library (Crypto++ 5.6.5, Master, etc)
|
||||
* State how you built the library (Makefile, Cmake, distro, etc)
|
||||
* Show a typical command line (the output of the compiler for cryptlib.cpp)
|
||||
* Show the link command (the output of the linker for libcryptopp.so or cryptest.exe)
|
||||
* Show the exact error message you are receiving (copy and paste it); or
|
||||
* Clearly state the undesired behavior (and state the expected behavior)
|
7
vendor/cryptopp/vendor_cryptopp/.gitignore
vendored
7
vendor/cryptopp/vendor_cryptopp/.gitignore
vendored
@ -1,3 +1,10 @@
|
||||
####################################
|
||||
# C++ generic ignore
|
||||
# Allows you to use test.cxx and
|
||||
# avoid getting in the way of things
|
||||
####################################
|
||||
*.cxx
|
||||
|
||||
####################
|
||||
## Crypto++ specific
|
||||
####################
|
||||
|
149
vendor/cryptopp/vendor_cryptopp/.travis.yml
vendored
149
vendor/cryptopp/vendor_cryptopp/.travis.yml
vendored
@ -1,149 +0,0 @@
|
||||
language: cpp
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
dist: trusty
|
||||
sudo: required
|
||||
|
||||
# OS X only supports one image. Use the latest.
|
||||
osx_image: xcode9.1
|
||||
|
||||
git:
|
||||
depth: 3
|
||||
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
|
||||
env:
|
||||
global:
|
||||
- BUILD_JOBS=2
|
||||
- ANDROID_HOME=$HOME/android/sdk
|
||||
- ANDROID_NDK=$HOME/android/sdk/ndk-bundle
|
||||
- ANDROID_SDK_ROOT=$ANDROID_HOME
|
||||
- ANDROID_NDK_ROOT=$ANDROID_NDK
|
||||
|
||||
matrix:
|
||||
- BUILD_MODE="all"
|
||||
- BUILD_MODE="native"
|
||||
- BUILD_MODE="no-asm"
|
||||
- BUILD_MODE="debug"
|
||||
- BUILD_MODE="asan"
|
||||
- BUILD_MODE="ubsan"
|
||||
|
||||
matrix:
|
||||
|
||||
exclude:
|
||||
# Skip GCC on OS X entirely
|
||||
- os: osx
|
||||
compiler: gcc
|
||||
# Skip UBsan due to GCC 4.8
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env: BUILD_MODE="ubsan"
|
||||
# Skip UBsan due to Clang 3.4
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env: BUILD_MODE="ubsan"
|
||||
|
||||
include:
|
||||
- os: linux
|
||||
env:
|
||||
- BUILD_MODE=android
|
||||
- PLATFORM=armeabi
|
||||
- os: linux
|
||||
env:
|
||||
- BUILD_MODE=android
|
||||
- PLATFORM=armeabi-v7a
|
||||
- os: linux
|
||||
env:
|
||||
- BUILD_MODE=android
|
||||
- PLATFORM=armv7a-neon
|
||||
- os: linux
|
||||
env:
|
||||
- BUILD_MODE=android
|
||||
- PLATFORM=aarch64
|
||||
- os: linux
|
||||
env:
|
||||
- BUILD_MODE=android
|
||||
- PLATFORM=mipsel
|
||||
- os: linux
|
||||
env:
|
||||
- BUILD_MODE=android
|
||||
- PLATFORM=mipsel64
|
||||
- os: linux
|
||||
env:
|
||||
- BUILD_MODE=android
|
||||
- PLATFORM=x86
|
||||
- os: linux
|
||||
env:
|
||||
- BUILD_MODE=android
|
||||
- PLATFORM=x86_64
|
||||
- os: osx
|
||||
env:
|
||||
- BUILD_MODE=ios
|
||||
- PLATFORM=iPhoneOS
|
||||
- os: osx
|
||||
env:
|
||||
- BUILD_MODE=ios
|
||||
- PLATFORM=WatchOS
|
||||
- os: osx
|
||||
env:
|
||||
- BUILD_MODE=ios
|
||||
- PLATFORM=AppleTVOS
|
||||
- os: osx
|
||||
env:
|
||||
- BUILD_MODE=ios
|
||||
- PLATFORM=iPhoneSimulator
|
||||
|
||||
allow_failures:
|
||||
- os: osx
|
||||
env:
|
||||
- BUILD_MODE=ios
|
||||
- PLATFORM=WatchOS
|
||||
|
||||
before_install:
|
||||
- |
|
||||
if [[ "$BUILD_MODE" == "android" ]]; then
|
||||
TestScripts/install-android.sh
|
||||
fi
|
||||
|
||||
script:
|
||||
- |
|
||||
if [[ "$BUILD_MODE" == "ios" ]]; then
|
||||
cp ./TestScripts/setenv-ios.sh .
|
||||
TestScripts/cryptest-ios.sh
|
||||
elif [[ "$BUILD_MODE" == "android" ]]; then
|
||||
cp ./TestScripts/setenv-android.sh .
|
||||
TestScripts/cryptest-android.sh
|
||||
elif [[ "$BUILD_MODE" == "debug" ]]; then
|
||||
CXXFLAGS="-DDEBUG -g2 -O1" make -j "$BUILD_JOBS"
|
||||
./cryptest.exe v
|
||||
./cryptest.exe tv all
|
||||
else
|
||||
make "$BUILD_MODE" -j "$BUILD_JOBS"
|
||||
./cryptest.exe v
|
||||
./cryptest.exe tv all
|
||||
fi
|
||||
|
||||
# whitelist branches to avoid testing feature branches twice
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
addons:
|
||||
sonarcloud: false
|
||||
|
||||
coverity_scan:
|
||||
project:
|
||||
name: "cryptopp"
|
||||
build_command: "make -j 2"
|
||||
|
||||
notifications:
|
||||
email:
|
||||
recipients:
|
||||
- cryptopp-build@googlegroups.com
|
||||
on_success: always # default: change
|
||||
on_failure: always # default: always
|
2
vendor/cryptopp/vendor_cryptopp/Doxyfile
vendored
2
vendor/cryptopp/vendor_cryptopp/Doxyfile
vendored
@ -41,7 +41,7 @@ PROJECT_NAME = Crypto++
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = 8.0
|
||||
PROJECT_NUMBER = 8.1
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
17
vendor/cryptopp/vendor_cryptopp/Filelist.txt
vendored
17
vendor/cryptopp/vendor_cryptopp/Filelist.txt
vendored
@ -18,6 +18,7 @@ aria.cpp
|
||||
aria_simd.cpp
|
||||
aria.h
|
||||
argnames.h
|
||||
arm_simd.h
|
||||
asn.cpp
|
||||
asn.h
|
||||
authenc.cpp
|
||||
@ -55,6 +56,8 @@ chacha.cpp
|
||||
chacha_avx.cpp
|
||||
chacha_simd.cpp
|
||||
chacha.h
|
||||
chachapoly.cpp
|
||||
chachapoly.h
|
||||
cham.cpp
|
||||
cham_simd.cpp
|
||||
cham.h
|
||||
@ -146,6 +149,7 @@ gf256.cpp
|
||||
gf256.h
|
||||
gf2_32.cpp
|
||||
gf2_32.h
|
||||
gf2n_simd.cpp
|
||||
gf2n.cpp
|
||||
gf2n.h
|
||||
gfpcrypt.cpp
|
||||
@ -182,9 +186,9 @@ kalynatab.cpp
|
||||
kalyna.cpp
|
||||
kalyna.h
|
||||
keccak.cpp
|
||||
keccak_core.cpp
|
||||
keccak_simd.cpp
|
||||
keccak.h
|
||||
keccakc.cpp
|
||||
keccakc.h
|
||||
lubyrack.h
|
||||
lea.cpp
|
||||
lea_simd.cpp
|
||||
@ -305,6 +309,8 @@ sha3.h
|
||||
shacal2.cpp
|
||||
shacal2_simd.cpp
|
||||
shacal2.h
|
||||
shake.cpp
|
||||
shake.h
|
||||
shark.cpp
|
||||
shark.h
|
||||
sharkbox.cpp
|
||||
@ -473,6 +479,7 @@ TestData/x25519v0.dat
|
||||
TestData/x25519v1.dat
|
||||
TestData/xtrdh171.dat
|
||||
TestData/xtrdh342.dat
|
||||
TestVectors/aead.txt
|
||||
TestVectors/aes.txt
|
||||
TestVectors/all.txt
|
||||
TestVectors/aria.txt
|
||||
@ -483,6 +490,7 @@ TestVectors/camellia.txt
|
||||
TestVectors/ccm.txt
|
||||
TestVectors/chacha.txt
|
||||
TestVectors/chacha_tls.txt
|
||||
TestVectors/chacha20poly1305.txt
|
||||
TestVectors/cham.txt
|
||||
TestVectors/cmac.txt
|
||||
TestVectors/dlies.txt
|
||||
@ -502,8 +510,9 @@ TestVectors/keccak.txt
|
||||
TestVectors/lea.txt
|
||||
TestVectors/mars.txt
|
||||
TestVectors/nr.txt
|
||||
TestVectors/ocb.txt
|
||||
TestVectors/panama.txt
|
||||
TestVectors/poly1305aes.txt
|
||||
TestVectors/poly1305_tls.txt
|
||||
TestVectors/rabbit.txt
|
||||
TestVectors/Readme.txt
|
||||
TestVectors/rsa_oaep.txt
|
||||
@ -528,6 +537,7 @@ TestVectors/sha3_256_fips_202.txt
|
||||
TestVectors/sha3_384_fips_202.txt
|
||||
TestVectors/sha3_512_fips_202.txt
|
||||
TestVectors/sha3_fips_202.txt
|
||||
TestVectors/shake.txt
|
||||
TestVectors/shacal2.txt
|
||||
TestVectors/simeck.txt
|
||||
TestVectors/simon.txt
|
||||
@ -542,6 +552,7 @@ TestVectors/ttmac.txt
|
||||
TestVectors/vmac.txt
|
||||
TestVectors/wake.txt
|
||||
TestVectors/whrlpool.txt
|
||||
TestVectors/xchacha.txt
|
||||
TestPrograms/test_32bit.cxx
|
||||
TestPrograms/test_64bit.cxx
|
||||
TestPrograms/test_arm_acle.cxx
|
||||
|
114
vendor/cryptopp/vendor_cryptopp/GNUmakefile
vendored
114
vendor/cryptopp/vendor_cryptopp/GNUmakefile
vendored
@ -24,21 +24,16 @@ RANLIB ?= ranlib
|
||||
CP ?= cp
|
||||
MV ?= mv
|
||||
RM ?= rm -f
|
||||
GREP ?= grep
|
||||
CHMOD ?= chmod
|
||||
MKDIR ?= mkdir -p
|
||||
|
||||
LN ?= ln -sf
|
||||
LDCONF ?= /sbin/ldconfig -n
|
||||
|
||||
INSTALL = install
|
||||
INSTALL_PROGRAM = $(INSTALL)
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
|
||||
# Solaris provides a non-Posix grep at /usr/bin
|
||||
ifneq ($(wildcard /usr/xpg4/bin/grep),)
|
||||
GREP ?= /usr/xpg4/bin/grep
|
||||
else
|
||||
GREP ?= grep
|
||||
GREP := /usr/xpg4/bin/grep
|
||||
endif
|
||||
|
||||
# Attempt to determine target machine, fallback to "this" machine.
|
||||
@ -67,6 +62,7 @@ ifeq ($(SYSTEMX),)
|
||||
endif
|
||||
|
||||
IS_LINUX := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c "Linux")
|
||||
IS_HURD := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c -E "GNU|Hurd")
|
||||
IS_MINGW := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c "MinGW")
|
||||
IS_CYGWIN := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c "Cygwin")
|
||||
IS_DARWIN := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c "Darwin")
|
||||
@ -91,7 +87,7 @@ endif
|
||||
|
||||
# Enable shared object versioning for Linux and Solaris
|
||||
HAS_SOLIB_VERSION ?= 0
|
||||
ifneq ($(IS_LINUX)$(IS_SUN),00)
|
||||
ifneq ($(IS_LINUX)$(IS_HURD)$(IS_SUN),000)
|
||||
HAS_SOLIB_VERSION := 1
|
||||
endif
|
||||
|
||||
@ -100,9 +96,9 @@ ifeq ($(wildcard adhoc.cpp),)
|
||||
$(shell cp adhoc.cpp.proto adhoc.cpp)
|
||||
endif
|
||||
|
||||
# Tell MacPorts and Homebrew GCC to use Clang integrated assembler
|
||||
# Tell MacPorts and Homebrew GCC to use Clang integrated assembler (only on Intel-based Macs)
|
||||
# http://github.com/weidai11/cryptopp/issues/190
|
||||
ifeq ($(GCC_COMPILER)$(OSXPORT_COMPILER),11)
|
||||
ifeq ($(GCC_COMPILER)$(OSXPORT_COMPILER)$(IS_PPC32)$(IS_PPC64),1100)
|
||||
ifeq ($(findstring -Wa,-q,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -Wa,-q
|
||||
endif
|
||||
@ -126,6 +122,9 @@ ifeq ($(DETECT_FEATURES),1)
|
||||
ifneq ($(strip $(TCXXFLAGS)),)
|
||||
$(info Using testing flags: $(TCXXFLAGS))
|
||||
endif
|
||||
#TPROG = TestPrograms/test_cxx.cxx
|
||||
#$(info Testing compile... )
|
||||
#$(info $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 1>/dev/null))
|
||||
endif
|
||||
|
||||
# Fixup AIX
|
||||
@ -271,6 +270,7 @@ ifeq ($(DETECT_FEATURES),1)
|
||||
ifeq ($(strip $(HAVE_OPT)),0)
|
||||
ARIA_FLAG = $(SSSE3_FLAG)
|
||||
CHAM_FLAG = $(SSSE3_FLAG)
|
||||
KECCAK_FLAG = $(SSSE3_FLAG)
|
||||
LEA_FLAG = $(SSSE3_FLAG)
|
||||
SIMECK_FLAG = $(SSSE3_FLAG)
|
||||
SIMON64_FLAG = $(SSSE3_FLAG)
|
||||
@ -310,6 +310,7 @@ ifeq ($(DETECT_FEATURES),1)
|
||||
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
|
||||
ifeq ($(strip $(HAVE_OPT)),0)
|
||||
GCM_FLAG = $(SSSE3_FLAG) $(CLMUL_FLAG)
|
||||
GF2N_FLAG = $(CLMUL_FLAG)
|
||||
SUN_LDFLAGS += $(CLMUL_FLAG)
|
||||
else
|
||||
CLMUL_FLAG =
|
||||
@ -392,6 +393,13 @@ ifeq ($(DETECT_FEATURES),1)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Drop to SSE2 if available
|
||||
ifeq ($(GCM_FLAG),)
|
||||
ifneq ($(SSE2_FLAG),)
|
||||
GCM_FLAG = $(SSE2_FLAG)
|
||||
endif
|
||||
endif
|
||||
|
||||
# DETECT_FEATURES
|
||||
endif
|
||||
|
||||
@ -521,6 +529,7 @@ ifeq ($(IS_ARMV8),1)
|
||||
HAVE_OPT = $(shell $(CXX) $(CXXFLAGS) $(ACLE_FLAG) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
|
||||
ifeq ($(strip $(HAVE_OPT)),0)
|
||||
GCM_FLAG = -march=armv8-a+crypto
|
||||
GF2N_FLAG = -march=armv8-a+crypto
|
||||
else
|
||||
CXXFLAGS += -DCRYPTOPP_ARM_PMULL_AVAILABLE=0
|
||||
endif
|
||||
@ -616,6 +625,7 @@ ifeq ($(DETECT_FEATURES),1)
|
||||
BLAKE2B_FLAG = $(POWER8_FLAG)
|
||||
CRC_FLAG = $(POWER8_FLAG)
|
||||
GCM_FLAG = $(POWER8_FLAG)
|
||||
GF2N_FLAG = $(POWER8_FLAG)
|
||||
AES_FLAG = $(POWER8_FLAG)
|
||||
SHA_FLAG = $(POWER8_FLAG)
|
||||
SHACAL2_FLAG = $(POWER8_FLAG)
|
||||
@ -808,22 +818,22 @@ ifeq ($(IS_SUN)$(SUN_COMPILER),11)
|
||||
endif # SunOS
|
||||
|
||||
# TODO: can we remove this since removing sockets?
|
||||
ifneq ($(IS_MINGW),0)
|
||||
LDLIBS += -lws2_32
|
||||
endif
|
||||
#ifneq ($(IS_MINGW),0)
|
||||
# LDLIBS += -lws2_32
|
||||
#endif
|
||||
|
||||
# TODO: can we remove this since removing sockets?
|
||||
ifneq ($(IS_SUN),0)
|
||||
LDLIBS += -lnsl -lsocket
|
||||
endif
|
||||
#ifneq ($(IS_SUN),0)
|
||||
# LDLIBS += -lnsl -lsocket
|
||||
#endif
|
||||
|
||||
ifeq ($(IS_LINUX),1)
|
||||
ifneq ($(IS_LINUX)$(IS_HURD),00)
|
||||
ifeq ($(findstring -fopenmp,$(CXXFLAGS)),-fopenmp)
|
||||
ifeq ($(findstring -lgomp,$(LDLIBS)),)
|
||||
LDLIBS += -lgomp
|
||||
endif # LDLIBS
|
||||
endif # OpenMP
|
||||
endif # IS_LINUX
|
||||
endif # IS_LINUX or IS_HURD
|
||||
|
||||
# Add -errtags=yes to get the name for a warning suppression
|
||||
ifneq ($(SUN_COMPILER),0) # override flags for CC Sun C++ compiler
|
||||
@ -1007,7 +1017,7 @@ ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
# Different patchlevels and minors are compatible since 6.1
|
||||
SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR)
|
||||
# Linux uses -Wl,-soname
|
||||
ifeq ($(IS_LINUX),1)
|
||||
ifneq ($(IS_LINUX)$(IS_HURD),00)
|
||||
# Linux uses full version suffix for shared library
|
||||
SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)
|
||||
SOLIB_FLAGS=-Wl,-soname,libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
|
||||
@ -1122,9 +1132,13 @@ lcov coverage: cryptest.exe
|
||||
lcov --base-directory . --directory . --zerocounters -q
|
||||
./cryptest.exe v
|
||||
./cryptest.exe tv all
|
||||
./cryptest.exe b 0.25
|
||||
lcov --base-directory . --directory . -c -o cryptest.info
|
||||
lcov --remove cryptest.info "adhoc.cpp" "wait.*" "network.*" "socketft.*" "fips140.*" "*test.*" "bench*.cpp" "validat*.*" "/usr/*" -o cryptest.info
|
||||
genhtml -o ./TestCoverage/ -t "cryptest.exe test coverage" --num-spaces 4 cryptest.info
|
||||
lcov --remove cryptest.info "adhoc.*" -o cryptest.info
|
||||
lcov --remove cryptest.info "fips140.*" -o cryptest.info
|
||||
lcov --remove cryptest.info "*test.*" -o cryptest.info
|
||||
lcov --remove cryptest.info "/usr/*" -o cryptest.info
|
||||
genhtml -o ./TestCoverage/ -t "Crypto++ test coverage" --num-spaces 4 cryptest.info
|
||||
|
||||
# Travis CI and CodeCov rule
|
||||
.PHONY: gcov codecov
|
||||
@ -1218,11 +1232,14 @@ distclean: clean autotools-clean cmake-clean
|
||||
.PHONY: install
|
||||
install: cryptest.exe install-lib
|
||||
@-$(MKDIR) $(DESTDIR)$(BINDIR)
|
||||
$(INSTALL_PROGRAM) cryptest.exe $(DESTDIR)$(BINDIR)
|
||||
$(CP) cryptest.exe $(DESTDIR)$(BINDIR)
|
||||
$(CHMOD) 0755 $(DESTDIR)$(BINDIR)/cryptest.exe
|
||||
@-$(MKDIR) $(DESTDIR)$(DATADIR)/cryptopp/TestData
|
||||
@-$(MKDIR) $(DESTDIR)$(DATADIR)/cryptopp/TestVectors
|
||||
$(INSTALL_DATA) TestData/*.dat $(DESTDIR)$(DATADIR)/cryptopp/TestData
|
||||
$(INSTALL_DATA) TestVectors/*.txt $(DESTDIR)$(DATADIR)/cryptopp/TestVectors
|
||||
$(CP) TestData/*.dat $(DESTDIR)$(DATADIR)/cryptopp/TestData
|
||||
$(CHMOD) 0644 $(DESTDIR)$(DATADIR)/cryptopp/TestData/*.dat
|
||||
$(CP) TestVectors/*.txt $(DESTDIR)$(DATADIR)/cryptopp/TestVectors
|
||||
$(CHMOD) 0644 $(DESTDIR)$(DATADIR)/cryptopp/TestVectors/*.txt
|
||||
|
||||
# A recipe to install only the library, and not cryptest.exe. Also
|
||||
# see https://github.com/weidai11/cryptopp/issues/653. Some users
|
||||
@ -1231,19 +1248,23 @@ install: cryptest.exe install-lib
|
||||
.PHONY: install-lib
|
||||
install-lib:
|
||||
@-$(MKDIR) $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
$(INSTALL_DATA) *.h $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
$(CP) *.h $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
$(CHMOD) 0644 $(DESTDIR)$(INCLUDEDIR)/cryptopp/*.h
|
||||
ifneq ($(wildcard libcryptopp.a),)
|
||||
@-$(MKDIR) $(DESTDIR)$(LIBDIR)
|
||||
$(INSTALL_DATA) libcryptopp.a $(DESTDIR)$(LIBDIR)
|
||||
$(CP) libcryptopp.a $(DESTDIR)$(LIBDIR)
|
||||
$(CHMOD) 0644 $(DESTDIR)$(LIBDIR)/libcryptopp.a
|
||||
endif
|
||||
ifneq ($(wildcard libcryptopp.dylib),)
|
||||
@-$(MKDIR) $(DESTDIR)$(LIBDIR)
|
||||
$(INSTALL_PROGRAM) libcryptopp.dylib $(DESTDIR)$(LIBDIR)
|
||||
$(CP) libcryptopp.dylib $(DESTDIR)$(LIBDIR)
|
||||
$(CHMOD) 0755 $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
|
||||
-install_name_tool -id $(DESTDIR)$(LIBDIR)/libcryptopp.dylib $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
|
||||
endif
|
||||
ifneq ($(wildcard libcryptopp.so$(SOLIB_VERSION_SUFFIX)),)
|
||||
@-$(MKDIR) $(DESTDIR)$(LIBDIR)
|
||||
$(INSTALL_PROGRAM) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)
|
||||
$(CP) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)
|
||||
$(CHMOD) 0755 $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)/libcryptopp.so
|
||||
$(LDCONF) $(DESTDIR)$(LIBDIR)
|
||||
@ -1251,7 +1272,8 @@ endif
|
||||
endif
|
||||
ifneq ($(wildcard libcryptopp.pc),)
|
||||
@-$(MKDIR) $(DESTDIR)$(LIBDIR)/pkgconfig
|
||||
$(INSTALL_DATA) libcryptopp.pc $(DESTDIR)$(LIBDIR)/pkgconfig/libcryptopp.pc
|
||||
$(CP) libcryptopp.pc $(DESTDIR)$(LIBDIR)/pkgconfig
|
||||
$(CHMOD) 0644 $(DESTDIR)$(LIBDIR)/pkgconfig/libcryptopp.pc
|
||||
endif
|
||||
|
||||
.PHONY: remove uninstall
|
||||
@ -1327,7 +1349,7 @@ libcryptopp.pc:
|
||||
@echo '' >> libcryptopp.pc
|
||||
@echo 'Name: Crypto++' >> libcryptopp.pc
|
||||
@echo 'Description: Crypto++ cryptographic library' >> libcryptopp.pc
|
||||
@echo 'Version: 8.0' >> libcryptopp.pc
|
||||
@echo 'Version: 8.1' >> libcryptopp.pc
|
||||
@echo 'URL: https://cryptopp.com/' >> libcryptopp.pc
|
||||
@echo '' >> libcryptopp.pc
|
||||
@echo 'Cflags: -I$${includedir}' >> libcryptopp.pc
|
||||
@ -1380,7 +1402,7 @@ ifneq ($(IS_DARWIN),0)
|
||||
$(CP) cryptopp$(LIB_VER).zip $(PWD)/cryptopp$(LIB_VER)
|
||||
hdiutil makehybrid -iso -joliet -o cryptopp$(LIB_VER).iso $(PWD)/cryptopp$(LIB_VER)
|
||||
@-$(RM) -r $(PWD)/cryptopp$(LIB_VER)
|
||||
else ifneq ($(IS_LINUX),0)
|
||||
else ifneq ($(IS_LINUX)$(IS_HURD),00)
|
||||
$(MKDIR) $(PWD)/cryptopp$(LIB_VER)
|
||||
$(CP) cryptopp$(LIB_VER).zip $(PWD)/cryptopp$(LIB_VER)
|
||||
genisoimage -q -o cryptopp$(LIB_VER).iso $(PWD)/cryptopp$(LIB_VER)
|
||||
@ -1434,6 +1456,10 @@ chacha_avx.o : chacha_avx.cpp
|
||||
cham_simd.o : cham_simd.cpp
|
||||
$(CXX) $(strip $(CXXFLAGS) $(CHAM_FLAG) -c) $<
|
||||
|
||||
# SSE4.2 or ARMv8a available
|
||||
crc_simd.o : crc_simd.cpp
|
||||
$(CXX) $(strip $(CXXFLAGS) $(CRC_FLAG) -c) $<
|
||||
|
||||
# Power9 available
|
||||
darn.o : darn.cpp
|
||||
$(CXX) $(strip $(CXXFLAGS) $(DARN_FLAG) -c) $<
|
||||
@ -1442,18 +1468,18 @@ darn.o : darn.cpp
|
||||
donna_sse.o : donna_sse.cpp
|
||||
$(CXX) $(strip $(CXXFLAGS) $(SSE2_FLAG) -c) $<
|
||||
|
||||
# SSE2 on i686
|
||||
sse_simd.o : sse_simd.cpp
|
||||
$(CXX) $(strip $(CXXFLAGS) $(SSE2_FLAG) -c) $<
|
||||
|
||||
# SSE4.2 or ARMv8a available
|
||||
crc_simd.o : crc_simd.cpp
|
||||
$(CXX) $(strip $(CXXFLAGS) $(CRC_FLAG) -c) $<
|
||||
|
||||
# PCLMUL or ARMv7a/ARMv8a available
|
||||
# Carryless multiply
|
||||
gcm_simd.o : gcm_simd.cpp
|
||||
$(CXX) $(strip $(CXXFLAGS) $(GCM_FLAG) -c) $<
|
||||
|
||||
# Carryless multiply
|
||||
gf2n_simd.o : gf2n_simd.cpp
|
||||
$(CXX) $(strip $(CXXFLAGS) $(GF2N_FLAG) -c) $<
|
||||
|
||||
# SSSE3 available
|
||||
keccak_simd.o : keccak_simd.cpp
|
||||
$(CXX) $(strip $(CXXFLAGS) $(KECCAK_FLAG) -c) $<
|
||||
|
||||
# SSSE3 available
|
||||
lea_simd.o : lea_simd.cpp
|
||||
$(CXX) $(strip $(CXXFLAGS) $(LEA_FLAG) -c) $<
|
||||
@ -1525,8 +1551,16 @@ sm4_simd.o : sm4_simd.cpp
|
||||
ifeq ($(XLC_COMPILER),1)
|
||||
sm3.o : sm3.cpp
|
||||
$(CXX) $(strip $(subst -O3,-O2,$(CXXFLAGS)) -c) $<
|
||||
donna_32.o : donna_32.cpp
|
||||
$(CXX) $(strip $(subst -O3,-O2,$(CXXFLAGS)) -c) $<
|
||||
donna_64.o : donna_64.cpp
|
||||
$(CXX) $(strip $(subst -O3,-O2,$(CXXFLAGS)) -c) $<
|
||||
endif
|
||||
|
||||
# SSE2 on i686
|
||||
sse_simd.o : sse_simd.cpp
|
||||
$(CXX) $(strip $(CXXFLAGS) $(SSE2_FLAG) -c) $<
|
||||
|
||||
# Don't build Rijndael with UBsan. Too much noise due to unaligned data accesses.
|
||||
ifneq ($(findstring -fsanitize=undefined,$(CXXFLAGS)),)
|
||||
rijndael.o : rijndael.cpp
|
||||
|
@ -26,10 +26,6 @@ EGREP ?= egrep
|
||||
LN ?= ln -sf
|
||||
LDCONF ?= /sbin/ldconfig -n
|
||||
|
||||
INSTALL = install
|
||||
INSTALL_PROGRAM = $(INSTALL)
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
|
||||
IS_IOS ?= 0
|
||||
IS_ANDROID ?= 0
|
||||
IS_ARM_EMBEDDED ?= 0
|
||||
@ -188,6 +184,9 @@ ifeq ($(DETECT_FEATURES),1)
|
||||
ifneq ($(strip $(TCXXFLAGS)),)
|
||||
$(info Using testing flags: $(TCXXFLAGS))
|
||||
endif
|
||||
#TPROG = TestPrograms/test_cxx.cxx
|
||||
#$(info Testing compile... )
|
||||
#$(info $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 1>/dev/null))
|
||||
endif
|
||||
|
||||
# For the previous messages
|
||||
@ -335,6 +334,13 @@ ifeq ($(DETECT_FEATURES),1)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Drop to SSE2 if available
|
||||
ifeq ($(GCM_FLAG),)
|
||||
ifneq ($(SSE2_FLAG),)
|
||||
GCM_FLAG = $(SSE2_FLAG)
|
||||
endif
|
||||
endif
|
||||
|
||||
# DETECT_FEATURES
|
||||
endif
|
||||
|
||||
@ -693,34 +699,47 @@ distclean: clean autotools-clean cmake-clean
|
||||
.PHONY: install
|
||||
install: cryptest.exe install-lib
|
||||
@-$(MKDIR) $(DESTDIR)$(BINDIR)
|
||||
$(INSTALL_PROGRAM) cryptest.exe $(DESTDIR)$(BINDIR)
|
||||
$(CP) cryptest.exe $(DESTDIR)$(BINDIR)
|
||||
$(CHMOD) 0755 $(DESTDIR)$(BINDIR)/cryptest.exe
|
||||
@-$(MKDIR) $(DESTDIR)$(DATADIR)/cryptopp/TestData
|
||||
@-$(MKDIR) $(DESTDIR)$(DATADIR)/cryptopp/TestVectors
|
||||
$(INSTALL_DATA) TestData/*.dat $(DESTDIR)$(DATADIR)/cryptopp/TestData
|
||||
$(INSTALL_DATA) TestVectors/*.txt $(DESTDIR)$(DATADIR)/cryptopp/TestVectors
|
||||
$(CP) TestData/*.dat $(DESTDIR)$(DATADIR)/cryptopp/TestData
|
||||
$(CHMOD) 0644 $(DESTDIR)$(DATADIR)/cryptopp/TestData/*.dat
|
||||
$(CP) TestVectors/*.txt $(DESTDIR)$(DATADIR)/cryptopp/TestVectors
|
||||
$(CHMOD) 0644 $(DESTDIR)$(DATADIR)/cryptopp/TestVectors/*.txt
|
||||
|
||||
# A recipe to install only the library, and not cryptest.exe. Also
|
||||
# see https://github.com/weidai11/cryptopp/issues/653.
|
||||
.PHONY: install-lib
|
||||
install-lib:
|
||||
@-$(MKDIR) $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
$(INSTALL_DATA) *.h $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
$(CP) *.h $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
$(CHMOD) 0644 $(DESTDIR)$(INCLUDEDIR)/cryptopp/*.h
|
||||
ifneq ($(wildcard libcryptopp.a),)
|
||||
@-$(MKDIR) $(DESTDIR)$(LIBDIR)
|
||||
$(INSTALL_DATA) libcryptopp.a $(DESTDIR)$(LIBDIR)
|
||||
$(CP) libcryptopp.a $(DESTDIR)$(LIBDIR)
|
||||
$(CHMOD) 0644 $(DESTDIR)$(LIBDIR)/libcryptopp.a
|
||||
endif
|
||||
ifneq ($(wildcard libcryptopp.dylib),)
|
||||
@-$(MKDIR) $(DESTDIR)$(LIBDIR)
|
||||
$(INSTALL_PROGRAM) libcryptopp.dylib $(DESTDIR)$(LIBDIR)
|
||||
$(CP) libcryptopp.dylib $(DESTDIR)$(LIBDIR)
|
||||
$(CHMOD) 0755 $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
|
||||
-install_name_tool -id $(DESTDIR)$(LIBDIR)/libcryptopp.dylib $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
|
||||
endif
|
||||
ifneq ($(wildcard libcryptopp.so$(SOLIB_VERSION_SUFFIX)),)
|
||||
@-$(MKDIR) $(DESTDIR)$(LIBDIR)
|
||||
$(INSTALL_PROGRAM) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)
|
||||
$(CP) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)
|
||||
$(CHMOD) 0755 $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)/libcryptopp.so
|
||||
$(LDCONF) $(DESTDIR)$(LIBDIR)
|
||||
endif
|
||||
endif
|
||||
ifneq ($(wildcard libcryptopp.pc),)
|
||||
@-$(MKDIR) $(DESTDIR)$(LIBDIR)/pkgconfig
|
||||
$(CP) libcryptopp.pc $(DESTDIR)$(LIBDIR)/pkgconfig
|
||||
$(CHMOD) 0644 $(DESTDIR)$(LIBDIR)/pkgconfig/libcryptopp.pc
|
||||
endif
|
||||
|
||||
.PHONY: remove uninstall
|
||||
remove uninstall:
|
||||
|
19
vendor/cryptopp/vendor_cryptopp/History.txt
vendored
19
vendor/cryptopp/vendor_cryptopp/History.txt
vendored
@ -435,7 +435,6 @@ last several releases.
|
||||
MacPorts GCC 7.0, Clang 4.0, Intel C++ 17.00, IBM XL C/C++ 13.1
|
||||
|
||||
8.0.0 - December 28, 2018
|
||||
|
||||
- major release, recompile of programs required
|
||||
- expanded community input and support
|
||||
* 54 unique contributors as of this release
|
||||
@ -451,4 +450,20 @@ last several releases.
|
||||
- avoid Singleton<T> when possible, avoid std::call_once completely
|
||||
- fix SPARC alignment problems due to GetAlignmentOf<T>() on word64
|
||||
- add ARM AES asm implementation from Cryptogams
|
||||
- remove CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS support
|
||||
- remove CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS support
|
||||
|
||||
8.1.0 - February 22, 2019
|
||||
- minor release, no recompile of programs required
|
||||
- expanded community input and support
|
||||
56 unique contributors as of this release
|
||||
- fix OS X PowerPC builds with Clang
|
||||
- add Microsoft ARM64 support
|
||||
- fix iPhone Simulator build due to missign symbols
|
||||
- add CRYPTOPP_BUGGY_SIMD_LOAD_AND_STORE
|
||||
- add carryless multiplies for NIST b233 and k233 curves
|
||||
- fix OpenMP build due to use of OpenMP 4 with down-level compilers
|
||||
- add SignStream and VerifyStream for ed25519 and large files
|
||||
- fix missing AlgorithmProvider in PanamaHash
|
||||
- add SHAKE-128 and SHAKE-256
|
||||
- fix AVX2 build due to _mm256_broadcastsi128_si256
|
||||
- add IETF ChaCha, XChaCha, ChaChaPoly1305 and XChaChaPoly1305
|
||||
|
33
vendor/cryptopp/vendor_cryptopp/License.txt
vendored
33
vendor/cryptopp/vendor_cryptopp/License.txt
vendored
@ -1,4 +1,4 @@
|
||||
Compilation Copyright (c) 1995-2016 by Wei Dai. All rights reserved.
|
||||
Compilation Copyright (c) 1995-2019 by Wei Dai. All rights reserved.
|
||||
This copyright applies only to this software distribution package
|
||||
as a compilation, and does not imply a copyright on any particular
|
||||
file in the package.
|
||||
@ -22,6 +22,18 @@ Richard De Moliner - safer.cpp
|
||||
Matthew Skala - twofish.cpp
|
||||
Kevin Springle - camellia.cpp, shacal2.cpp, ttmac.cpp, whrlpool.cpp, ripemd.cpp
|
||||
Ronny Van Keer - sha3.cpp
|
||||
Aumasson, Neves, Wilcox-O'Hearn and Winnerlein - blake2.cpp, blake2b_simd.cpp, blake2s_simd.cpp
|
||||
Aaram Yun - aria.cpp, aria_simd.cpp
|
||||
Han Lulu, Markku-Juhani O. Saarinen - sm4.cpp sm4_simd.cpp
|
||||
Daniel J. Bernstein, Jack Lloyd - chacha.cpp, chacha_simd.cpp, chacha_avx.cpp
|
||||
Andrew Moon - ed25519, x25519, donna_32.cpp, donna_64.cpp, donna_sse.cpp
|
||||
|
||||
The Crypto++ Library uses portions of Andy Polyakov's CRYPTOGAMS for Poly1305
|
||||
scalar multiplication and aes_armv4.S. CRYPTOGAMS is dual licensed with a
|
||||
permissive BSD-style license. The CRYPTOGAMS license is reproduced below.
|
||||
|
||||
The Crypto++ Library uses portions of Jack Lloyd's Botan for ChaCha SSE2 and
|
||||
AVX. Botan placed the code in public domain for Crypto++ to use.
|
||||
|
||||
The Crypto++ Library (as a compilation) is currently licensed under the Boost
|
||||
Software License 1.0 (http://www.boost.org/users/license.html).
|
||||
@ -49,3 +61,22 @@ SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
CRYPTOGAMS License
|
||||
|
||||
Copyright (c) 2006-2017, CRYPTOGAMS by <appro@openssl.org>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain copyright notices,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
* Neither the name of the CRYPTOGAMS nor the names of its copyright
|
||||
holder and contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
41
vendor/cryptopp/vendor_cryptopp/Readme.txt
vendored
41
vendor/cryptopp/vendor_cryptopp/Readme.txt
vendored
@ -6,30 +6,32 @@ Currently the library contains the following algorithms:
|
||||
|
||||
algorithm type name
|
||||
|
||||
authenticated encryption schemes GCM, CCM, EAX
|
||||
authenticated encryption schemes GCM, CCM, EAX, ChaCha20Poly1305 and
|
||||
XChaCha20Poly1305
|
||||
|
||||
high speed stream ciphers ChaCha (8/12/20), Panama, Sosemanuk, Salsa20,
|
||||
XSalsa20
|
||||
high speed stream ciphers ChaCha (8/12/20), ChaCha (IETF), Panama, Salsa20,
|
||||
Sosemanuk, XSalsa20, XChaCha20
|
||||
|
||||
AES and AES candidates AES (Rijndael), RC6, MARS, Twofish, Serpent,
|
||||
CAST-256
|
||||
|
||||
ARIA, IDEA, Blowfish, Triple-DES (DES-EDE2 and
|
||||
DES-EDE3), Camellia, SEED, Kalyna (128/256/512),
|
||||
other block ciphers RC5, SIMON-64, SIMON-128, SPECK-64, SPECK-128,
|
||||
Skipjack, SHACAL-2, SM4, Threefish (256/512/1024),
|
||||
TEA, XTEA
|
||||
ARIA, Blowfish, Camellia, CHAM, HIGHT, IDEA,
|
||||
Kalyna (128/256/512), LEA, SEED, RC5, SHACAL-2,
|
||||
other block ciphers SIMON (64/128), Skipjack, SPECK (64/128),
|
||||
Simeck, SM4, Threefish (256/512/1024),
|
||||
Triple-DES (DES-EDE2 and DES-EDE3), TEA, XTEA
|
||||
|
||||
block cipher modes of operation ECB, CBC, CBC ciphertext stealing (CTS),
|
||||
CFB, OFB, counter mode (CTR)
|
||||
|
||||
message authentication codes BLAKE2s, BLAKE2b, CMAC, CBC-MAC, DMAC, GMAC, HMAC,
|
||||
Poly1305, SipHash, Two-Track-MAC, VMAC,
|
||||
Poly1305, Poly1305 (IETF), SipHash, Two-Track-MAC,
|
||||
VMAC
|
||||
|
||||
BLAKE2s, BLAKE2b, Keccack (F1600), SHA-1,
|
||||
hash functions SHA-2 (224/256/384/512), SHA-3 (224/256/384/512),
|
||||
SipHash, SM3, Tiger, RIPEMD-128, RIPEMD-160,
|
||||
RIPEMD-256, RIPEMD-320, WHIRLPOOL
|
||||
SHAKE (128/256), SipHash, SM3, Tiger,
|
||||
RIPEMD (128/160/256/320), WHIRLPOOL
|
||||
|
||||
RSA, DSA, Determinsitic DSA, ElGamal,
|
||||
public-key cryptography Nyberg-Rueppel (NR), Rabin-Williams (RW), LUC,
|
||||
@ -69,8 +71,6 @@ Other features include:
|
||||
+ 32-bit CRC, CRC-C and Adler32 checksum
|
||||
* class wrappers for these platform and operating system features (optional):
|
||||
+ high resolution timers on Windows, Unix, and Mac OS
|
||||
+ Berkeley and Windows style sockets
|
||||
+ Windows named pipes
|
||||
+ /dev/random, /dev/urandom, /dev/srandom
|
||||
+ Microsoft's CryptGenRandom or BCryptGenRandom on Windows
|
||||
* A high level interface for most of the above, using a filter/pipeline
|
||||
@ -206,16 +206,23 @@ library in your programs to help avoid unwanted redirections.
|
||||
*** Side Channel Attacks ***
|
||||
|
||||
Crypto++ attempts to resist side channel attacks using various remediations. We
|
||||
believe the library is hardened but the remdiations may be incomplete. The first
|
||||
line of defense uses hardware instructions when possible. The library also uses
|
||||
cache-aware algoirthms and access patterns to minimize leakage. If you suspect
|
||||
or find an information leak then please report it.
|
||||
believe the library is mostly hardened but the remdiations may be incomplete. The
|
||||
first line of defense uses hardware instructions when possible for block ciphers,
|
||||
hashes and other primitives. Hardware acceleration remediates many timing attacks.
|
||||
The library also uses cache-aware algoirthms and access patterns to minimize leakage.
|
||||
|
||||
Some of the public key algorithms have branches and some of the branches depend on
|
||||
data that can be private or secret. The branching occurs in some field operations
|
||||
like exponentiation over integers and elliptic curves. The branching has been
|
||||
minimized but not completely eliminated.
|
||||
|
||||
Crypto++ does not enagage Specter remediations at this time. The GCC options for
|
||||
Specter are -mfunction-return=thunk and -mindirect-branch=thunk, and the library
|
||||
uses them during testing. If you want the Specter workarounds then add the GCC
|
||||
options to your CXXFLAGS when building the library.
|
||||
|
||||
If you suspect or find an information leak then please report it.
|
||||
|
||||
*** Documentation and Support ***
|
||||
|
||||
Crypto++ is documented through inline comments in header files, which are
|
||||
|
@ -141,13 +141,13 @@ if ! "$MAKE" -j2 -f Makefile; then
|
||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
||||
fi
|
||||
|
||||
if ! ./cryptestcwd v; then
|
||||
echo "cryptestcwd v failed."
|
||||
if ! ./cryptest v; then
|
||||
echo "cryptest v failed."
|
||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
||||
fi
|
||||
|
||||
if ! ./cryptestcwd tv all; then
|
||||
echo "cryptestcwd tv all failed."
|
||||
if ! ./cryptest tv all; then
|
||||
echo "cryptest tv all failed."
|
||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
||||
fi
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# cryptest.sh - written and placed in public domain by Jeffrey Walton and Uri Blumenthal.
|
||||
# Copyright assigned to Crypto++ project.
|
||||
# cryptest.sh - written and placed in public domain by Jeffrey Walton and Uri
|
||||
# Blumenthal.
|
||||
|
||||
# This is a test script that can be used on some Linux/Unix/Apple machines to automate testing
|
||||
# of the shared object to ensure linking and symbols don't go missing from release to release.
|
||||
# This is a test script that can be used on some Linux/Unix/Apple machines to
|
||||
# automate testing of the shared object to ensure linking and symbols don't go
|
||||
# missing from release to release.
|
||||
|
||||
# Fixup ancient Bash
|
||||
# https://unix.stackexchange.com/q/468579/56041
|
||||
@ -12,10 +13,20 @@ if [[ -z "$BASH_SOURCE" ]]; then
|
||||
BASH_SOURCE="$0"
|
||||
fi
|
||||
|
||||
############################################
|
||||
# Cleanup
|
||||
|
||||
PWD_DIR=$(pwd)
|
||||
function cleanup {
|
||||
rm -f adhoc.cpp *.a *.o *.so *.dylib GNUmakefile-symbols
|
||||
cd "$PWD_DIR"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
############################################
|
||||
# Tags to test
|
||||
|
||||
OLD_VERSION_TAG=CRYPTOPP_7_0_0
|
||||
OLD_VERSION_TAG=CRYPTOPP_8_0_0
|
||||
NEW_VERSION_TAG=master
|
||||
|
||||
############################################
|
||||
|
@ -108,6 +108,7 @@ fi
|
||||
THIS_SYSTEM=$(uname -s 2>&1)
|
||||
IS_AIX=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c aix)
|
||||
IS_DARWIN=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c darwin)
|
||||
IS_HURD=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c gnu)
|
||||
IS_LINUX=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c linux)
|
||||
IS_CYGWIN=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c cygwin)
|
||||
IS_MINGW=$(echo -n "$THIS_SYSTEM" | "$GREP" -i -c mingw)
|
||||
@ -155,6 +156,8 @@ if [[ ("$IS_X86" -ne "0" || "$IS_X64" -ne "0") ]]; then
|
||||
X86_CPU_FLAGS=$(grep Features /var/run/dmesg.boot)
|
||||
elif [[ ("$IS_DRAGONFLY" -ne "0") ]]; then
|
||||
X86_CPU_FLAGS=$(dmesg | grep Features)
|
||||
elif [[ ("$IS_HURD" -ne "0") ]]; then
|
||||
: # Do nothing... cpuid is not helpful at the moment
|
||||
else
|
||||
X86_CPU_FLAGS="$($AWK '{IGNORECASE=1}{if ($1 == "flags"){print;exit}}' < /proc/cpuinfo | cut -f 2 -d ':')"
|
||||
fi
|
||||
|
@ -63,26 +63,31 @@ do
|
||||
# ARMv5
|
||||
if [ "$CL" == "armv5" ]; then
|
||||
BACK_ARCH=armv5
|
||||
APPLE_SDK=iPhoneOS
|
||||
fi
|
||||
|
||||
# ARMv6
|
||||
if [ "$CL" == "armv6" ]; then
|
||||
BACK_ARCH=armv6
|
||||
APPLE_SDK=iPhoneOS
|
||||
fi
|
||||
|
||||
# ARMv7
|
||||
if [ "$CL" == "armv7" ]; then
|
||||
BACK_ARCH=armv7
|
||||
APPLE_SDK=iPhoneOS
|
||||
fi
|
||||
|
||||
# ARMv7s
|
||||
if [ "$CL" == "armv7s" ]; then
|
||||
BACK_ARCH=armv7s
|
||||
APPLE_SDK=iPhoneOS
|
||||
fi
|
||||
|
||||
# ARM64
|
||||
if [[ ("$CL" == "arm64" || "$CL" == "armv8" || "$CL" == "aarch64") ]]; then
|
||||
BACK_ARCH=arm64
|
||||
APPLE_SDK=iPhoneOS
|
||||
fi
|
||||
|
||||
# iPhone
|
||||
@ -201,7 +206,7 @@ fi
|
||||
|
||||
# Simulator fixup. LD fails to link dylib.
|
||||
if [ "$APPLE_SDK" == "iPhoneSimulator" ] && [ "$IOS_ARCH" == "i386" ]; then
|
||||
IOS_FLAGS="$IOS_FLAGS -miphoneos-version-min=5 -DCRYPTOPP_DISABLE_ASM"
|
||||
IOS_FLAGS="$IOS_FLAGS -miphoneos-version-min=5"
|
||||
fi
|
||||
|
||||
# ARMv7s fixup. Xcode 4/iOS 6
|
||||
@ -219,12 +224,6 @@ if [ "$APPLE_SDK" == "AppleTVOS" ]; then
|
||||
IOS_FLAGS=""
|
||||
fi
|
||||
|
||||
# ARM64 Simulator fixup. Under Xcode 6/iOS 8, it uses x86_64 and not i386
|
||||
# -ios_simulator_version_min does not work though it is in LLVM sources.
|
||||
if [ "$IOS_ARCH" == "x86_64" ]; then
|
||||
IOS_FLAGS="$IOS_FLAGS -DCRYPTOPP_DISABLE_ASM"
|
||||
fi
|
||||
|
||||
# Disable ASM for simulator. We are failing on Travis due to missing _start.
|
||||
# We may need to link against crt1.o for simulator builds. Also see
|
||||
# https://stackoverflow.com/q/24841283/608639
|
||||
|
6
vendor/cryptopp/vendor_cryptopp/TestVectors/aead.txt
vendored
Normal file
6
vendor/cryptopp/vendor_cryptopp/TestVectors/aead.txt
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
AlgorithmType: FileList
|
||||
Name: aead.txt collection
|
||||
Test: TestVectors/ccm.txt
|
||||
Test: TestVectors/eax.txt
|
||||
Test: TestVectors/gcm.txt
|
||||
Test: TestVectors/chacha20poly1305.txt
|
@ -1,55 +1,61 @@
|
||||
AlgorithmType: FileList
|
||||
Name: all.txt collection
|
||||
Test: TestVectors/tea.txt
|
||||
Test: TestVectors/wake.txt
|
||||
Test: TestVectors/aes.txt
|
||||
Test: TestVectors/aria.txt
|
||||
Test: TestVectors/blake2b.txt
|
||||
Test: TestVectors/blake2s.txt
|
||||
Test: TestVectors/camellia.txt
|
||||
Test: TestVectors/shacal2.txt
|
||||
Test: TestVectors/ttmac.txt
|
||||
Test: TestVectors/whrlpool.txt
|
||||
Test: TestVectors/ccm.txt
|
||||
Test: TestVectors/chacha_tls.txt
|
||||
Test: TestVectors/chacha20poly1305.txt
|
||||
Test: TestVectors/chacha.txt
|
||||
Test: TestVectors/xchacha.txt
|
||||
Test: TestVectors/cham.txt
|
||||
Test: TestVectors/cmac.txt
|
||||
Test: TestVectors/dlies.txt
|
||||
Test: TestVectors/dsa.txt
|
||||
Test: TestVectors/dsa_1363.txt
|
||||
Test: TestVectors/dsa_rfc6979.txt
|
||||
Test: TestVectors/dsa.txt
|
||||
Test: TestVectors/eax.txt
|
||||
Test: TestVectors/esign.txt
|
||||
Test: TestVectors/gcm.txt
|
||||
Test: TestVectors/hc128.txt
|
||||
Test: TestVectors/hc256.txt
|
||||
Test: TestVectors/hight.txt
|
||||
Test: TestVectors/hkdf.txt
|
||||
Test: TestVectors/hmac.txt
|
||||
Test: TestVectors/kalyna.txt
|
||||
Test: TestVectors/keccak.txt
|
||||
Test: TestVectors/lea.txt
|
||||
Test: TestVectors/mars.txt
|
||||
Test: TestVectors/nr.txt
|
||||
Test: TestVectors/panama.txt
|
||||
Test: TestVectors/poly1305aes.txt
|
||||
Test: TestVectors/poly1305_tls.txt
|
||||
Test: TestVectors/rabbit.txt
|
||||
Test: TestVectors/rsa_oaep.txt
|
||||
Test: TestVectors/rsa_pkcs1_1_5.txt
|
||||
Test: TestVectors/rsa_pss.txt
|
||||
Test: TestVectors/rw.txt
|
||||
Test: TestVectors/salsa.txt
|
||||
Test: TestVectors/seal.txt
|
||||
Test: TestVectors/sha.txt
|
||||
Test: TestVectors/keccak.txt
|
||||
Test: TestVectors/seed.txt
|
||||
Test: TestVectors/sha1_fips_180.txt
|
||||
Test: TestVectors/sha2_fips_180.txt
|
||||
Test: TestVectors/sha3_fips_202.txt
|
||||
Test: TestVectors/panama.txt
|
||||
Test: TestVectors/sm3.txt
|
||||
Test: TestVectors/aes.txt
|
||||
Test: TestVectors/aria.txt
|
||||
Test: TestVectors/kalyna.txt
|
||||
Test: TestVectors/threefish.txt
|
||||
Test: TestVectors/sm4.txt
|
||||
Test: TestVectors/hight.txt
|
||||
Test: TestVectors/cham.txt
|
||||
Test: TestVectors/lea.txt
|
||||
Test: TestVectors/shake.txt
|
||||
Test: TestVectors/shacal2.txt
|
||||
Test: TestVectors/sha.txt
|
||||
Test: TestVectors/simeck.txt
|
||||
Test: TestVectors/simon.txt
|
||||
Test: TestVectors/speck.txt
|
||||
Test: TestVectors/salsa.txt
|
||||
Test: TestVectors/chacha.txt
|
||||
#Test: TestVectors/tls_chacha.txt
|
||||
Test: TestVectors/sosemanuk.txt
|
||||
Test: TestVectors/rabbit.txt
|
||||
Test: TestVectors/hc128.txt
|
||||
Test: TestVectors/hc256.txt
|
||||
Test: TestVectors/vmac.txt
|
||||
Test: TestVectors/ccm.txt
|
||||
Test: TestVectors/gcm.txt
|
||||
Test: TestVectors/cmac.txt
|
||||
Test: TestVectors/eax.txt
|
||||
Test: TestVectors/mars.txt
|
||||
Test: TestVectors/blake2s.txt
|
||||
Test: TestVectors/blake2b.txt
|
||||
Test: TestVectors/siphash.txt
|
||||
Test: TestVectors/hkdf.txt
|
||||
Test: TestVectors/sm3.txt
|
||||
Test: TestVectors/sm4.txt
|
||||
Test: TestVectors/sosemanuk.txt
|
||||
Test: TestVectors/speck.txt
|
||||
Test: TestVectors/tea.txt
|
||||
Test: TestVectors/threefish.txt
|
||||
Test: TestVectors/ttmac.txt
|
||||
Test: TestVectors/vmac.txt
|
||||
Test: TestVectors/wake.txt
|
||||
Test: TestVectors/whrlpool.txt
|
||||
|
9439
vendor/cryptopp/vendor_cryptopp/TestVectors/chacha20poly1305.txt
vendored
Normal file
9439
vendor/cryptopp/vendor_cryptopp/TestVectors/chacha20poly1305.txt
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,37 +1,337 @@
|
||||
AlgorithmType: SymmetricCipher
|
||||
Name: ChaCha20
|
||||
Name: ChaChaTLS
|
||||
Source: http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305
|
||||
Comment: Section 7, Test 1
|
||||
Key: 0000000000000000000000000000000000000000000000000000000000000000
|
||||
IV: 0000000000000000
|
||||
Plaintext:
|
||||
Ciphertext: 76b8e0ada0f13d90405d6ae55386bd28bdd219b8a08ded1aa836efcc8b770dc7da41597c5157488d7724e03fb8d84a376a43b8f41518a11cc387b669
|
||||
#
|
||||
Comment: Section A.1, ChaCha20 Block Function, Test 1
|
||||
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
|
||||
IV: 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
Plaintext: r64 00
|
||||
Ciphertext: 76 b8 e0 ad a0 f1 3d 90 40 5d 6a e5 53 86 bd 28 \
|
||||
bd d2 19 b8 a0 8d ed 1a a8 36 ef cc 8b 77 0d c7 \
|
||||
da 41 59 7c 51 57 48 8d 77 24 e0 3f b8 d8 4a 37 \
|
||||
6a 43 b8 f4 15 18 a1 1c c3 87 b6 69 b2 ee 65 86
|
||||
Test: Encrypt
|
||||
Comment: Section 7, Test 2
|
||||
Key: 0000000000000000000000000000000000000000000000000000000000000001
|
||||
IV: 0000000000000000
|
||||
Plaintext:
|
||||
Ciphertext: 4540f05a9f1fb296d7736e7b208e3c96eb4fe1834688d2604f450952ed432d41bbe2a0b6ea7566d2a5d1e7e20d42af2c53d792b1c43fea817e9ad275
|
||||
#
|
||||
Comment: Section A.1, ChaCha20 Block Function, Test 2
|
||||
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
|
||||
IV: 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
Plaintext: r64 00
|
||||
Ciphertext: 9f 07 e7 be 55 51 38 7a 98 ba 97 7c 73 2d 08 0d \
|
||||
cb 0f 29 a0 48 e3 65 69 12 c6 53 3e 32 ee 7a ed \
|
||||
29 b7 21 76 9c e6 4e 43 d5 71 33 b0 74 d8 39 d5 \
|
||||
31 ed 1f 28 51 0a fb 45 ac e1 0a 1f 4b 79 4d 6f
|
||||
InitialBlock: 1
|
||||
Test: Encrypt
|
||||
Comment: Section 7, Test 3
|
||||
Key: 0000000000000000000000000000000000000000000000000000000000000000
|
||||
IV: 0000000000000001
|
||||
Plaintext:
|
||||
Ciphertext: de9cba7bf3d69ef5e786dc63973f653a0b49e015adbff7134fcb7df137821031e85a050278a7084527214f73efc7fa5b5277062eb7a0433e445f41e3
|
||||
#
|
||||
Comment: Section A.1, ChaCha20 Block Function, Test 3
|
||||
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000001
|
||||
IV: 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
Plaintext: r64 00
|
||||
Ciphertext: 3a eb 52 24 ec f8 49 92 9b 9d 82 8d b1 ce d4 dd \
|
||||
83 20 25 e8 01 8b 81 60 b8 22 84 f3 c9 49 aa 5a \
|
||||
8e ca 00 bb b4 a7 3b da d1 92 b5 c4 2f 73 f2 fd \
|
||||
4e 27 36 44 c8 b3 61 25 a6 4a dd eb 00 6c 13 a0
|
||||
InitialBlock: 1
|
||||
Test: Encrypt
|
||||
Comment: Section 7, Test 4
|
||||
Key: 0000000000000000000000000000000000000000000000000000000000000000
|
||||
IV: 0100000000000000
|
||||
Plaintext:
|
||||
Ciphertext: ef3fdfd6c61578fbf5cf35bd3dd33b8009631634d21e42ac33960bd138e50d32111e4caf237ee53ca8ad6426194a88545ddc497a0b466e7d6bbdb004
|
||||
#
|
||||
Comment: Section A.1, ChaCha20 Block Function, Test 4
|
||||
Key: 00ff000000000000 0000000000000000 0000000000000000 0000000000000000
|
||||
IV: 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
Plaintext: r64 00
|
||||
Ciphertext: 72 d5 4d fb f1 2e c4 4b 36 26 92 df 94 13 7f 32 \
|
||||
8f ea 8d a7 39 90 26 5e c1 bb be a1 ae 9a f0 ca \
|
||||
13 b2 5a a2 6c b4 a6 48 cb 9b 9d 1b e6 5b 2c 09 \
|
||||
24 a6 6c 54 d5 45 ec 1b 73 74 f4 87 2e 99 f0 96
|
||||
InitialBlock: 2
|
||||
Test: Encrypt
|
||||
Comment: Section 7, Test 5
|
||||
Key: 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
|
||||
IV: 0001020304050607
|
||||
Plaintext:
|
||||
Ciphertext: f798a189f195e66982105ffb640bb7757f579da31602fc93ec01ac56f85ac3c134a4547b733b46413042c9440049176905d3be59ea1c53f1 \
|
||||
5916155c2be8241a38008b9a26bc35941e2444177c8ade6689de95264986d95889fb60e84629c9bd9a5acb1cc118be563eb9b3a4a472f82e \
|
||||
09a7e778492b562ef7130e88dfe031c79db9d4f7c7a899151b9a475032b63fc385245fe054e3dd5a97a5f576fe064025d3ce042c566ab2c5 \
|
||||
07b138db853e3d6959660996546cc9c4a6eafdc777c040d70eaf46f76dad3979e5c5360c3317166a1c894c94a371876a94df7628fe4eaaf2 \
|
||||
ccb27d5aaae0ad7ad0f9d4b6ad3b54098746d4524d38407a6deb
|
||||
#
|
||||
Comment: Section A.1, ChaCha20 Block Function, Test 5
|
||||
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
|
||||
IV: 00 00 00 00 00 00 00 00 00 00 00 02
|
||||
Plaintext: r64 00
|
||||
Ciphertext: c2 c6 4d 37 8c d5 36 37 4a e2 04 b9 ef 93 3f cd \
|
||||
1a 8b 22 88 b3 df a4 96 72 ab 76 5b 54 ee 27 c7 \
|
||||
8a 97 0e 0e 95 5c 14 f3 a8 8e 74 1b 97 c2 86 f7 \
|
||||
5f 8f c2 99 e8 14 83 62 fa 19 8a 39 53 1b ed 6d
|
||||
Test: Encrypt
|
||||
#
|
||||
Comment: Section A.2, ChaCha20 Encryption, Test 1
|
||||
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
|
||||
IV: 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
Plaintext: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
|
||||
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
|
||||
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
|
||||
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
Ciphertext: 76 b8 e0 ad a0 f1 3d 90 40 5d 6a e5 53 86 bd 28 \
|
||||
bd d2 19 b8 a0 8d ed 1a a8 36 ef cc 8b 77 0d c7 \
|
||||
da 41 59 7c 51 57 48 8d 77 24 e0 3f b8 d8 4a 37 \
|
||||
6a 43 b8 f4 15 18 a1 1c c3 87 b6 69 b2 ee 65 86
|
||||
Test: Encrypt
|
||||
#
|
||||
Comment: Section A.2, ChaCha20 Encryption, Test 2
|
||||
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000001
|
||||
IV: 00 00 00 00 00 00 00 00 00 00 00 02
|
||||
Plaintext: 41 6e 79 20 73 75 62 6d 69 73 73 69 6f 6e 20 74 \
|
||||
6f 20 74 68 65 20 49 45 54 46 20 69 6e 74 65 6e \
|
||||
64 65 64 20 62 79 20 74 68 65 20 43 6f 6e 74 72 \
|
||||
69 62 75 74 6f 72 20 66 6f 72 20 70 75 62 6c 69 \
|
||||
63 61 74 69 6f 6e 20 61 73 20 61 6c 6c 20 6f 72 \
|
||||
20 70 61 72 74 20 6f 66 20 61 6e 20 49 45 54 46 \
|
||||
20 49 6e 74 65 72 6e 65 74 2d 44 72 61 66 74 20 \
|
||||
6f 72 20 52 46 43 20 61 6e 64 20 61 6e 79 20 73 \
|
||||
74 61 74 65 6d 65 6e 74 20 6d 61 64 65 20 77 69 \
|
||||
74 68 69 6e 20 74 68 65 20 63 6f 6e 74 65 78 74 \
|
||||
20 6f 66 20 61 6e 20 49 45 54 46 20 61 63 74 69 \
|
||||
76 69 74 79 20 69 73 20 63 6f 6e 73 69 64 65 72 \
|
||||
65 64 20 61 6e 20 22 49 45 54 46 20 43 6f 6e 74 \
|
||||
72 69 62 75 74 69 6f 6e 22 2e 20 53 75 63 68 20 \
|
||||
73 74 61 74 65 6d 65 6e 74 73 20 69 6e 63 6c 75 \
|
||||
64 65 20 6f 72 61 6c 20 73 74 61 74 65 6d 65 6e \
|
||||
74 73 20 69 6e 20 49 45 54 46 20 73 65 73 73 69 \
|
||||
6f 6e 73 2c 20 61 73 20 77 65 6c 6c 20 61 73 20 \
|
||||
77 72 69 74 74 65 6e 20 61 6e 64 20 65 6c 65 63 \
|
||||
74 72 6f 6e 69 63 20 63 6f 6d 6d 75 6e 69 63 61 \
|
||||
74 69 6f 6e 73 20 6d 61 64 65 20 61 74 20 61 6e \
|
||||
79 20 74 69 6d 65 20 6f 72 20 70 6c 61 63 65 2c \
|
||||
20 77 68 69 63 68 20 61 72 65 20 61 64 64 72 65 \
|
||||
73 73 65 64 20 74 6f
|
||||
Ciphertext: a3 fb f0 7d f3 fa 2f de 4f 37 6c a2 3e 82 73 70 \
|
||||
41 60 5d 9f 4f 4f 57 bd 8c ff 2c 1d 4b 79 55 ec \
|
||||
2a 97 94 8b d3 72 29 15 c8 f3 d3 37 f7 d3 70 05 \
|
||||
0e 9e 96 d6 47 b7 c3 9f 56 e0 31 ca 5e b6 25 0d \
|
||||
40 42 e0 27 85 ec ec fa 4b 4b b5 e8 ea d0 44 0e \
|
||||
20 b6 e8 db 09 d8 81 a7 c6 13 2f 42 0e 52 79 50 \
|
||||
42 bd fa 77 73 d8 a9 05 14 47 b3 29 1c e1 41 1c \
|
||||
68 04 65 55 2a a6 c4 05 b7 76 4d 5e 87 be a8 5a \
|
||||
d0 0f 84 49 ed 8f 72 d0 d6 62 ab 05 26 91 ca 66 \
|
||||
42 4b c8 6d 2d f8 0e a4 1f 43 ab f9 37 d3 25 9d \
|
||||
c4 b2 d0 df b4 8a 6c 91 39 dd d7 f7 69 66 e9 28 \
|
||||
e6 35 55 3b a7 6c 5c 87 9d 7b 35 d4 9e b2 e6 2b \
|
||||
08 71 cd ac 63 89 39 e2 5e 8a 1e 0e f9 d5 28 0f \
|
||||
a8 ca 32 8b 35 1c 3c 76 59 89 cb cf 3d aa 8b 6c \
|
||||
cc 3a af 9f 39 79 c9 2b 37 20 fc 88 dc 95 ed 84 \
|
||||
a1 be 05 9c 64 99 b9 fd a2 36 e7 e8 18 b0 4b 0b \
|
||||
c3 9c 1e 87 6b 19 3b fe 55 69 75 3f 88 12 8c c0 \
|
||||
8a aa 9b 63 d1 a1 6f 80 ef 25 54 d7 18 9c 41 1f \
|
||||
58 69 ca 52 c5 b8 3f a3 6f f2 16 b9 c1 d3 00 62 \
|
||||
be bc fd 2d c5 bc e0 91 19 34 fd a7 9a 86 f6 e6 \
|
||||
98 ce d7 59 c3 ff 9b 64 77 33 8f 3d a4 f9 cd 85 \
|
||||
14 ea 99 82 cc af b3 41 b2 38 4d d9 02 f3 d1 ab \
|
||||
7a c6 1d d2 9c 6f 21 ba 5b 86 2f 37 30 e3 7c fd \
|
||||
c4 fd 80 6c 22 f2 21
|
||||
InitialBlock: 1
|
||||
Test: Encrypt
|
||||
#
|
||||
Comment: Section A.2, ChaCha20 Encryption, Test 3
|
||||
Key: 1c 92 40 a5 eb 55 d3 8a f3 33 88 86 04 f6 b5 f0 \
|
||||
47 39 17 c1 40 2b 80 09 9d ca 5c bc 20 70 75 c0
|
||||
IV: 00 00 00 00 00 00 00 00 00 00 00 02
|
||||
Plaintext: 27 54 77 61 73 20 62 72 69 6c 6c 69 67 2c 20 61 \
|
||||
6e 64 20 74 68 65 20 73 6c 69 74 68 79 20 74 6f \
|
||||
76 65 73 0a 44 69 64 20 67 79 72 65 20 61 6e 64 \
|
||||
20 67 69 6d 62 6c 65 20 69 6e 20 74 68 65 20 77 \
|
||||
61 62 65 3a 0a 41 6c 6c 20 6d 69 6d 73 79 20 77 \
|
||||
65 72 65 20 74 68 65 20 62 6f 72 6f 67 6f 76 65 \
|
||||
73 2c 0a 41 6e 64 20 74 68 65 20 6d 6f 6d 65 20 \
|
||||
72 61 74 68 73 20 6f 75 74 67 72 61 62 65 2e
|
||||
Ciphertext: 62 e6 34 7f 95 ed 87 a4 5f fa e7 42 6f 27 a1 df \
|
||||
5f b6 91 10 04 4c 0d 73 11 8e ff a9 5b 01 e5 cf \
|
||||
16 6d 3d f2 d7 21 ca f9 b2 1e 5f b1 4c 61 68 71 \
|
||||
fd 84 c5 4f 9d 65 b2 83 19 6c 7f e4 f6 05 53 eb \
|
||||
f3 9c 64 02 c4 22 34 e3 2a 35 6b 3e 76 43 12 a6 \
|
||||
1a 55 32 05 57 16 ea d6 96 25 68 f8 7d 3f 3f 77 \
|
||||
04 c6 a8 d1 bc d1 bf 4d 50 d6 15 4b 6d a7 31 b1 \
|
||||
87 b5 8d fd 72 8a fa 36 75 7a 79 7a c1 88 d1
|
||||
InitialBlock: 42
|
||||
Test: Encrypt
|
||||
#
|
||||
Source: Modified Bernstein ref impl using chacha-ref.c ver 20080118
|
||||
Comment: All 0 key, all 0 iv, 0 counter block, 1024 bytes
|
||||
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
|
||||
IV: 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
Plaintext: r1024 00
|
||||
Ciphertext: \
|
||||
76B8E0ADA0F13D90405D6AE55386BD28BDD219B8A08DED1AA836EFCC8B770DC7 \
|
||||
DA41597C5157488D7724E03FB8D84A376A43B8F41518A11CC387B669B2EE6586 \
|
||||
9F07E7BE5551387A98BA977C732D080DCB0F29A048E3656912C6533E32EE7AED \
|
||||
29B721769CE64E43D57133B074D839D531ED1F28510AFB45ACE10A1F4B794D6F \
|
||||
2D09A0E663266CE1AE7ED1081968A0758E718E997BD362C6B0C34634A9A0B35D \
|
||||
012737681F7B5D0F281E3AFDE458BC1E73D2D313C9CF94C05FF3716240A248F2 \
|
||||
1320A058D7B3566BD520DAAA3ED2BF0AC5B8B120FB852773C3639734B45C91A4 \
|
||||
2DD4CB83F8840D2EEDB158131062AC3F1F2CF8FF6DCD1856E86A1E6C3167167E \
|
||||
E5A688742B47C5ADFB59D4DF76FD1DB1E51EE03B1CA9F82ACA173EDB8B729347 \
|
||||
4EBE980F904D10C916442B4783A0E984860CB6C957B39C38ED8F51CFFAA68A4D \
|
||||
E01025A39C504546B9DC1406A7EB28151E5150D7B204BAA719D4F091021217DB \
|
||||
5CF1B5C84C4FA71A879610A1A695AC527C5B56774A6B8A21AAE88685868E094C \
|
||||
F29EF4090AF7A90CC07E8817AA528763797D3C332B67CA4BC110642C2151EC47 \
|
||||
EE84CB8C42D85F10E2A8CB18C3B7335F26E8C39A12B1BCC1707177B76138732E \
|
||||
EDAAB74DA1410FC055EA068C99E9260ACBE337CF5D3E00E5B3230FFEDB0B9907 \
|
||||
87D0C70E0BFE4198EA6758DD5A61FB5FEC2DF981F31BEFE153F81D17161784DB \
|
||||
1C8822D53CD1EE7DB532364828BDF404B040A8DCC522F3D3D99AEC4B8057EDB8 \
|
||||
500931A2C42D2F0C570847100B5754DAFC5FBDB894BBEF1A2DE1A07F8BA0C4B9 \
|
||||
19301066EDBC056B7B481E7A0C46297BBB589D9DA5B675A6723E152E5E63A4CE \
|
||||
034E9E83E58A013AF0E7352FB7908514E3B3D1040D0BB963B3954B636B5FD4BF \
|
||||
6D0AADBAF8157D062ACB2418C176A475511B35C3F6218A5668EA5BC6F54B8782 \
|
||||
F8B340F00AC1BEBA5E62CD632A7CE7809C725608ACA5EFBF7C41F237643F06C0 \
|
||||
997207171DE867F9D697BF5EA6011ABCCE6C8CDB211394D2C02DD0FB60DB5A2C \
|
||||
17AC3DC85878A90BED3809DBB96EAA5426FC8EAE0D2D65C42A479F088648BE2D \
|
||||
C801D82A366FDDC0EF234263C0B6417D5F9DA41817B88D68E5E67195C5C1EE30 \
|
||||
95E821F22524B20BE41CEB590412E41DC648843FA9BFEC7A3DCF61AB05415733 \
|
||||
16D3FA8151629303FE9741562ED065DB4EBC0050EF558364AE81124A28F5C013 \
|
||||
13232FBC496DFD8A2568657B686D7214382A1A00903017DDA969878442BA5AFF \
|
||||
F6613F553CBB233CE46D9AEE93A7876CF5E9E82912B18CADF0B34327B2E0427E \
|
||||
CF66B7CEB7C0918DC47BDFF12A062ADF07133009CE7A5E5C917E0168306109B7 \
|
||||
CB49653A6D2CAEF005DE783A9A9BFE05381ED1348D94EC65886F9C0B619C52C5 \
|
||||
533800B16C836172B95182DBC5EEC042B89E22F11A085B739A3611CD8D836018
|
||||
Test: Encrypt
|
||||
#
|
||||
Comment: Random key, random iv, 0 counter block, 1024 bytes
|
||||
Key: 2923BE84E16CD6AE 529049F1F1BBE9EB B3A6DB3C870C3E99 245E0D1C06B747DE
|
||||
IV: B3 12 4D C8 43 BB 8B A6 1F 03 5A 7D
|
||||
Plaintext: r1024 00
|
||||
Ciphertext: \
|
||||
C60E2330687F93D615A03CA1AD4FB4A64F2E0380A65F1277ADE647360F531A6D \
|
||||
7D39AC85F9064B49529B796F8220D44B2573449C0CAB7AD7704BA9E1F370A52B \
|
||||
45561EC56EB1AC85FEDCB4EE72957AA3445E6449373EA3CF82E2F5D2EA63889B \
|
||||
7349441FFF021C19458CB815AC334DB6159180CE3E743E67896F74F4DA12B3A6 \
|
||||
2FB45A2069151A1C0DAE260302905EF520F1838CBE8859400F0B4723F47518D4 \
|
||||
7EA9A557D00788B5796EFC9C4BC0F14484C64C27348BAC9621A18EF805F771A9 \
|
||||
BDE4B0288B0F6B06562A3D5B7A9655DA8A89C391F28B5C4B0FBE498B92DD8B30 \
|
||||
2F5B43B58C93C7C5161CAE0413D36E868E2C81D7204AEA96649A67B6439D04C2 \
|
||||
93A97046DEF4D31F49D32BAFBF814808A2E83EF0B212D7287D6AC6714A4A74F1 \
|
||||
A2BC057BFBC3023986FAE970A306E214B9400416B876A8F689BE3B9E36FD7AEB \
|
||||
49BA3E8DC1F24900AB41605921CFBBEE005CF5D577849183CB7F6742A908A7AE \
|
||||
1D2077353A42B86659A3676131A497B652BFAED4088BCE32E9B42D7A3BCAFD46 \
|
||||
63E252539D4853D2C482FED427F49CC9683C48B0158A7CA47490D5EAD0447527 \
|
||||
9AD0B47788F65A9E09A38681AC6B65E22A901155B9C66307C8E6854D6F041E5B \
|
||||
348A0D6F20A3C2DCB53E8444C280455EBBF9F34D34B18ABEAAC748093A310289 \
|
||||
0234453454C662718C67379D3D0D1C68EB42009EDC67CF6B3E6DEEAAAD969F53 \
|
||||
B0906F8B63351081F02F7BA65370A6E6A71E0EF82E38A910F9B875523376E66D \
|
||||
EC1107FA4CC4F66175A8A32F1D0D7FF5FC5241165BEA75B4F73ADB6F5FC0B49A \
|
||||
E287B04D67D351E87BA176EAC1E9C1BC0B67FC6C13C35F14BA08466002CC8BB6 \
|
||||
A064BBB5A6F1B193AEE1F7458C6954C24DBED0969193D61953AE2B4909A738F7 \
|
||||
B0CD0A330EB89323C22AF554A794CFE24B590C079077812B4DFD14CEF87536B8 \
|
||||
844C810DAEDC25CC71338935FB92E260BDB46138666B90536D6CDC500A02EA7A \
|
||||
AE3DEF84933BBA3960C1DA76C70AED10CE65C2F4EB91D82CAE36E33B75AE2D88 \
|
||||
0F73CAD4D4C2C2A76523D10FCC60B15CF0793928B43FF7DDD1B3E8F34C2174EF \
|
||||
2666BC91107223CF44D2F61AF44BBE918CCBF5998C315510B14B643996793CE0 \
|
||||
EF642967134BC88CC793F735A21F5A01345CE10ABA43DECD4E6AD41A105A3B0E \
|
||||
E38E217950A1AA6BEE330075B18331DC5A6DA5D731336F0F2543E1F2396DF25C \
|
||||
BF92399907A7325352AB7CEF98D0582EEE3E8130515D214FA0BF37B31AF5D74D \
|
||||
889ADB8D9DA438D1D5ADD7F70A3EDB089501189EA4F61BFFF406E7C961113827 \
|
||||
986B0483E7A8E6F3F81DC31CB2C7C48B92160D3452D717A759D5DDF71671529F \
|
||||
B187A0CCE7F5B9EAE3A851B13CAFFD19502D22CBB1073A4E68CB2EB5319D0E02 \
|
||||
F1B418A34AA18F15DE0B9667D7925B4651F8E73D4191B2C868915344BDBD18E5
|
||||
Test: Encrypt
|
||||
#
|
||||
Comment: All 0 key, all 0 iv, 0xfffffffe counter block, 256 bytes
|
||||
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
|
||||
IV: 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
Plaintext: r256 00
|
||||
Ciphertext: \
|
||||