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