| 1 |
Description: Autogenerated patch header for a single-debian-patch file. |
| 2 |
The delta against upstream is either kept as a single patch, or maintained |
| 3 |
in some VCS, and exported as a single patch instead of more manageable |
| 4 |
atomic patches. |
| 5 |
Forwarded: not-needed |
| 6 |
|
| 7 |
--- |
| 8 |
--- /dev/null |
| 9 |
+++ scrypt-1.3.3/.autom4te.cfg |
| 10 |
@@ -0,0 +1,7 @@ |
| 11 |
+## ------------------ ## |
| 12 |
+## User Preferences. ## |
| 13 |
+## ------------------ ## |
| 14 |
+ |
| 15 |
+begin-language: "Autoconf-without-aclocal-m4" |
| 16 |
+args: --no-cache |
| 17 |
+end-language: "Autoconf-without-aclocal-m4" |
| 18 |
--- /dev/null |
| 19 |
+++ scrypt-1.3.3/.github/workflows/compile.yml |
| 20 |
@@ -0,0 +1,114 @@ |
| 21 |
+name: Compile & test |
| 22 |
+ |
| 23 |
+# Run whenever we push to any branch without a "/", other than [coverity-scan]. |
| 24 |
+on: |
| 25 |
+ push: |
| 26 |
+ branches: |
| 27 |
+ - '*' |
| 28 |
+ - '!coverity-scan' |
| 29 |
+ |
| 30 |
+env: |
| 31 |
+ # Shared variables amongst all projects / platforms / compilers. |
| 32 |
+ CFLAGS_ALL: -std=c99 -O2 |
| 33 |
+ CFLAGS_CLANG_LIBCPERCIVA: -Wall -Wextra -Werror -Weverything |
| 34 |
+ -Wno-#warnings -Wno-pedantic -Wno-padded |
| 35 |
+ -Wno-format-nonliteral |
| 36 |
+ -Wno-disabled-macro-expansion |
| 37 |
+ -Wno-missing-noreturn |
| 38 |
+ -Wno-unused-macros |
| 39 |
+ -Wno-documentation-unknown-command |
| 40 |
+ -Wno-implicit-fallthrough |
| 41 |
+ CFLAGS_GCC_LIBCPERCIVA: -Wall -Wextra -Werror -Wpedantic |
| 42 |
+ -pedantic-errors -Wno-clobbered |
| 43 |
+ # Variables for specific projects / platforms / compilers. |
| 44 |
+ CFLAGS_CLANG_PROJECT: -Wno-reserved-id-macro |
| 45 |
+ CFLAGS_GCC_PROJECT: -Wno-cpp |
| 46 |
+ CFLAGS_OSX: -Wno-poison-system-directories |
| 47 |
+ -Wno-deprecated-declarations |
| 48 |
+ LDFLAGS_OSX: |
| 49 |
+ |
| 50 |
+jobs: |
| 51 |
+ Ubuntu: |
| 52 |
+ name: Ubuntu |
| 53 |
+ runs-on: ubuntu-20.04 |
| 54 |
+ steps: |
| 55 |
+ - name: Update apt-get |
| 56 |
+ run: sudo apt-get update |
| 57 |
+ - name: Install software |
| 58 |
+ run: sudo apt-get install --no-install-recommends |
| 59 |
+ valgrind autoconf-archive |
| 60 |
+ - name: Checkout code |
| 61 |
+ uses: actions/checkout@v4 |
| 62 |
+ - name: Run autoreconf |
| 63 |
+ run: |
| 64 |
+ autoreconf -i |
| 65 |
+ - name: Configure with clang |
| 66 |
+ env: |
| 67 |
+ CC: clang-10 |
| 68 |
+ CFLAGS: ${{ env.CFLAGS_ALL }} |
| 69 |
+ run: ./configure |
| 70 |
+ - name: Compile with clang |
| 71 |
+ env: |
| 72 |
+ CC: clang-10 |
| 73 |
+ CFLAGS: ${{ env.CFLAGS_ALL }} |
| 74 |
+ ${{ env.CFLAGS_CLANG_LIBCPERCIVA }} |
| 75 |
+ ${{ env.CFLAGS_CLANG_PROJECT }} |
| 76 |
+ # make(1) doesn't automatically override the CFLAGS macro set inside |
| 77 |
+ # Makefile with the environment variable. |
| 78 |
+ run: make CFLAGS="${{ env.CFLAGS }}" |
| 79 |
+ - name: Test clang binaries |
| 80 |
+ env: |
| 81 |
+ USE_VALGRIND: 1 |
| 82 |
+ run: make test VERBOSE=1 |
| 83 |
+ - name: Clean |
| 84 |
+ run: make clean |
| 85 |
+ - name: Configure with gcc |
| 86 |
+ env: |
| 87 |
+ CC: gcc-10 |
| 88 |
+ CFLAGS: ${{ env.CFLAGS_ALL }} |
| 89 |
+ run: ./configure |
| 90 |
+ - name: Compile with gcc |
| 91 |
+ env: |
| 92 |
+ CC: gcc-10 |
| 93 |
+ CFLAGS: ${{ env.CFLAGS_ALL }} |
| 94 |
+ ${{ env.CFLAGS_GCC_LIBCPERCIVA }} |
| 95 |
+ ${{ env.CFLAGS_GCC_PROJECT }} |
| 96 |
+ # make(1) doesn't automatically override the CFLAGS macro set inside |
| 97 |
+ # Makefile with the environment variable. |
| 98 |
+ run: make CFLAGS="${{ env.CFLAGS }}" |
| 99 |
+ - name: Test gcc binaries |
| 100 |
+ env: |
| 101 |
+ USE_VALGRIND: 1 |
| 102 |
+ run: make test VERBOSE=1 |
| 103 |
+ - name: Check for untracked files |
| 104 |
+ run: test -z "$(git status --porcelain=v1)" |
| 105 |
+ macOS: |
| 106 |
+ name: macOS |
| 107 |
+ runs-on: macOS-13 |
| 108 |
+ steps: |
| 109 |
+ - name: Checkout code |
| 110 |
+ uses: actions/checkout@v4 |
| 111 |
+ - name: Install software |
| 112 |
+ run: brew install automake |
| 113 |
+ - name: Run autoreconf |
| 114 |
+ run: autoreconf -i |
| 115 |
+ - name: Configure with clang |
| 116 |
+ env: |
| 117 |
+ CC: clang |
| 118 |
+ CFLAGS: ${{ env.CFLAGS_ALL }} |
| 119 |
+ ${{ env.CFLAGS_OSX }} |
| 120 |
+ LDFLAGS: ${{ env.LDFLAGS_OSX }} |
| 121 |
+ run: ./configure |
| 122 |
+ - name: Compile with clang |
| 123 |
+ env: |
| 124 |
+ CC: clang |
| 125 |
+ CFLAGS: ${{ env.CFLAGS_ALL }} |
| 126 |
+ ${{ env.CFLAGS_CLANG_LIBCPERCIVA }} |
| 127 |
+ ${{ env.CFLAGS_CLANG_PROJECT }} |
| 128 |
+ ${{ env.CFLAGS_OSX }} |
| 129 |
+ LDFLAGS: ${{ env.LDFLAGS_OSX }} |
| 130 |
+ # make(1) doesn't automatically override the CFLAGS macro set inside |
| 131 |
+ # Makefile with the environment variable. |
| 132 |
+ run: make CFLAGS="${{ env.CFLAGS }}" |
| 133 |
+ - name: Test clang binaries |
| 134 |
+ run: make test VERBOSE=1 |
| 135 |
--- /dev/null |
| 136 |
+++ scrypt-1.3.3/.github/workflows/coverity-scan.yml |
| 137 |
@@ -0,0 +1,29 @@ |
| 138 |
+name: coverity-scan |
| 139 |
+ |
| 140 |
+# Only trigger on the [coverity-scan] branch. |
| 141 |
+on: |
| 142 |
+ push: |
| 143 |
+ branches: |
| 144 |
+ - coverity-scan |
| 145 |
+ |
| 146 |
+# Run coverity scan. For now, we're re-using the Travis-CI script, which |
| 147 |
+# requires us to fake a TRAVIS_BRANCH environment variable. |
| 148 |
+jobs: |
| 149 |
+ coverity-scan: |
| 150 |
+ runs-on: ubuntu-20.04 |
| 151 |
+ steps: |
| 152 |
+ - name: Checkout |
| 153 |
+ uses: actions/checkout@v4 |
| 154 |
+ - name: Run autoreconf |
| 155 |
+ run: autoreconf -i |
| 156 |
+ - name: Configure with the default compiler |
| 157 |
+ run: ./configure |
| 158 |
+ - name: Coverity scan |
| 159 |
+ env: |
| 160 |
+ COVERITY_SCAN_PROJECT_NAME: ${{ github.repository }} |
| 161 |
+ COVERITY_SCAN_BRANCH_PATTERN: coverity-scan |
| 162 |
+ COVERITY_SCAN_NOTIFICATION_EMAIL: [email protected] |
| 163 |
+ COVERITY_SCAN_BUILD_COMMAND: make all |
| 164 |
+ COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} |
| 165 |
+ TRAVIS_BRANCH: coverity-scan |
| 166 |
+ run: curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash || true |
| 167 |
--- /dev/null |
| 168 |
+++ scrypt-1.3.3/Makefile.am |
| 169 |
@@ -0,0 +1,297 @@ |
| 170 |
+bin_PROGRAMS= scrypt |
| 171 |
+noinst_PROGRAMS= \ |
| 172 |
+ tests/valgrind/potential-memleaks \ |
| 173 |
+ tests/verify-strings/test_scrypt |
| 174 |
+dist_man_MANS=$(scrypt_man_MANS) |
| 175 |
+ACLOCAL_AMFLAGS= -I m4 |
| 176 |
+ |
| 177 |
+# These files fulfill the crypto_scrypt() function, with the exception of |
| 178 |
+# libcperciva/alg/sha256_shani.c |
| 179 |
+# lib/crypto/crypto_scrypt_smix_sse2.c |
| 180 |
+# which require special compiler flags and are thus compiled as separate |
| 181 |
+# libraries. See test_scrypt for an example. |
| 182 |
+crypto_scrypt_files= \ |
| 183 |
+ lib-platform/crypto/crypto_scrypt.c \ |
| 184 |
+ lib-platform/crypto/crypto_scrypt.h \ |
| 185 |
+ lib-platform/platform.h \ |
| 186 |
+ lib/crypto/crypto_scrypt_smix.c \ |
| 187 |
+ lib/crypto/crypto_scrypt_smix.h \ |
| 188 |
+ lib/crypto/crypto_scrypt_smix_sse2.h \ |
| 189 |
+ libcperciva/alg/sha256.c \ |
| 190 |
+ libcperciva/alg/sha256.h \ |
| 191 |
+ libcperciva/alg/sha256_arm.h \ |
| 192 |
+ libcperciva/alg/sha256_shani.h \ |
| 193 |
+ libcperciva/alg/sha256_sse2.h \ |
| 194 |
+ libcperciva/cpusupport/cpusupport.h \ |
| 195 |
+ libcperciva/util/insecure_memzero.c \ |
| 196 |
+ libcperciva/util/insecure_memzero.h \ |
| 197 |
+ libcperciva/util/warnp.c \ |
| 198 |
+ libcperciva/util/warnp.h |
| 199 |
+ |
| 200 |
+# Don't include crypto_aesctr_shared.c in this list, as it should be included |
| 201 |
+# directly into other translation unit(s), and not compiled on its own. |
| 202 |
+scrypt_SOURCES= \ |
| 203 |
+ $(crypto_scrypt_files) \ |
| 204 |
+ lib-platform/util/memlimit.h \ |
| 205 |
+ lib/scryptenc/scryptenc.c \ |
| 206 |
+ lib/scryptenc/scryptenc.h \ |
| 207 |
+ lib/scryptenc/scryptenc_cpuperf.c \ |
| 208 |
+ lib/scryptenc/scryptenc_cpuperf.h \ |
| 209 |
+ lib/scryptenc/scryptenc_print_error.c \ |
| 210 |
+ lib/scryptenc/scryptenc_print_error.h \ |
| 211 |
+ lib/util/passphrase_entry.c \ |
| 212 |
+ lib/util/passphrase_entry.h \ |
| 213 |
+ libcperciva/crypto/crypto_aes.h \ |
| 214 |
+ libcperciva/crypto/crypto_aes_aesni.h \ |
| 215 |
+ libcperciva/crypto/crypto_aes_aesni_m128i.h \ |
| 216 |
+ libcperciva/crypto/crypto_aes_arm.h \ |
| 217 |
+ libcperciva/crypto/crypto_aes_arm_u8.h \ |
| 218 |
+ libcperciva/crypto/crypto_aesctr.c \ |
| 219 |
+ libcperciva/crypto/crypto_aesctr.h \ |
| 220 |
+ libcperciva/crypto/crypto_aesctr_aesni.h \ |
| 221 |
+ libcperciva/crypto/crypto_aesctr_arm.h \ |
| 222 |
+ libcperciva/crypto/crypto_entropy.c \ |
| 223 |
+ libcperciva/crypto/crypto_entropy.h \ |
| 224 |
+ libcperciva/crypto/crypto_entropy_rdrand.h \ |
| 225 |
+ libcperciva/crypto/crypto_verify_bytes.c \ |
| 226 |
+ libcperciva/crypto/crypto_verify_bytes.h \ |
| 227 |
+ libcperciva/util/align_ptr.h \ |
| 228 |
+ libcperciva/util/asprintf.c \ |
| 229 |
+ libcperciva/util/asprintf.h \ |
| 230 |
+ libcperciva/util/entropy.c \ |
| 231 |
+ libcperciva/util/entropy.h \ |
| 232 |
+ libcperciva/util/getopt.c \ |
| 233 |
+ libcperciva/util/getopt.h \ |
| 234 |
+ libcperciva/util/humansize.c \ |
| 235 |
+ libcperciva/util/humansize.h \ |
| 236 |
+ libcperciva/util/monoclock.c \ |
| 237 |
+ libcperciva/util/monoclock.h \ |
| 238 |
+ libcperciva/util/parsenum.h \ |
| 239 |
+ libcperciva/util/readpass.c \ |
| 240 |
+ libcperciva/util/readpass.h \ |
| 241 |
+ libcperciva/util/readpass_file.c \ |
| 242 |
+ libcperciva/util/sysendian.h \ |
| 243 |
+ main.c |
| 244 |
+ |
| 245 |
+AM_CPPFLAGS= \ |
| 246 |
+ -I$(srcdir)/lib \ |
| 247 |
+ -I$(srcdir)/lib-platform \ |
| 248 |
+ -I$(srcdir)/lib-platform/crypto \ |
| 249 |
+ -I$(srcdir)/lib-platform/util \ |
| 250 |
+ -I$(srcdir)/lib/crypto \ |
| 251 |
+ -I$(srcdir)/lib/scryptenc \ |
| 252 |
+ -I$(srcdir)/lib/util \ |
| 253 |
+ -I$(srcdir)/libcperciva/alg \ |
| 254 |
+ -I$(srcdir)/libcperciva/cpusupport \ |
| 255 |
+ -I$(srcdir)/libcperciva/crypto \ |
| 256 |
+ -I$(srcdir)/libcperciva/util \ |
| 257 |
+ -DAPISUPPORT_CONFIG_FILE=\"apisupport-config.h\" \ |
| 258 |
+ -DCPUSUPPORT_CONFIG_FILE=\"cpusupport-config.h\" \ |
| 259 |
+ -D_POSIX_C_SOURCE=200809L \ |
| 260 |
+ -D_XOPEN_SOURCE=700 \ |
| 261 |
+ ${CFLAGS_POSIX} |
| 262 |
+ |
| 263 |
+# Each "paragraph" denotes a rank of dependencies. Libraries without |
| 264 |
+# dependencies go in the bottom paragraph; a library which depends on one of |
| 265 |
+# those goes in the preceeding paragraph; and so on. |
| 266 |
+scrypt_LDADD= \ |
| 267 |
+ libcperciva_crypto_aes.la \ |
| 268 |
+ \ |
| 269 |
+ libcperciva_aesni.la \ |
| 270 |
+ libcperciva_arm_aes.la \ |
| 271 |
+ libcperciva_arm_sha256.la \ |
| 272 |
+ libcperciva_cpusupport_detect.la \ |
| 273 |
+ libcperciva_rdrand.la \ |
| 274 |
+ libcperciva_shani.la \ |
| 275 |
+ libscrypt_memlimit.la \ |
| 276 |
+ libscrypt_sse2.la \ |
| 277 |
+ ${LDADD_POSIX} |
| 278 |
+scrypt_man_MANS= scrypt.1 |
| 279 |
+ |
| 280 |
+# apisupport needs to access post-configure info: lib-platform/platform.h, |
| 281 |
+# config.h, and -DHAVE_CONFIG_H. |
| 282 |
+apisupport-config.h: |
| 283 |
+ ( export CC="${CC}"; export CFLAGS="-I${top_srcdir}/lib-platform -I${builddir} ${DEFS} ${CFLAGS}"; command -p sh $(srcdir)/libcperciva/apisupport/Build/apisupport.sh "$$PATH") > apisupport-config.h.tmp && command -p mv apisupport-config.h.tmp apisupport-config.h |
| 284 |
+cpusupport-config.h: |
| 285 |
+ ( export CC="${CC}"; export CFLAGS="${CFLAGS}"; command -p sh $(srcdir)/libcperciva/cpusupport/Build/cpusupport.sh "$$PATH") > cpusupport-config.h.tmp && command -p mv cpusupport-config.h.tmp cpusupport-config.h |
| 286 |
+BUILT_SOURCES= \ |
| 287 |
+ apisupport-config.h \ |
| 288 |
+ cpusupport-config.h |
| 289 |
+CLEANFILES= \ |
| 290 |
+ apisupport-config.h \ |
| 291 |
+ apisupport-config.h.tmp \ |
| 292 |
+ cpusupport-config.h \ |
| 293 |
+ cpusupport-config.h.tmp |
| 294 |
+ |
| 295 |
+# Libraries from libcperciva code. |
| 296 |
+noinst_LTLIBRARIES= libcperciva_aesni.la |
| 297 |
+libcperciva_aesni_la_SOURCES= \ |
| 298 |
+ libcperciva/crypto/crypto_aes_aesni.c \ |
| 299 |
+ libcperciva/crypto/crypto_aesctr_aesni.c |
| 300 |
+nodist_libcperciva_aesni_la_SOURCES= cpusupport-config.h |
| 301 |
+libcperciva_aesni_la_CFLAGS=`. ./cpusupport-config.h; echo $${CFLAGS_X86_AESNI}` |
| 302 |
+ |
| 303 |
+noinst_LTLIBRARIES+= libcperciva_arm_aes.la |
| 304 |
+libcperciva_arm_aes_la_SOURCES= \ |
| 305 |
+ libcperciva/crypto/crypto_aes_arm.c \ |
| 306 |
+ libcperciva/crypto/crypto_aesctr_arm.c |
| 307 |
+nodist_libcperciva_arm_aes_la_SOURCES= cpusupport-config.h |
| 308 |
+libcperciva_arm_aes_la_CFLAGS=`. ./cpusupport-config.h; echo $${CFLAGS_ARM_AES}` |
| 309 |
+ |
| 310 |
+noinst_LTLIBRARIES+= libcperciva_rdrand.la |
| 311 |
+libcperciva_rdrand_la_SOURCES= libcperciva/crypto/crypto_entropy_rdrand.c |
| 312 |
+nodist_libcperciva_rdrand_la_SOURCES= cpusupport-config.h |
| 313 |
+libcperciva_rdrand_la_CFLAGS= \ |
| 314 |
+ `. ./cpusupport-config.h; echo $${CFLAGS_X86_RDRAND}` |
| 315 |
+ |
| 316 |
+noinst_LTLIBRARIES+= libcperciva_shani.la |
| 317 |
+libcperciva_shani_la_SOURCES= libcperciva/alg/sha256_shani.c |
| 318 |
+nodist_libcperciva_shani_la_SOURCES= cpusupport-config.h |
| 319 |
+libcperciva_shani_la_CFLAGS=`. ./cpusupport-config.h; echo $${CFLAGS_X86_SHANI} $${CFLAGS_X86_SSSE3}` |
| 320 |
+ |
| 321 |
+noinst_LTLIBRARIES+= libcperciva_arm_sha256.la |
| 322 |
+libcperciva_arm_sha256_la_SOURCES= libcperciva/alg/sha256_arm.c |
| 323 |
+nodist_libcperciva_arm_sha256_la_SOURCES= cpusupport-config.h |
| 324 |
+libcperciva_arm_sha256_la_CFLAGS=`. ./cpusupport-config.h; echo $${CFLAGS_ARM_SHA256}` |
| 325 |
+ |
| 326 |
+noinst_LTLIBRARIES+= libcperciva_crypto_aes.la |
| 327 |
+libcperciva_crypto_aes_la_SOURCES= libcperciva/crypto/crypto_aes.c |
| 328 |
+nodist_libcperciva_crypto_aes_la_SOURCES= cpusupport-config.h |
| 329 |
+libcperciva_crypto_aes_la_CFLAGS=`. ./apisupport-config.h; echo $${CFLAGS_LIBCRYPTO_LOW_LEVEL_AES}` |
| 330 |
+ |
| 331 |
+noinst_LTLIBRARIES+= libcperciva_cpusupport_detect.la |
| 332 |
+libcperciva_cpusupport_detect_la_SOURCES= \ |
| 333 |
+ libcperciva/cpusupport/cpusupport_arm_aes.c \ |
| 334 |
+ libcperciva/cpusupport/cpusupport_arm_sha256.c \ |
| 335 |
+ libcperciva/cpusupport/cpusupport_x86_aesni.c \ |
| 336 |
+ libcperciva/cpusupport/cpusupport_x86_rdrand.c \ |
| 337 |
+ libcperciva/cpusupport/cpusupport_x86_shani.c \ |
| 338 |
+ libcperciva/cpusupport/cpusupport_x86_sse2.c \ |
| 339 |
+ libcperciva/cpusupport/cpusupport_x86_ssse3.c |
| 340 |
+nodist_libcperciva_cpusupport_detect_la_SOURCES= cpusupport-config.h |
| 341 |
+ |
| 342 |
+ |
| 343 |
+# Library from libcperciva and scrypt code. |
| 344 |
+noinst_LTLIBRARIES+= libscrypt_sse2.la |
| 345 |
+libscrypt_sse2_la_SOURCES= \ |
| 346 |
+ lib/crypto/crypto_scrypt_smix_sse2.c \ |
| 347 |
+ libcperciva/alg/sha256_sse2.c |
| 348 |
+nodist_libscrypt_sse2_la_SOURCES= cpusupport-config.h |
| 349 |
+libscrypt_sse2_la_CFLAGS=`. ./cpusupport-config.h; echo $${CFLAGS_X86_SSE2}` |
| 350 |
+ |
| 351 |
+# This library uses non-POSIX functionality, so we need to cancel the |
| 352 |
+# _POSIX_C_SOURCE and _XOPEN_SOURCE defined in AM_CPPFLAGS. |
| 353 |
+noinst_LTLIBRARIES+= libscrypt_memlimit.la |
| 354 |
+libscrypt_memlimit_la_SOURCES= \ |
| 355 |
+ lib-platform/util/memlimit.c |
| 356 |
+libscrypt_memlimit_la_CFLAGS=`. ./apisupport-config.h; echo $${CFLAGS_NONPOSIX_MEMLIMIT}` |
| 357 |
+ |
| 358 |
+# Install libscrypt-kdf? |
| 359 |
+if LIBSCRYPT_KDF |
| 360 |
+lib_LTLIBRARIES= libscrypt-kdf.la |
| 361 |
+libscrypt_kdf_la_LDFLAGS= \ |
| 362 |
+ -export-symbols-regex 'crypto_scrypt$$' \ |
| 363 |
+ -version-info 1 |
| 364 |
+include_HEADERS= libscrypt-kdf/scrypt-kdf.h |
| 365 |
+noinst_PROGRAMS+= tests/libscrypt-kdf/sample-libscrypt-kdf |
| 366 |
+else |
| 367 |
+# Allow the user to get a usable library even if they didn't run configure |
| 368 |
+# with --enable-libscrypt-kdf. If we didn't include this, they would get |
| 369 |
+# empty libraries if they ran `make libscrypt-kdf.la`. |
| 370 |
+EXTRA_LTLIBRARIES= libscrypt-kdf.la |
| 371 |
+endif |
| 372 |
+ |
| 373 |
+# Shared definitions for libscrypt-kdf. |
| 374 |
+libscrypt_kdf_la_SOURCES= $(crypto_scrypt_files) |
| 375 |
+libscrypt_kdf_la_LIBADD= \ |
| 376 |
+ libcperciva_arm_sha256.la \ |
| 377 |
+ libcperciva_cpusupport_detect.la \ |
| 378 |
+ libcperciva_shani.la \ |
| 379 |
+ libscrypt_sse2.la |
| 380 |
+# Workaround for "created with both libtool and without". |
| 381 |
+libscrypt_kdf_la_CFLAGS= $(AM_CFLAGS) |
| 382 |
+ |
| 383 |
+# Test libscrypt-kdf compile. |
| 384 |
+tests_libscrypt_kdf_sample_libscrypt_kdf_SOURCES= \ |
| 385 |
+ tests/libscrypt-kdf/sample-libscrypt-kdf.c |
| 386 |
+tests_libscrypt_kdf_sample_libscrypt_kdf_CPPFLAGS= \ |
| 387 |
+ -I$(srcdir)/libscrypt-kdf/ |
| 388 |
+tests_libscrypt_kdf_sample_libscrypt_kdf_LDADD= libscrypt-kdf.la |
| 389 |
+ |
| 390 |
+# crypto_aesctr_shared.c is in this list because it can't be included in the |
| 391 |
+# _SOURCES because it should only be included as part of another translation |
| 392 |
+# unit. |
| 393 |
+EXTRA_DIST= \ |
| 394 |
+ .autom4te.cfg \ |
| 395 |
+ BUILDING \ |
| 396 |
+ COPYRIGHT \ |
| 397 |
+ FORMAT \ |
| 398 |
+ README.md \ |
| 399 |
+ STYLE \ |
| 400 |
+ get-version.sh \ |
| 401 |
+ lib/README \ |
| 402 |
+ lib/crypto/crypto_scrypt-ref.c \ |
| 403 |
+ libcperciva/POSIX/README \ |
| 404 |
+ libcperciva/POSIX/posix-abstract-declarator.c \ |
| 405 |
+ libcperciva/POSIX/posix-cflags.sh \ |
| 406 |
+ libcperciva/POSIX/posix-clock_gettime.c \ |
| 407 |
+ libcperciva/POSIX/posix-clock_realtime.c \ |
| 408 |
+ libcperciva/POSIX/posix-inet-addrstrlen.c \ |
| 409 |
+ libcperciva/POSIX/posix-inet6-addrstrlen.c \ |
| 410 |
+ libcperciva/POSIX/posix-l.sh \ |
| 411 |
+ libcperciva/POSIX/posix-msg_nosignal.c \ |
| 412 |
+ libcperciva/POSIX/posix-restrict.c \ |
| 413 |
+ libcperciva/POSIX/posix-stat-st_mtim.c \ |
| 414 |
+ libcperciva/POSIX/posix-trivial.c \ |
| 415 |
+ libcperciva/apisupport/Build/apisupport-LIBCRYPTO-LOW_LEVEL_AES.c\ |
| 416 |
+ libcperciva/apisupport/Build/apisupport-NONPOSIX-MEMLIMIT.c \ |
| 417 |
+ libcperciva/apisupport/Build/apisupport.sh \ |
| 418 |
+ libcperciva/cpusupport/Build/cpusupport-ARM-AES.c \ |
| 419 |
+ libcperciva/cpusupport/Build/cpusupport-ARM-SHA256.c \ |
| 420 |
+ libcperciva/cpusupport/Build/cpusupport-HWCAP-ELF_AUX_INFO.c \ |
| 421 |
+ libcperciva/cpusupport/Build/cpusupport-HWCAP-GETAUXVAL.c \ |
| 422 |
+ libcperciva/cpusupport/Build/cpusupport-X86-AESNI.c \ |
| 423 |
+ libcperciva/cpusupport/Build/cpusupport-X86-CPUID.c \ |
| 424 |
+ libcperciva/cpusupport/Build/cpusupport-X86-CPUID_COUNT.c \ |
| 425 |
+ libcperciva/cpusupport/Build/cpusupport-X86-RDRAND.c \ |
| 426 |
+ libcperciva/cpusupport/Build/cpusupport-X86-SHANI.c \ |
| 427 |
+ libcperciva/cpusupport/Build/cpusupport-X86-SSE2.c \ |
| 428 |
+ libcperciva/cpusupport/Build/cpusupport-X86-SSSE3.c \ |
| 429 |
+ libcperciva/cpusupport/Build/cpusupport.sh \ |
| 430 |
+ libcperciva/crypto/crypto_aesctr_shared.c \ |
| 431 |
+ tests/01-known-values.sh \ |
| 432 |
+ tests/02-decrypt-reference-file.sh \ |
| 433 |
+ tests/03-encrypt-decrypt-file.sh \ |
| 434 |
+ tests/04-force-resources.sh \ |
| 435 |
+ tests/05-system-scrypt-encrypt-decrypt.sh \ |
| 436 |
+ tests/06-decrypt-fail.sh \ |
| 437 |
+ tests/07-passphrase-env.sh \ |
| 438 |
+ tests/08-passphrase-file.sh \ |
| 439 |
+ tests/09-explicit-params.sh \ |
| 440 |
+ tests/shared_test_functions.sh \ |
| 441 |
+ tests/shared_valgrind_functions.sh \ |
| 442 |
+ tests/test_scrypt.sh \ |
| 443 |
+ tests/verify-strings/test_scrypt.good \ |
| 444 |
+ tests/verify-strings/test_scrypt_good.enc \ |
| 445 |
+ tests/verify-strings/test_scrypt_small.good |
| 446 |
+ |
| 447 |
+# Binary to test the crypto_scrypt() function. |
| 448 |
+tests_verify_strings_test_scrypt_SOURCES= \ |
| 449 |
+ tests/verify-strings/test_scrypt.c \ |
| 450 |
+ $(crypto_scrypt_files) |
| 451 |
+ |
| 452 |
+tests_verify_strings_test_scrypt_LDADD= \ |
| 453 |
+ libcperciva_arm_sha256.la \ |
| 454 |
+ libcperciva_cpusupport_detect.la \ |
| 455 |
+ libcperciva_shani.la \ |
| 456 |
+ libscrypt_sse2.la \ |
| 457 |
+ ${LDADD_POSIX} |
| 458 |
+ |
| 459 |
+# Eliminate false positives while memory-checking for the test framework. |
| 460 |
+tests_valgrind_potential_memleaks_SOURCES= tests/valgrind/potential-memleaks.c |
| 461 |
+ |
| 462 |
+.PHONY: test |
| 463 |
+# we can't only build "scrypt tests/verify-strings/test_scrypt" because that |
| 464 |
+# won't build the BUILT_SOURCES. |
| 465 |
+test: all |
| 466 |
+ $(top_srcdir)/tests/test_scrypt.sh . |
| 467 |
--- /dev/null |
| 468 |
+++ scrypt-1.3.3/configure.ac |
| 469 |
@@ -0,0 +1,65 @@ |
| 470 |
+AC_PREREQ([2.69]) |
| 471 |
+AC_INIT([scrypt],[m4_esyscmd([sh get-version.sh])], |
| 472 |
+ [https://github.com/Tarsnap/scrypt],[scrypt],[http://www.tarsnap.com/scrypt/]) |
| 473 |
+ |
| 474 |
+# Safety check: make sure that the srcdir contains this file. |
| 475 |
+AC_CONFIG_SRCDIR([lib/scryptenc/scryptenc.c]) |
| 476 |
+# Use auxiliary subscripts from this subdirectory (cleans up root). |
| 477 |
+AC_CONFIG_AUX_DIR([config.aux]) |
| 478 |
+# Directory for our additional macros. |
| 479 |
+AC_CONFIG_MACRO_DIR([m4]) |
| 480 |
+# Compute $target_os and related variables. |
| 481 |
+AC_CANONICAL_TARGET |
| 482 |
+AM_INIT_AUTOMAKE([foreign subdir-objects]) |
| 483 |
+ |
| 484 |
+# Checks for programs. |
| 485 |
+m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_C99]) |
| 486 |
+AM_PROG_AR |
| 487 |
+LT_INIT |
| 488 |
+ |
| 489 |
+# Don't rebuild the configure script. I'm distributing a perfectly good one. |
| 490 |
+AM_MAINTAINER_MODE |
| 491 |
+ |
| 492 |
+# Get the POSIX sh early, in case the configure script causes |
| 493 |
+# `command -p getconf` to fail in a broken environment. |
| 494 |
+CHECK_POSIX_SH |
| 495 |
+ |
| 496 |
+# Check if we need -std=c99 in LDFLAGS (for gcc on Solaris). |
| 497 |
+CHECK_SOLARIS_C99 |
| 498 |
+ |
| 499 |
+# Check if we need to add extra paths to CPPFLAGS and LDFLAGS for macOS. |
| 500 |
+CHECK_DARWIN_PATHS |
| 501 |
+ |
| 502 |
+# Checks for AES support in OpenSSL. |
| 503 |
+AC_SEARCH_LIBS([AES_encrypt], [crypto],, |
| 504 |
+ AC_MSG_ERROR([function AES_ENCRYPT not found])) |
| 505 |
+AC_CHECK_HEADERS([openssl/aes.h],, |
| 506 |
+ [AC_MSG_ERROR([Unable to find the openssl/aes.h header])]) |
| 507 |
+ |
| 508 |
+# Check how we can find out the available memory. |
| 509 |
+CHECK_MEMLIMIT_SUPPORT |
| 510 |
+ |
| 511 |
+# Check for posix_memalign. |
| 512 |
+AC_CHECK_FUNCS_ONCE([posix_memalign]) |
| 513 |
+ |
| 514 |
+# Check for mmap so we can work around its absence on Minix. |
| 515 |
+AC_CHECK_FUNCS_ONCE([mmap]) |
| 516 |
+ |
| 517 |
+# Use 64-bit file offsets. |
| 518 |
+AC_SYS_LARGEFILE |
| 519 |
+ |
| 520 |
+# Check whether the user has requested to disable compiler warnings. |
| 521 |
+CHECK_DISABLE_COMPILER_WARNINGS |
| 522 |
+ |
| 523 |
+# Check libcperciva POSIX compatibility. |
| 524 |
+CHECK_LIBCPERCIVA_POSIX([${srcdir}/libcperciva]) |
| 525 |
+ |
| 526 |
+# Check whether the user wants to install libscrypt-kdf. |
| 527 |
+AC_ARG_ENABLE(libscrypt-kdf, AS_HELP_STRING([--enable-libscrypt-kdf], |
| 528 |
+ [Install libscrypt-kdf and development headers.])) |
| 529 |
+AM_CONDITIONAL([LIBSCRYPT_KDF], [test "x${enable_libscrypt_kdf}" = "xyes"]) |
| 530 |
+ |
| 531 |
+# Write configure results and the Makefile. |
| 532 |
+AC_CONFIG_HEADERS([config.h]) |
| 533 |
+AC_CONFIG_FILES([Makefile]) |
| 534 |
+AC_OUTPUT |
| 535 |
--- /dev/null |
| 536 |
+++ scrypt-1.3.3/get-version.sh |
| 537 |
@@ -0,0 +1,38 @@ |
| 538 |
+#!/bin/sh |
| 539 |
+ |
| 540 |
+version=1.3.3-head |
| 541 |
+ |
| 542 |
+# This script outputs a version number for this project to stdout. |
| 543 |
+# - if $SCRYPT_VERSION is given, it is used. |
| 544 |
+# - otherwise, it uses ${version}. |
| 545 |
+# - if there is a ".git/" directory, it will attempt to get a version number |
| 546 |
+# from `git describe` in the form 1.2.0-238-g0a25a7c, where the middle value |
| 547 |
+# is the number of commits since the 1.2.0 tag. |
| 548 |
+ |
| 549 |
+# Use $SCRYPT_VERSION if it exists. |
| 550 |
+if [ -n "${SCRYPT_VERSION}" ]; then |
| 551 |
+ # Do not use \n; that confuses autoconf. |
| 552 |
+ printf "%s" "${SCRYPT_VERSION}" |
| 553 |
+ exit 0 |
| 554 |
+fi |
| 555 |
+ |
| 556 |
+# Get a version number from git, if it exists. |
| 557 |
+if git rev-parse 2>/dev/null; then |
| 558 |
+ # Get a version string from the latest git tag. |
| 559 |
+ if version_git=$( git describe --tags --match '[[:digit:]].*' ) \ |
| 560 |
+ 2>/dev/null ; then |
| 561 |
+ version_decapitated=$( echo "${version}" | sed "s/-head//" ) |
| 562 |
+ # Check that the beginning of this tag matches the version. |
| 563 |
+ case ${version_git} in |
| 564 |
+ "${version_decapitated}"*) |
| 565 |
+ # If so, use that version string. |
| 566 |
+ version=${version_git};; |
| 567 |
+ *) |
| 568 |
+ printf "git tag does not match version\n" 1>&2 |
| 569 |
+ exit 1;; |
| 570 |
+ esac |
| 571 |
+ fi |
| 572 |
+fi |
| 573 |
+ |
| 574 |
+# Output the version to stdout. Do not use \n; that confuses autoconf. |
| 575 |
+printf "%s" "${version}" |
| 576 |
--- /dev/null |
| 577 |
+++ scrypt-1.3.3/release-tools/create-sign-tarball.sh |
| 578 |
@@ -0,0 +1,34 @@ |
| 579 |
+#!/bin/sh |
| 580 |
+ |
| 581 |
+# Process command-line arguments |
| 582 |
+SCRYPTVERSION=$1 |
| 583 |
+GNUPG_SIGNING_HOME=$2 |
| 584 |
+ |
| 585 |
+# Check for required arguments |
| 586 |
+if [ -z "${SCRYPTVERSION}" ] || [ -z "${GNUPG_SIGNING_HOME}" ]; then |
| 587 |
+ echo "Usage: $0 SCRYPTVERSION GNUPG_SIGNING_HOME" |
| 588 |
+ exit 1 |
| 589 |
+fi |
| 590 |
+ |
| 591 |
+# Check for correct OS |
| 592 |
+if [ "$(uname)" != "FreeBSD" ]; then |
| 593 |
+ echo "Error: This script only works on FreeBSD due to the" |
| 594 |
+ echo " sha256 \${PKGNAME}.tgz" |
| 595 |
+ echo "command, which has a different meaning on other OSes." |
| 596 |
+ exit 1 |
| 597 |
+fi |
| 598 |
+ |
| 599 |
+# Constants |
| 600 |
+PKGNAME=scrypt-${SCRYPTVERSION} |
| 601 |
+PKGSIGS=scrypt-sigs-${SCRYPTVERSION} |
| 602 |
+ |
| 603 |
+# Get directory of script |
| 604 |
+dir=$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P) |
| 605 |
+ |
| 606 |
+# Create tarball |
| 607 |
+sh "${dir}/mktarball.sh" "${SCRYPTVERSION}" |
| 608 |
+ |
| 609 |
+# Sign tarball |
| 610 |
+sha256 "${PKGNAME}.tgz" | \ |
| 611 |
+ GNUPGHOME=${GNUPG_SIGNING_HOME} gpg --clearsign \ |
| 612 |
+ > "${PKGSIGS}.asc" |
| 613 |
--- /dev/null |
| 614 |
+++ scrypt-1.3.3/release-tools/mktarball.sh |
| 615 |
@@ -0,0 +1,30 @@ |
| 616 |
+#!/bin/sh |
| 617 |
+ |
| 618 |
+VERSION=$1 |
| 619 |
+if [ -z "${VERSION}" ]; then |
| 620 |
+ echo "Please specify the version number" |
| 621 |
+ exit 1 |
| 622 |
+fi |
| 623 |
+DESTDIR=scrypt-${VERSION} |
| 624 |
+RELEASEDATE=$(date "+%B %d, %Y") |
| 625 |
+ |
| 626 |
+# Copy bits in |
| 627 |
+mkdir "${DESTDIR}" "${DESTDIR}/autotools" |
| 628 |
+cp main.c FORMAT COPYRIGHT BUILDING README.md STYLE "${DESTDIR}" |
| 629 |
+cp Makefile.am .autom4te.cfg "${DESTDIR}" |
| 630 |
+cp Makefile.am "${DESTDIR}/autotools" |
| 631 |
+cp -R lib lib-platform libcperciva libscrypt-kdf m4 tests "${DESTDIR}" |
| 632 |
+# Copy with substitution |
| 633 |
+sed -e "s/@DATE@/${RELEASEDATE}/" < scrypt.1 > "${DESTDIR}/scrypt.1" |
| 634 |
+sed -e "s/\[m4_esyscmd(\[sh get-version\.sh\])]/${VERSION}/" \ |
| 635 |
+ < configure.ac > "${DESTDIR}/configure.ac" |
| 636 |
+cp "${DESTDIR}/configure.ac" "${DESTDIR}/autotools" |
| 637 |
+ |
| 638 |
+# Generate autotools files |
| 639 |
+( cd "${DESTDIR}" || exit |
| 640 |
+autoreconf -i |
| 641 |
+rm .autom4te.cfg Makefile.am aclocal.m4 configure.ac ) |
| 642 |
+ |
| 643 |
+# Create tarball |
| 644 |
+tar -czf "${DESTDIR}.tgz" "${DESTDIR}" |
| 645 |
+rm -r "${DESTDIR}" |
| 646 |
--- scrypt-1.3.3.orig/scrypt.1 |
| 647 |
+++ scrypt-1.3.3/scrypt.1 |
| 648 |
@@ -21,7 +21,7 @@ |
| 649 |
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 650 |
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 651 |
.\" SUCH DAMAGE. |
| 652 |
|
| 653 |
+.Dd @DATE@ |
| 654 |
.Dt SCRYPT 1 |
| 655 |
.Os |
| 656 |
.Sh NAME |