From ca594ff52576919df1fc32e4ff826b35c74b0af1 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 9 Sep 2016 10:51:38 -0400 Subject: [PATCH 1/3] Updated documentation --- integer.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/integer.h b/integer.h index f1d393a2..f289779a 100644 --- a/integer.h +++ b/integer.h @@ -2,6 +2,12 @@ //! \file integer.h //! \brief Multiple precision integer with arithmetic operations +//! \details The Integer class can represent positive and negative integers +//! with absolute value less than (256**sizeof(word))(256**sizeof(int)). +//! \details Internally, the library uses a sign magnitude representation, and the class +//! has two data members. The first is a IntegerSecBlock (a SecBlock) and it is +//! used to hold the representation. The second is a Sign, and its is used to track +//! the sign of the Integer. #ifndef CRYPTOPP_INTEGER_H #define CRYPTOPP_INTEGER_H From 4eb3ee8d6da8d7d8877006fd183c4defdbd90ca6 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 9 Sep 2016 13:46:04 -0400 Subject: [PATCH 2/3] Clean cryptest.nmake artifacts when running vsClean.cmd --- vs2010.zip | Bin 20126 -> 20184 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/vs2010.zip b/vs2010.zip index 858257df76b6a36c23782c0121af1fba557d7063..20f75a927a955a01ca62cab1bacc662f2e2190a8 100644 GIT binary patch delta 725 zcmbO?m+{72#tn_k%(t^NC$})GvA=zPDIAD5Z)CRS1q;3xKnThR&gTLP?vq9czLvfs z0v0@EpbFRi&S0fz{gy0E&!sNh{;L=n7<$ zTL;9Y72FJrEMI{tSwt9s$|qm+zil9J?7s5TdJERCtSj@5vgJ=c*1)B5W6PA%>J=fD z-?o}sY)rQfi2JsEy;{nm;H2k@`akP-{@%Cybb3lO>;1IN^(H6RzdNv~`Ser@Na%V60s#yEN zHdM9t$hw&;9xcp|nI%54@a=qthrb{3DSv*m_F~`X_)fKl;Whu>H~1~P9K1lZ{V404 ziJ1r93tx7#bSI^7F46-}Zp|D^5iV z-u_+Mskzg@;3wbYpN>1dbzYq{dd*%m#Y4Ak!u&F8dQcsoekb+t<-s6{Ex5X2zFq=e?X>`jzeZim8RGXHLj)zPK;oTST`1 zAJzbGW?-Z-F>o-rG;4U~osOGn%EZ7hWpbp4B4fnnYLBH%;Pj#FZNdypT9Xz1WWfAN tH2!%szN(KgO#S9^pHfCX)bup@m#+#a`2fwcVyu}Q<7dP6#|xNr7yy!|Pgwu} delta 659 zcmcaHmvP=)#tn_k%r{yzCbuxFu}7S_7!JgnH!@rEf(73TAOvLu=W~Gt_emoJUrS#R z0Sg{7P=#xMXRuOK)uma(^G?vN`2~y&43k(H7`Pc^7|M#Bb5axY^pbN^LPIzim=h*5 znv2!lJoGmE*7S{Wt;4aqxbbrD>UvX z-Tkii+tXVZ)VAbFbfLv zNI!GB_v6{7*G&7W!`IEwp0ulIi|OYDd!DcPzbZ^Bxa`)~|MN9ib?-lW__i}<;gxmS zGrzxFlCUa7oZTYHD{Hqz(ZQb8w`|qs&(ym0modPbnMH(wiGhOw7)z6@{P-u&@Q|6z zVlKS-xW{BBaD2vkn=nP3nY__YcyfR@B;Ge;3UT^isEYS7M$))>qfaR#A8J~dY~rWF am@xUHkKE*PKRHIH$ Date: Fri, 9 Sep 2016 14:15:19 -0400 Subject: [PATCH 3/3] Add 'make zip' test to script --- cryptest.sh | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/cryptest.sh b/cryptest.sh index 1ba762d7..dd4edac0 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -628,6 +628,24 @@ if [[ (-z "$HAVE_UNIFIED_ASM") ]]; then fi fi +# Testing 'make zip' +if [[ (-z "$HAVE_ZIP") ]]; then + HAVE_ZIP=0 + ZIP_PROG=$(which zip 2>&1 | "$GREP" -v "no zip" | head -1) + UNZIP_PROG=$(which unzip 2>&1 | "$GREP" -v "no unzip" | head -1) + if [[ (! -z "$ZIP_PROG" && ! -z "$UNZIP_PROG") ]]; then + HAVE_ZIP=1 + zip -v &>/dev/null + if [[ "$?" -ne "0" ]]; then + HAVE_ZIP=0 + fi + unzip -v &>/dev/null + if [[ "$?" -ne "0" ]]; then + HAVE_ZIP=0 + fi + fi +fi + # ARMv7 and ARMv8, including NEON, CRC32 and Crypto extensions if [[ ("$IS_ARM32" -ne "0" || "$IS_ARM64" -ne "0") ]]; then @@ -5275,6 +5293,68 @@ if [[ ("$IS_CYGWIN" -eq "0" && "$IS_MINGW" -eq "0") ]]; then fi fi +############################################ +# Test 'make zip' +if [[ ("$HAVE_ZIP" -ne "0") ]]; then + + OLD_DIR=$(pwd) + "$MAKE" zip + + RESULT=$(unzip -aoq cryptopp563.zip -d "$TMP/cryptopp563-zip/") + if [[ "$RESULT" -eq "0" ]]; then + cd "$TMP/cryptopp563-zip/" + + ############################################ + # Debug + echo + echo "************************************" | tee -a "$TEST_RESULTS" "$INSTALL_RESULTS" + echo "Testing: Debug, 'make zip'" | tee -a "$TEST_RESULTS" "$INSTALL_RESULTS" + echo + + "$MAKE" clean > /dev/null 2>&1 + rm -f adhoc.cpp > /dev/null 2>&1 + + CXX="$CXX" CXXFLAGS="$DEBUG_CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" + if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then + echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" + else + ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" + if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then + echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" + fi + ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" + if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then + echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" + fi + fi + + ############################################ + # Release + echo + echo "************************************" | tee -a "$TEST_RESULTS" "$INSTALL_RESULTS" + echo "Testing: Release, 'make zip'" | tee -a "$TEST_RESULTS" "$INSTALL_RESULTS" + echo + + "$MAKE" clean > /dev/null 2>&1 + rm -f adhoc.cpp > /dev/null 2>&1 + + CXX="$CXX" CXXFLAGS="$RELEASECXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" + if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then + echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" + else + ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" + if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then + echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" + fi + ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" + if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then + echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" + fi + fi + fi + cd "$OLD_DIR" +fi + ############################################# ############################################# ################ END TESTING ################