Console Output

Skipping 192 KB.. Full Log
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium-openssl -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium-openssl -v 1 q5616t8k3pzg
+ + ./pegh.openssl -d q5616t8k3pzg cat - /dev/fd/63
++ echo -n a
-o bla.txt
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.878s
user	0m4.308s
sys	0m2.199s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.libsodium-openssl ./pegh.static.libsodium-openssl
+ bin=./pegh.libsodium-openssl
+ shift
+ bin_decrypt=./pegh.static.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.static.libsodium-openssl'
testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.static.libsodium-openssl
+ set +eu
+ '[' '' '!=' 1 ']'
+ echo a
+ ./pegh.libsodium-openssl q5616t8k3pzg
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
+ ++ echo a
++ ./pegh.libsodium-openssl q5616t8k3pzg
cmp /dev/fd/63 /dev/fd/62
++ ++ ./pegh.libsodium-openssl echo q5616t8k3pzga

/dev/fd/63 /dev/fd/62 differ: char 12, line 1
encrypting then decrypting with the same key should succeed
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg
+ ./pegh.libsodium-openssl -e q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key
+ ./pegh.libsodium-openssl -e -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
encrypting with one key and decrypting with another should fail
+ ./pegh.libsodium-openssl -e + q5616t8k3pzg + cmp -i - /tmp/randombytes100/tmp/randombytes100

./pegh.static.libsodium-openssl -d q5616t8k3pzg-wrongkey
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium-openssl -e -f /tmp/leading_zero_key_a
+ ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium-openssl -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium-openssl q5616t8k3pzg
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.443s
user	0m3.643s
sys	0m2.513s
+ test ./pegh.libsodium-openssl ./pegh.static.libsodium-openssl -v 0
+ bin=./pegh.libsodium-openssl
+ shift
+ bin_decrypt=./pegh.static.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.static.libsodium-openssl'
testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.static.libsodium-openssl
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.libsodium-openssl -v 0 q5616t8k3pzg
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
encrypting same data with same key should result in different ciphertext
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.libsodium-openssl -v 0 q5616t8k3pzg
++ echo a
++ ++ ./pegh.libsodium-openssl -v 0 q5616t8k3pzg
echo a
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium-openssl -e -v 0 q5616t8k3pzg
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline

+ ./pegh.libsodium-openssl -e -v 0 -f /tmp/leading_zero_key
+ ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
encrypting with one key and decrypting with another should fail
+ ./pegh.libsodium-openssl -e -v 0 q5616t8k3pzg -i /tmp/randombytes100
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ ./pegh.libsodium-openssl -e -v 0 -f + ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key_b
/tmp/leading_zero_key_a
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'large values of N without enough memory should fail'
large values of N without enough memory should fail
+ ./pegh.libsodium-openssl -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
bad decryption bytes are never output, file should be 0 bytes
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium-openssl -v 0 + q5616t8k3pzg./pegh.static.libsodium-openssl 
-d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.517s
user	0m3.752s
sys	0m2.455s
+ test ./pegh.libsodium-openssl ./pegh.static.libsodium-openssl -v 1
+ bin=./pegh.libsodium-openssl
+ shift
+ bin_decrypt=./pegh.static.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.static.libsodium-openssl'
testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.static.libsodium-openssl
+ set +eu
+ '[' 1 '!=' 1 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
+ ++ ./pegh.libsodium-openssl -v 1 q5616t8k3pzg
++ echo a
cmp /dev/fd/63 ++ /dev/fd/62
echo a
++ ./pegh.libsodium-openssl -v 1 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium-openssl -e -v 1 q5616t8k3pzg
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.libsodium-openssl -e -v 1 -f + /tmp/leading_zero_key./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key

+ cmp - /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium-openssl -e -v 1 q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100+ 
./pegh.static.libsodium-openssl -d q5616t8k3pzg-wrongkey
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium-openssl -e -v 1 -f /tmp/leading_zero_key_a
+ ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium-openssl -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium-openssl -v 1 q5616t8k3pzg
+ + cat - /dev/fd/63
./pegh.static.libsodium-openssl -d q5616t8k3pzg -o bla.txt
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.722s
user	0m4.023s
sys	0m2.332s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.libsodium-openssl ./pegh.libsodium-openssl
+ bin=./pegh.libsodium-openssl
+ shift
+ bin_decrypt=./pegh.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.libsodium-openssl'
testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.libsodium-openssl
+ set +eu
+ '[' '' '!=' 1 ']'
+ echo a
+ ./pegh.libsodium-openssl q5616t8k3pzg
+ ./pegh.libsodium-openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
encrypting same data with same key should result in different ciphertext
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.libsodium-openssl q5616t8k3pzg
++ echo a
++ ./pegh.libsodium-openssl q5616t8k3pzg
++ echo a
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
encrypting then decrypting with the same key should succeed
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.libsodium-openssl -e q5616t8k3pzg
+ ./pegh.libsodium-openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.libsodium-openssl -e -f /tmp/leading_zero_key
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium-openssl -e q5616t8k3pzg -i /tmp/randombytes100
+ ./pegh.libsodium-openssl -d q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ ./pegh.libsodium-openssl -e -f /tmp/leading_zero_key_a
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium-openssl -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
bad decryption bytes are never output, file should be 0 bytes
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
+ ./pegh.libsodium-openssl q5616t8k3pzg
+ echo 'hopefully this doesnt make it to disk'
+ cat - /dev/fd/63
++ + ./pegh.libsodium-openssl -d q5616t8k3pzg -o bla.txt
echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.351s
user	0m3.642s
sys	0m2.382s
+ test ./pegh.libsodium-openssl ./pegh.libsodium-openssl -v 0
+ bin=./pegh.libsodium-openssl
+ shift
+ bin_decrypt=./pegh.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.libsodium-openssl'
testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.libsodium-openssl
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.libsodium-openssl -v 0 q5616t8k3pzg
+ ./pegh.libsodium-openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
+ cmp /dev/fd/63 /dev/fd/62
++ echo a
++ ./pegh.libsodium-openssl -v 0 q5616t8k3pzg
++ echo a
++ ./pegh.libsodium-openssl -v 0 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
encrypting then decrypting with the same key should succeed
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.libsodium-openssl -e -v 0 q5616t8k3pzg
+ ./pegh.libsodium-openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.libsodium-openssl + -e -v 0 -f /tmp/leading_zero_key
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key
cmp - /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium-openssl -e -v + 0 q5616t8k3pzg -i /tmp/randombytes100
./pegh.libsodium-openssl -d q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ ./pegh.libsodium-openssl -e -v 0 -f /tmp/leading_zero_key_a
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium-openssl -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium-openssl -v 0 q5616t8k3pzg
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.312s
user	0m3.589s
sys	0m2.325s
+ test ./pegh.libsodium-openssl ./pegh.libsodium-openssl -v 1
+ bin=./pegh.libsodium-openssl
+ shift
+ bin_decrypt=./pegh.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.libsodium-openssl'
testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.libsodium-openssl
+ set +eu
+ '[' 1 '!=' 1 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
++ ++ ./pegh.libsodium-openssl -v 1 q5616t8k3pzg
+ cmp /dev/fd/63 /dev/fd/62
echo a
++ echo a
++ ./pegh.libsodium-openssl -v 1 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium-openssl -e -v 1 q5616t8k3pzg
+ + cmp - /tmp/randombytes100
./pegh.libsodium-openssl -d q5616t8k3pzg
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.libsodium-openssl -e -v 1 -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium-openssl -e -v 1 q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium-openssl -d q5616t8k3pzg-wrongkey
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium-openssl -e -v 1 -f /tmp/leading_zero_key_a
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium-openssl -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium-openssl -v 1 q5616t8k3pzg
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.859s
user	0m4.183s
sys	0m2.308s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.libsodium-openssl ./pegh.static.libsodium
+ bin=./pegh.libsodium-openssl
+ shift
+ bin_decrypt=./pegh.static.libsodium
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.static.libsodium'
testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.static.libsodium
+ set +eu
+ '[' '' '!=' 1 ']'
+ echo a
+ ./pegh.libsodium-openssl q5616t8k3pzg
+ ./pegh.static.libsodium -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
encrypting same data with same key should result in different ciphertext
+ echo 'encrypting same data with same key should result in different ciphertext'
++ echo a
++ ./pegh.libsodium-openssl q5616t8k3pzg
+ cmp /dev/fd/63 /dev/fd/62
++ echo a
++ ./pegh.libsodium-openssl q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
encrypting then decrypting with the same key should succeed
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.static.libsodium -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium-openssl -e q5616t8k3pzg
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ + ./pegh.static.libsodium -d -f /tmp/leading_zero_key
./pegh.libsodium-openssl -e + cmp - /tmp/randombytes100
-f /tmp/leading_zero_key
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
encrypting with one key and decrypting with another should fail
+ ./pegh.static.libsodium -d + ./pegh.libsodium-openssl -e q5616t8k3pzg -i /tmp/randombytes100
q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ ./pegh.libsodium-openssl -e -f /tmp/leading_zero_key_a
+ ./pegh.static.libsodium -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium-openssl -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'bad decryption bytes are never output, file should be 0 bytes

+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium-openssl q5616t8k3pzg
+ ./pegh.static.libsodium -d q5616t8k3pzg -o bla.txt
+ cat - ++ echo -n a
/dev/fd/63
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.476s
user	0m3.611s
sys	0m2.454s
+ test ./pegh.libsodium-openssl ./pegh.static.libsodium -v 0
+ bin=./pegh.libsodium-openssl
+ shift
+ bin_decrypt=./pegh.static.libsodium
testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.static.libsodium
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.static.libsodium'
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.libsodium-openssl -v 0 q5616t8k3pzg
+ ./pegh.static.libsodium -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ encrypting same data with same key should result in different ciphertext
set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ++ ./pegh.libsodium-openssl -v 0 q5616t8k3pzg
echo a
++ ./pegh.libsodium-openssl -v 0 q5616t8k3pzg
++ echo a
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium-openssl -e -v 0 q5616t8k3pzg
+ ./pegh.static.libsodium -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.libsodium-openssl -e -v 0 -f /tmp/leading_zero_key
+ ./pegh.static.libsodium -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium-openssl -e -v + 0 q5616t8k3pzg -i /tmp/randombytes100
./pegh.static.libsodium -d q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ ./pegh.libsodium-openssl -e -v 0 -f /tmp/leading_zero_key_a
+ ./pegh.static.libsodium -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium-openssl -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium-openssl -v 0 q5616t8k3pzg
+ ./pegh.static.libsodium -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.505s
user	0m3.725s
sys	0m2.449s
+ test ./pegh.libsodium-openssl ./pegh.static.libsodium -v 1
+ bin=./pegh.libsodium-openssl
+ shift
+ bin_decrypt=./pegh.static.libsodium
+ shift
testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.static.libsodium
+ echo 'testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.static.libsodium'
+ set +eu
+ '[' 1 '!=' 1 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
+ cmp ++ echo a
/dev/fd/63 /dev/fd/62
++ ./pegh.libsodium-openssl -v 1 q5616t8k3pzg
++ echo a
++ ./pegh.libsodium-openssl -v 1 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium-openssl -e -v 1 q5616t8k3pzg
+ ./pegh.static.libsodium -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.static.libsodium -d -f /tmp/leading_zero_key
+ ./pegh.libsodium-openssl -e -v 1 -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium-openssl -e -v 1 q5616t8k3pzg -i /tmp/randombytes100
+ + cmp - /tmp/randombytes100
./pegh.static.libsodium -d q5616t8k3pzg-wrongkey
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium-openssl -e -v 1 -f /tmp/leading_zero_key_a
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium -d -f /tmp/leading_zero_key_b
decryption failed
cmp: EOF on -
+ echo 'large values of N without enough memory should fail'
large values of N without enough memory should fail
+ ./pegh.libsodium-openssl -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium-openssl -v 1 q5616t8k3pzg
+ ./pegh.static.libsodium -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m6.060s
user	0m4.113s
sys	0m2.523s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.libsodium-openssl ./pegh.libsodium
+ bin=./pegh.libsodium-openssl
+ shift
+ bin_decrypt=./pegh.libsodium
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.libsodium'
testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.libsodium
+ set +eu
+ '[' '' '!=' 1 ']'
+ echo a
+ + ./pegh.libsodium -d q5616t8k3pzg
./pegh.libsodium-openssl q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
encrypting same data with same key should result in different ciphertext
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ echo a
++ ./pegh.libsodium-openssl q5616t8k3pzg
++ echo a
++ ./pegh.libsodium-openssl q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium-openssl -e q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium -d q5616t8k3pzg
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.libsodium-openssl -e -f /tmp/leading_zero_key
+ ./pegh.libsodium -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium-openssl -e q5616t8k3pzg -i /tmp/randombytes100
+ ./pegh.libsodium -d q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ ./pegh.libsodium-openssl -e -f /tmp/leading_zero_key_a
+ ./pegh.libsodium -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium-openssl -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
bad decryption bytes are never output, file should be 0 bytes
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium-openssl q5616t8k3pzg
+ ./pegh.libsodium -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.490s
user	0m3.636s
sys	0m2.485s
+ test ./pegh.libsodium-openssl ./pegh.libsodium -v 0
+ bin=./pegh.libsodium-openssl
+ shift
+ bin_decrypt=./pegh.libsodium
+ testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.libsodium
shift
+ echo 'testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.libsodium'
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo + ./pegh.libsodium -d q5616t8k3pzg
a
+ ./pegh.libsodium-openssl -v 0 q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
+ cmp /dev/fd/63 /dev/fd/62
++ echo ++ ./pegh.libsodium-openssl -v 0 q5616t8k3pzg
a
++ ++ echo a
./pegh.libsodium-openssl -v 0 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium-openssl -e -v 0 q5616t8k3pzg
+ ./pegh.libsodium -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.libsodium-openssl -e -v 0 -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium -d -f /tmp/leading_zero_key
+ set +e
+ echo encrypting with one key and decrypting with another should fail
'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium -d q5616t8k3pzg-wrongkey+ cmp - /tmp/randombytes100

+ ./pegh.libsodium-openssl -e -v 0 q5616t8k3pzg -i /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium-openssl -e -v 0 -f /tmp/leading_zero_key_a
+ ./pegh.libsodium -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium-openssl -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
bad decryption bytes are never output, file should be 0 bytes
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium-openssl -v 0 q5616t8k3pzg
+ ./pegh.libsodium -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.285s
user	0m3.586s
sys	0m2.311s
+ test ./pegh.libsodium-openssl ./pegh.libsodium -v 1
+ bin=./pegh.libsodium-openssl
+ shift
+ bin_decrypt=./pegh.libsodium
+ shift
testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.libsodium
+ echo 'testing binaries bin: ./pegh.libsodium-openssl bin_decrypt: ./pegh.libsodium'
+ set +eu
+ '[' 1 '!=' 1 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.libsodium-openssl -v 1 q5616t8k3pzg
++ echo a
++ ./pegh.libsodium-openssl -v 1 q5616t8k3pzg
++ echo a
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
encrypting then decrypting with the same key should succeed
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.libsodium-openssl -e -v 1 q5616t8k3pzg
+ ./pegh.libsodium -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.libsodium-openssl -e -v 1 -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium -d -f /tmp/leading_zero_key
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
encrypting with one key and decrypting with another should fail
+ ./pegh.libsodium-openssl -e -v 1 q5616t8k3pzg -i /tmp/randombytes100
+ ./pegh.libsodium -d q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ ./pegh.libsodium-openssl -e -v 1 -f /tmp/leading_zero_key_a
+ ./pegh.libsodium -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium-openssl -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium-openssl -v 1 q5616t8k3pzg
+ ./pegh.libsodium -d + cat q5616t8k3pzg -o bla.txt- /dev/fd/63

++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.863s
user	0m4.147s
sys	0m2.379s
+ for bin in $TEST_BINS
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.static.libsodium ./pegh.static.openssl
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.static.openssl
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.openssl'
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.openssl
+ set +eu
+ '[' '' '!=' 1 ']'
+ echo a
+ ./pegh.static.libsodium q5616t8k3pzg
+ ./pegh.static.openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
encrypting same data with same key should result in different ciphertext
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.static.libsodium q5616t8k3pzg
++ echo a
++ echo a
++ ./pegh.static.libsodium q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
encrypting then decrypting with the same key should succeed
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.static.libsodium -e q5616t8k3pzg
+ ./pegh.static.openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.static.libsodium -e -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ ./pegh.static.openssl -d -f /tmp/leading_zero_key
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ + ./pegh.static.openssl -d q5616t8k3pzg-wrongkey
./pegh.static.libsodium -e q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.static.libsodium -e -f /tmp/leading_zero_key_a
+ ./pegh.static.openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium q5616t8k3pzg
+ + cat - /dev/fd/63
./pegh.static.openssl -d q5616t8k3pzg -o bla.txt
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m6.114s
user	0m4.303s
sys	0m2.367s
+ test ./pegh.static.libsodium ./pegh.static.openssl -v 0
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.static.openssl
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.openssl'
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.openssl
+ set +eu
+ '[' 0 '!=' 1 ']'
+ + echo a
./pegh.static.libsodium -v 0 q5616t8k3pzg
+ ./pegh.static.openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
+ cmp /dev/fd/63 /dev/fd/62
++ ++ ./pegh.static.libsodium -v 0 q5616t8k3pzg
./pegh.static.libsodium ++ echo a
-v 0 q5616t8k3pzg
++ echo a
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg
+ ./pegh.static.openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.static.libsodium -e -v 0 -f /tmp/leading_zero_key
+ + cmp - /tmp/randombytes100
./pegh.static.openssl -d -f /tmp/leading_zero_key
encrypting with one key and decrypting with another should fail
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
+ ./pegh.static.openssl -d q5616t8k3pzg-wrongkey
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ ./pegh.static.libsodium -e -v 0 -f /tmp/leading_zero_key_a
+ ./pegh.static.openssl -d + -f cmp /tmp/leading_zero_key_b- 
/tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'large values of N without enough memory should fail'
large values of N without enough memory should fail
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium -v 0 q5616t8k3pzg
+ ./pegh.static.openssl + cat - /dev/fd/63
-d q5616t8k3pzg ++ -o bla.txt
echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.979s
user	0m4.281s
sys	0m2.339s
+ test ./pegh.static.libsodium ./pegh.static.openssl -v 1
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.static.openssl
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.openssl'
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.openssl
+ set +eu
+ '[' 1 '!=' 1 ']'
+ set -eu
encrypting same data with same key should result in different ciphertext
+ echo 'encrypting same data with same key should result in different ciphertext'
++ ++ echo a
+ cmp /dev/fd/63 /dev/fd/62
./pegh.static.libsodium -v 1 q5616t8k3pzg
++ echo a
++ ./pegh.static.libsodium -v 1 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.static.libsodium -e -v 1 q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ ./pegh.static.openssl -d q5616t8k3pzg
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.static.openssl -d -f /tmp/leading_zero_key
+ ./pegh.static.libsodium -e -v + cmp - /tmp/randombytes100
1 -f /tmp/leading_zero_key
encrypting with one key and decrypting with another should fail
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.static.libsodium -e -v 1 q5616t8k3pzg -i /tmp/randombytes100
+ ./pegh.static.openssl -d q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.static.libsodium -e -v 1 + ./pegh.static.openssl -d -f /tmp/leading_zero_key_b
-f /tmp/leading_zero_key_a
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium -v 1 q5616t8k3pzg
+ cat - /dev/fd/63
++ echo -n + a
./pegh.static.openssl -d q5616t8k3pzg -o bla.txt
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m6.050s
user	0m4.393s
sys	0m2.271s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.static.libsodium ./pegh.openssl
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.openssl
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.openssl'
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.openssl
+ set +eu
+ '[' '' '!=' 1 ']'
+ echo a
+ ./pegh.static.libsodium q5616t8k3pzg
+ ./pegh.openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ encrypting same data with same key should result in different ciphertext
set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.static.libsodium q5616t8k3pzg
++ echo a
++ echo ++ a
./pegh.static.libsodium q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
encrypting then decrypting with the same key should succeed
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.static.libsodium -e q5616t8k3pzg
+ ./pegh.openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.static.libsodium -e -f /tmp/leading_zero_key
+ ./pegh.openssl -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.static.libsodium -e q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
+ ./pegh.openssl -d q5616t8k3pzg-wrongkey
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.static.libsodium -e -f /tmp/leading_zero_key_a
+ cmp - /tmp/randombytes100
+ ./pegh.openssl -d -f /tmp/leading_zero_key_b
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
bad decryption bytes are never output, file should be 0 bytes
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium q5616t8k3pzg
+ ./pegh.openssl -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63++ echo -n a

decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m6.124s
user	0m4.429s
sys	0m2.344s
+ test ./pegh.static.libsodium ./pegh.openssl -v 0
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.openssl
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.openssl'
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.openssl
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.static.libsodium -v 0 q5616t8k3pzg
+ ./pegh.openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
encrypting same data with same key should result in different ciphertext
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ++ echo a
./pegh.static.libsodium -v 0 q5616t8k3pzg
++ echo a
++ ./pegh.static.libsodium -v 0 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
encrypting then decrypting with the same key should succeed
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg
+ ./pegh.openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.static.libsodium -e -v 0 -f /tmp/leading_zero_key
+ ./pegh.openssl -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ + ./pegh.openssl -d q5616t8k3pzg-wrongkey
./pegh.static.libsodium -e -v 0 q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ ./pegh.static.libsodium -e -v 0 -f /tmp/leading_zero_key_a
+ cmp - /tmp/randombytes100
+ ./pegh.openssl -d -f /tmp/leading_zero_key_b
decryption failed
cmp: EOF on -
+ echo large values of N without enough memory should fail
'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.openssl -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
+ ./pegh.static.libsodium -v 0 q5616t8k3pzg
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.978s
user	0m4.275s
sys	0m2.366s
+ test ./pegh.static.libsodium ./pegh.openssl -v 1
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.openssl
+ shift
+ echo testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.openssl
'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.openssl'
+ set +eu
+ '[' 1 '!=' 1 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.static.libsodium ++ ./pegh.static.libsodium -v 1 q5616t8k3pzg
++ echo a
-v 1 q5616t8k3pzg
++ echo a
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
encrypting then decrypting with the same key should succeed
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.static.libsodium -e -v 1 q5616t8k3pzg
+ ./pegh.openssl -d q5616t8k3pzg+ cmp - /tmp/randombytes100

encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.static.libsodium -e -v 1 -f /tmp/leading_zero_key
+ cmp + ./pegh.openssl -d -f /tmp/leading_zero_key
- /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.static.libsodium -e -v 1 q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
+ ./pegh.openssl -d q5616t8k3pzg-wrongkey
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ ./pegh.static.libsodium -e -v 1 -f /tmp/leading_zero_key_a
+ cmp - /tmp/randombytes100
+ ./pegh.openssl -d -f /tmp/leading_zero_key_b
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'bad decryption bytes are never output, file should be 0 bytes

+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium -v 1 q5616t8k3pzg
+ ./pegh.openssl -d q5616t8k3pzg -o bla.txt
++ echo -n a
+ cat - /dev/fd/63
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m6.062s
user	0m4.307s
sys	0m2.398s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.static.libsodium ./pegh.static.libsodium-openssl
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.static.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium-openssl'
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium-openssl
+ set +eu
+ '[' '' '!=' 1 ']'
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg
+ echo a
+ ./pegh.static.libsodium q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
encrypting same data with same key should result in different ciphertext
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ echo ++ a./pegh.static.libsodium q5616t8k3pzg

++ echo a
++ ./pegh.static.libsodium q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
encrypting then decrypting with the same key should succeed
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium -e q5616t8k3pzg
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.static.libsodium -e -f /tmp/leading_zero_key+ 
./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
encrypting with one key and decrypting with another should fail
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.static.libsodium -e q5616t8k3pzg -i /tmp/randombytes100
+ + ./pegh.static.libsodium-openssl -d q5616t8k3pzg-wrongkey
cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.static.libsodium -e -f /tmp/leading_zero_key_a
+ ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium q5616t8k3pzg
+ cat - /dev/fd/63
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg -o bla.txt
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.347s
user	0m3.651s
sys	0m2.342s
+ test ./pegh.static.libsodium ./pegh.static.libsodium-openssl -v 0
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.static.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium-openssl'
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium-openssl
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.static.libsodium -v 0 q5616t8k3pzg
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
encrypting same data with same key should result in different ciphertext
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ echo a
++ ./pegh.static.libsodium -v 0 q5616t8k3pzg
++ ./pegh.static.libsodium -v 0 q5616t8k3pzg
++ echo a
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
encrypting then decrypting with the same key should succeed
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.static.libsodium -e + ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key
-v 0 -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
+ encrypting with one key and decrypting with another should fail
echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg -i /tmp/randombytes100
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ ./pegh.static.libsodium -e -v 0 -f /tmp/leading_zero_key_a
+ cmp + ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key_b
- /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'large values of N without enough memory should fail'
large values of N without enough memory should fail
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
bad decryption bytes are never output, file should be 0 bytes
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg -o bla.txt
+ ./pegh.static.libsodium -v 0 q5616t8k3pzg
+ cat - ++ /dev/fd/63echo 
-n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.395s
user	0m3.698s
sys	0m2.305s
+ test ./pegh.static.libsodium ./pegh.static.libsodium-openssl -v 1
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.static.libsodium-openssl
+ shift
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium-openssl
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium-openssl'
+ set +eu
+ '[' 1 '!=' 1 ']'
+ set -eu
encrypting same data with same key should result in different ciphertext
+ echo 'encrypting same data with same key should result in different ciphertext'
+ ++ cmp echo /dev/fd/63 a/dev/fd/62

++ ./pegh.static.libsodium -v 1 q5616t8k3pzg
++ ./pegh.static.libsodium -v 1 q5616t8k3pzg
++ echo a
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
encrypting then decrypting with the same key should succeed
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.static.libsodium -e -v 1 q5616t8k3pzg
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.static.libsodium -e -v 1 -f /tmp/leading_zero_key
+ ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
encrypting with one key and decrypting with another should fail
+ ./pegh.static.libsodium -e -v 1 q5616t8k3pzg -i /tmp/randombytes100
+ + ./pegh.static.libsodium-openssl -d q5616t8k3pzg-wrongkey
cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.static.libsodium -e -v 1 -f /tmp/leading_zero_key_a
+ ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium -v 1 q5616t8k3pzg
+ + cat - /dev/fd/63
++ echo -n a
./pegh.static.libsodium-openssl -d q5616t8k3pzg -o bla.txt
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.811s
user	0m4.192s
sys	0m2.242s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.static.libsodium ./pegh.libsodium-openssl
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium-openssl'
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium-openssl
+ set +eu
+ '[' '' '!=' 1 ']'
+ echo a
+ ./pegh.static.libsodium q5616t8k3pzg
+ ./pegh.libsodium-openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
encrypting same data with same key should result in different ciphertext
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.static.libsodium q5616t8k3pzg
++ ./pegh.static.libsodium q5616t8k3pzg
++ echo a
++ echo a
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.static.libsodium -e q5616t8k3pzg
+ ./pegh.libsodium-openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.static.libsodium -e -f /tmp/leading_zero_key
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.static.libsodium -e q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium-openssl -d q5616t8k3pzg-wrongkey
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium -e -f /tmp/leading_zero_key_a
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key_b
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium q5616t8k3pzg
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.314s
user	0m3.633s
sys	0m2.331s
+ test ./pegh.static.libsodium ./pegh.libsodium-openssl -v 0
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium-openssl'
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium-openssl
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.libsodium-openssl -d q5616t8k3pzg
+ ./pegh.static.libsodium -v 0 q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
encrypting same data with same key should result in different ciphertext
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.static.libsodium -v 0 q5616t8k3pzg
++ echo a
++ echo a
++ ./pegh.static.libsodium -v 0 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium-openssl -d q5616t8k3pzg
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.static.libsodium -e -v 0 -f /tmp/leading_zero_key
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg -i /tmp/randombytes100
+ + ./pegh.libsodium-openssl -d q5616t8k3pzg-wrongkey
cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.static.libsodium -e -v 0 -f /tmp/leading_zero_key_a
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
bad decryption bytes are never output, file should be 0 bytes
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium -v 0 q5616t8k3pzg
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.599s
user	0m3.836s
sys	0m2.378s
+ test ./pegh.static.libsodium ./pegh.libsodium-openssl -v 1
+ bin=./pegh.static.libsodium
+ shift
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium-openssl
+ bin_decrypt=./pegh.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium-openssl'
+ set +eu
+ '[' 1 encrypting same data with same key should result in different ciphertext
'!=' 1 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ++ ./pegh.static.libsodium -v 1 q5616t8k3pzg
echo a
++ echo a
++ ./pegh.static.libsodium -v 1 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium-openssl -d q5616t8k3pzg
+ ./pegh.static.libsodium + cmp - /tmp/randombytes100
-e -v 1 q5616t8k3pzg
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.static.libsodium -e -v 1 -f /tmp/leading_zero_key
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
encrypting with one key and decrypting with another should fail
+ + ./pegh.libsodium-openssl -d q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
./pegh.static.libsodium -e -v 1 q5616t8k3pzg -i /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.static.libsodium -e -v 1 -f /tmp/leading_zero_key_a
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'bad decryption bytes are never output, file should be 0 bytes

+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium -v 1 q5616t8k3pzg
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.732s
user	0m4.108s
sys	0m2.283s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.static.libsodium ./pegh.static.libsodium
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.static.libsodium
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium'
+ set +eu
+ '[' '' '!=' 1 ']'
+ ./pegh.static.libsodium q5616t8k3pzg
+ ./pegh.static.libsodium -d q5616t8k3pzg
+ echo a
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ encrypting same data with same key should result in different ciphertext
set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
++ echo a
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.static.libsodium q5616t8k3pzg
++ echo a
++ ./pegh.static.libsodium q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ trueencrypting then decrypting with the same key should succeed

+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.static.libsodium -e q5616t8k3pzg
+ + cmp - /tmp/randombytes100
./pegh.static.libsodium -d q5616t8k3pzg
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.static.libsodium -e -f /tmp/leading_zero_key
+ ./pegh.static.libsodium -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
encrypting with one key and decrypting with another should fail
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.static.libsodium -e q5616t8k3pzg -i /tmp/randombytes100
+ + ./pegh.static.libsodium -d q5616t8k3pzg-wrongkey
cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.static.libsodium -e -f /tmp/leading_zero_key_a
+ ./pegh.static.libsodium -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium q5616t8k3pzg
+ cat - /dev/fd/63
+ ./pegh.static.libsodium -d q5616t8k3pzg -o bla.txt
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.498s
user	0m3.773s
sys	0m2.429s
+ test ./pegh.static.libsodium ./pegh.static.libsodium -v 0
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.static.libsodium
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium'
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo + ./pegh.static.libsodium -v 0 + q5616t8k3pzg./pegh.static.libsodium 
-d q5616t8k3pzg
a
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ encrypting same data with same key should result in different ciphertext
set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.static.libsodium -v 0 q5616t8k3pzg
++ echo a
++ echo a
++ ./pegh.static.libsodium -v 0 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg
+ ./pegh.static.libsodium -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.static.libsodium -e -v 0 -f /tmp/leading_zero_key
+ ./pegh.static.libsodium -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
encrypting with one key and decrypting with another should fail
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg -i /tmp/randombytes100
+ ./pegh.static.libsodium -d q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.static.libsodium -e -v 0 -f /tmp/leading_zero_key_a
+ ./pegh.static.libsodium -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'large values of N without enough memory should fail'
large values of N without enough memory should fail
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'bad decryption bytes are never output, file should be 0 bytes

+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium -v 0 q5616t8k3pzg
+ ./pegh.static.libsodium -d q5616t8k3pzg -o bla.txt
+ ++ echo cat -n a
- /dev/fd/63
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.458s
user	0m3.670s
sys	0m2.433s
+ test ./pegh.static.libsodium ./pegh.static.libsodium -v 1
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.static.libsodium
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium'
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium
+ set +eu
+ '[' 1 '!=' 1 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
++ echo + a
++ ./pegh.static.libsodium -v 1 q5616t8k3pzg
++ echo a
++ ./pegh.static.libsodium -v 1 q5616t8k3pzg
cmp /dev/fd/63 /dev/fd/62
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.static.libsodium -d q5616t8k3pzg
+ ./pegh.static.libsodium -e -v 1 q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.static.libsodium -e -v 1 -f /tmp/leading_zero_key
+ ./pegh.static.libsodium -d -f + cmp - /tmp/randombytes100
/tmp/leading_zero_key
encrypting with one key and decrypting with another should fail
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.static.libsodium + ./pegh.static.libsodium -d q5616t8k3pzg-wrongkey
-e -v 1 q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ ./pegh.static.libsodium -e -v 1 -f /tmp/leading_zero_key_a
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium -d -f /tmp/leading_zero_key_b
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium -v 1 q5616t8k3pzg
+ cat - /dev/fd/63
+ ./pegh.static.libsodium -d q5616t8k3pzg -o bla.txt
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m6.122s
user	0m4.322s
sys	0m2.452s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.static.libsodium ./pegh.libsodium
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.libsodium
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium'
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium
+ set +eu
+ '[' '' '!=' 1 ']'
+ echo a
+ ./pegh.static.libsodium q5616t8k3pzg
+ ./pegh.libsodium -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
encrypting same data with same key should result in different ciphertext
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
++ + echo cmp /dev/fd/63 /dev/fd/62
a
++ ./pegh.static.libsodium q5616t8k3pzg
++ ./pegh.static.libsodium q5616t8k3pzg
++ echo a
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
encrypting then decrypting with the same key should succeed
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.static.libsodium -e q5616t8k3pzg
+ ./pegh.libsodium -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.static.libsodium -e -f /tmp/leading_zero_key
+ ./pegh.libsodium -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.static.libsodium -e q5616t8k3pzg -i /tmp/randombytes100
+ ./pegh.libsodium -d q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.static.libsodium -e -f /tmp/leading_zero_key_a
+ ./pegh.libsodium -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium q5616t8k3pzg
+ cat - /dev/fd/63
+ ./pegh.libsodium -d q5616t8k3pzg -o bla.txt
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.416s
user	0m3.703s
sys	0m2.338s
+ test ./pegh.static.libsodium ./pegh.libsodium -v 0
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.libsodium
+ shift
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium'
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a+ ./pegh.static.libsodium -v 0 q5616t8k3pzg

+ ./pegh.libsodium -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.static.libsodium -v 0 q5616t8k3pzg
++ echo a
++ echo a
++ ./pegh.static.libsodium -v 0 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
encrypting then decrypting with the same key should succeed
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium -d q5616t8k3pzg
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.static.libsodium -e -v 0 -f /tmp/leading_zero_key
+ ./pegh.libsodium -d + -f /tmp/leading_zero_key
cmp - /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100+ ./pegh.libsodium 
-d q5616t8k3pzg-wrongkey
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.static.libsodium + cmp - /tmp/randombytes100
-e -v 0 -f /tmp/leading_zero_key_a
+ ./pegh.libsodium -d -f /tmp/leading_zero_key_b
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
bad decryption bytes are never output, file should be 0 bytes
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
+ echo + ./pegh.static.libsodium -v 0 q5616t8k3pzg
'hopefully this doesnt make it to disk'
+ ./pegh.libsodium -d q5616t8k3pzg -o bla.txt
++ + cat - /dev/fd/63
echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.527s
user	0m3.802s
sys	0m2.400s
+ test ./pegh.static.libsodium ./pegh.libsodium -v 1
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.libsodium
+ shift
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium'
+ set +eu
+ '[' 1 '!=' 1 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
+ cmp /dev/fd/63 /dev/fd/62
++ echo a
++ ./pegh.static.libsodium -v 1 q5616t8k3pzg
++ ./pegh.static.libsodium -v 1 q5616t8k3pzg
++ echo a
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
encrypting then decrypting with the same key should succeed
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.libsodium -d q5616t8k3pzg
+ + ./pegh.static.libsodium -e -v 1 q5616t8k3pzg
cmp - /tmp/randombytes100
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.static.libsodium -e -v 1 -f /tmp/leading_zero_key
+ ./pegh.libsodium -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.static.libsodium + -e ./pegh.libsodium -v -d q5616t8k3pzg-wrongkey1 
q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ ./pegh.static.libsodium -e -v 1 -f /tmp/leading_zero_key_a
+ ./pegh.libsodium -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium -v 1 q5616t8k3pzg
+ cat - /dev/fd/63
+ ./pegh.libsodium -d q5616t8k3pzg -o bla.txt++ echo -n a

decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.775s
user	0m4.071s
sys	0m2.340s
+ for bin in $TEST_BINS
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.libsodium ./pegh.static.openssl
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.static.openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.openssl'
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.openssl
+ set +eu
+ '[' '' '!=' 1 ']'
+ echo a
+ ./pegh.libsodium q5616t8k3pzg
+ ./pegh.static.openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
encrypting same data with same key should result in different ciphertext
+ echo 'encrypting same data with same key should result in different ciphertext'
+ ++ cmp /dev/fd/63 /dev/fd/62
echo a
++ ./pegh.libsodium q5616t8k3pzg
++ ./pegh.libsodium q5616t8k3pzg
++ echo a
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium -e q5616t8k3pzg
+ ./pegh.static.openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.libsodium + ./pegh.static.openssl -d -f /tmp/leading_zero_key
-e -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
+ echo encrypting with one key and decrypting with another should fail
'encrypting with one key and decrypting with another should fail'
+ ./pegh.static.openssl -d q5616t8k3pzg-wrongkey
+ ./pegh.libsodium -e q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium -e -f /tmp/leading_zero_key_a
+ + ./pegh.static.openssl -d -f /tmp/leading_zero_key_b
cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'large values of N without enough memory should fail'
large values of N without enough memory should fail
+ ./pegh.libsodium -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
bad decryption bytes are never output, file should be 0 bytes
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium q5616t8k3pzg
+ cat - /dev/fd/63
++ echo -n a
+ ./pegh.static.openssl -d q5616t8k3pzg -o bla.txt
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m6.019s
user	0m4.403s
sys	0m2.277s
+ test ./pegh.libsodium ./pegh.static.openssl -v 0
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.static.openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.openssl'
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.openssl
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.libsodium + ./pegh.static.openssl -v -d q5616t8k3pzg0 
q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
++ echo a
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.libsodium -v 0 q5616t8k3pzg
++ echo a
++ ./pegh.libsodium -v 0 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
encrypting then decrypting with the same key should succeed
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg
+ ./pegh.static.openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.libsodium -e -v 0 -f /tmp/leading_zero_key
+ ./pegh.static.openssl -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
encrypting with one key and decrypting with another should fail
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
+ ./pegh.static.openssl -d q5616t8k3pzg-wrongkey
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium -e -v 0 -f /tmp/leading_zero_key_a
+ ./pegh.static.openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ + ./pegh.static.openssl -d ./pegh.libsodium q5616t8k3pzg -o bla.txt
-v 0 q5616t8k3pzg
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.976s
user	0m4.174s
sys	0m2.428s
+ test ./pegh.libsodium ./pegh.static.openssl -v 1
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.static.openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.openssl'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.openssl

+ set +eu
+ '[' 1 '!=' 1 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'encrypting same data with same key should result in different ciphertext

+ cmp /dev/fd/63 /dev/fd/62
++ ++ echo a
echo a++ 
./pegh.libsodium -v 1 q5616t8k3pzg
++ ./pegh.libsodium -v 1 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
encrypting then decrypting with the same key should succeed
+ echo 'encrypting then decrypting with the same key should succeed'
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg
+ ./pegh.static.openssl -d q5616t8k3pzg
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.libsodium -e -v 1 -f /tmp/leading_zero_key
+ ./pegh.static.openssl -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
+ echo encrypting with one key and decrypting with another should fail
'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
+ ./pegh.static.openssl -d q5616t8k3pzg-wrongkey
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium -e -v 1 -f + cmp - /tmp/randombytes100
/tmp/leading_zero_key_a
+ ./pegh.static.openssl -d -f /tmp/leading_zero_key_b
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium -v 1 q5616t8k3pzg
+ cat - /dev/fd/63
+ ./pegh.static.openssl -d q5616t8k3pzg -o bla.txt++ echo -n a

decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.951s
user	0m4.281s
sys	0m2.516s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.libsodium ./pegh.openssl
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.openssl'
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.openssl
+ set +eu
+ '[' '' '!=' 1 ']'
+ echo a
+ ./pegh.libsodium q5616t8k3pzg
+ ./pegh.openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
++ echo a
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.libsodium q5616t8k3pzg
++ echo a
++ ./pegh.libsodium q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium -e q5616t8k3pzg
+ ./pegh.openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.libsodium -e -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ ./pegh.openssl -d -f /tmp/leading_zero_key
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium -e q5616t8k3pzg -i /tmp/randombytes100
+ ./pegh.openssl -d q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium -e -f /tmp/leading_zero_key_a
+ ./pegh.openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'large values of N without enough memory should fail'
large values of N without enough memory should fail
+ ./pegh.libsodium -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium q5616t8k3pzg
+ cat ++ echo -n a
+ ./pegh.openssl -d q5616t8k3pzg -o bla.txt
- /dev/fd/63
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.930s
user	0m4.223s
sys	0m2.327s
+ test ./pegh.libsodium ./pegh.openssl -v 0
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.openssl'
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.openssl
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.libsodium -v 0 q5616t8k3pzg
+ ./pegh.openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
++ echo a+ ++ ./pegh.libsodium -v 0 q5616t8k3pzg
cmp /dev/fd/63 /dev/fd/62

++ echo a
++ ./pegh.libsodium -v 0 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
encrypting then decrypting with the same key should succeed
+ echo 'encrypting then decrypting with the same key should succeed'
+ + ./pegh.openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
./pegh.libsodium -e -v 0 q5616t8k3pzg
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.libsodium -e -v 0 -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ ./pegh.openssl -d -f /tmp/leading_zero_key
+ set +e
+ echo encrypting with one key and decrypting with another should fail
'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
+ ./pegh.openssl -d q5616t8k3pzg-wrongkey
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium -e -v 0 -f /tmp/leading_zero_key_a
+ ./pegh.openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
bad decryption bytes are never output, file should be 0 bytes
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium -v 0 q5616t8k3pzg
+ ./pegh.openssl -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m6.249s
user	0m4.380s
sys	0m2.505s
+ test ./pegh.libsodium ./pegh.openssl -v 1
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.openssl
+ shift
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.openssl
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.openssl'
+ set +eu
+ '[' 1 '!=' 1 ']'
encrypting same data with same key should result in different ciphertext
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.libsodium -v 1 q5616t8k3pzg
++ ++ echo a
echo a
++ ./pegh.libsodium -v 1 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
encrypting then decrypting with the same key should succeed
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.openssl -d q5616t8k3pzg
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.libsodium -e -v 1 -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ ./pegh.openssl -d -f /tmp/leading_zero_key
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
encrypting with one key and decrypting with another should fail
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
+ ./pegh.openssl -d q5616t8k3pzg-wrongkey
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ + ./pegh.openssl -d -f /tmp/leading_zero_key_b
+ ./pegh.libsodium -e -v 1 -f /tmp/leading_zero_key_a
cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'large values of N without enough memory should fail'
large values of N without enough memory should fail
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'bad decryption bytes are never output, file should be 0 bytes

+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium -v 1 q5616t8k3pzg
+ cat - /dev/fd/63
++ echo -n a
+ ./pegh.openssl -d q5616t8k3pzg -o bla.txt
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m6.302s
user	0m4.531s
sys	0m2.404s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.libsodium ./pegh.static.libsodium-openssl
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.static.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.libsodium-openssl'
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.libsodium-openssl
+ set +eu
+ '[' '' '!=' 1 ']'
+ echo a
+ ./pegh.libsodium q5616t8k3pzg
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
++ + ./pegh.libsodium q5616t8k3pzg
cmp /dev/fd/63 /dev/fd/62
++ echo a
++ ./pegh.libsodium q5616t8k3pzg
++ echo a
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium -e q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.libsodium -e -f /tmp/leading_zero_key
+ ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
encrypting with one key and decrypting with another should fail
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
+ + ./pegh.libsodium -e q5616t8k3pzg ./pegh.static.libsodium-openssl -i /tmp/randombytes100-d 
q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium -e -f /tmp/leading_zero_key_a
+ ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium q5616t8k3pzg
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.585s
user	0m3.817s
sys	0m2.401s
+ test ./pegh.libsodium ./pegh.static.libsodium-openssl -v 0
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.static.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.libsodium-openssl'
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.libsodium-openssl
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.libsodium -v 0 q5616t8k3pzg
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
+ cmp /dev/fd/63 /dev/fd/62
++ ++ ./pegh.libsodium -v 0 q5616t8k3pzg
echo a
++ ++ echo a
./pegh.libsodium -v 0 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
encrypting then decrypting with the same key should succeed
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ + ./pegh.libsodium cmp - /tmp/randombytes100
+ ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key
-e -v 0 -f /tmp/leading_zero_key
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
encrypting with one key and decrypting with another should fail
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg-wrongkey
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium -e -v 0 -f /tmp/leading_zero_key_a
+ ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
bad decryption bytes are never output, file should be 0 bytes
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium -v 0 q5616t8k3pzg
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.447s
user	0m3.681s
sys	0m2.374s
+ test ./pegh.libsodium ./pegh.static.libsodium-openssl -v 1
+ bin=./pegh.libsodium
+ shift
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.libsodium-openssl
+ bin_decrypt=./pegh.static.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.libsodium-openssl'
+ set +eu
+ '[' 1 '!=' 1 ']'
+ encrypting same data with same key should result in different ciphertext
set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
++ echo + cmp /dev/fd/63 /dev/fd/62
a++ ./pegh.libsodium -v 1 q5616t8k3pzg

++ echo a
++ ./pegh.libsodium -v 1 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.libsodium -e -v 1 -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg -i /tmp/randombytes100
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium -e -v 1 -f /tmp/leading_zero_key_a
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium-openssl -d -f /tmp/leading_zero_key_b
decryption failed
cmp: EOF on -
+ echo 'large values of N without enough memory should fail'
large values of N without enough memory should fail
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium -v 1 q5616t8k3pzg
+ ./pegh.static.libsodium-openssl -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.763s
user	0m4.045s
sys	0m2.343s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.libsodium ./pegh.libsodium-openssl
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.libsodium-openssl'
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.libsodium-openssl
+ set +eu
+ '[' '' '!=' 1 ']'
+ echo a
+ ./pegh.libsodium q5616t8k3pzg
+ ./pegh.libsodium-openssl -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
++ echo a
++ + ./pegh.libsodium q5616t8k3pzg
cmp /dev/fd/63 ++ echo a
/dev/fd/62++ ./pegh.libsodium q5616t8k3pzg

/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
encrypting then decrypting with the same key should succeed
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.libsodium-openssl -d q5616t8k3pzg
+ ./pegh.libsodium -e q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.libsodium -e -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
encrypting with one key and decrypting with another should fail
+ ./pegh.libsodium -e q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium-openssl -d q5616t8k3pzg-wrongkey
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ + ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key_b
./pegh.libsodium + cmp - /tmp/randombytes100
-e -f /tmp/leading_zero_key_a
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
bad decryption bytes are never output, file should be 0 bytes
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -o bla.txt
+ + echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium q5616t8k3pzg
cat - ++ echo -n a
/dev/fd/63
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.564s
user	0m3.838s
sys	0m2.370s
+ test ./pegh.libsodium ./pegh.libsodium-openssl -v 0
+ bin=./pegh.libsodium
+ shift
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.libsodium-openssl
+ bin_decrypt=./pegh.libsodium-openssl
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.libsodium-openssl'
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.libsodium-openssl -d q5616t8k3pzg
+ ./pegh.libsodium -v 0 q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
++ + ./pegh.libsodium cmp /dev/fd/63 /dev/fd/62
-v 0 q5616t8k3pzg
++ echo a
++ echo a
++ ./pegh.libsodium -v 0 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium-openssl -d q5616t8k3pzg
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.libsodium -e -v 0 -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
encrypting with one key and decrypting with another should fail
+ + ./pegh.libsodium -e -v 0 q5616t8k3pzg -i /tmp/randombytes100
./pegh.libsodium-openssl -d q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium -e -v 0 -f /tmp/leading_zero_key_a
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key_b
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium -v 0 q5616t8k3pzg
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.213s
user	0m3.715s
sys	0m2.366s
+ test ./pegh.libsodium ./pegh.libsodium-openssl -v 1
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.libsodium-openssl
+ shift
+ testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.libsodium-openssl
echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.libsodium-openssl'
+ set +eu
+ '[' 1 '!=' 1 ']'
+ set -eu
encrypting same data with same key should result in different ciphertext
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ++ ./pegh.libsodium -v 1 q5616t8k3pzg
echo a
++ echo a
++ ./pegh.libsodium -v 1 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg
+ ./pegh.libsodium-openssl -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.libsodium -e -v 1 -f /tmp/leading_zero_key
+ ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium-openssl -d q5616t8k3pzg-wrongkey
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ ./pegh.libsodium -e -v 1 + ./pegh.libsodium-openssl -d -f /tmp/leading_zero_key_b
-f /tmp/leading_zero_key_a
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium-openssl -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'bad decryption bytes are never output, file should be 0 bytes

+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium -v 1 q5616t8k3pzg
+ + cat - /dev/fd/63
./pegh.libsodium-openssl -d q5616t8k3pzg -o bla.txt
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.803s
user	0m4.215s
sys	0m2.221s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.libsodium ./pegh.static.libsodium
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.static.libsodium
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.libsodium'
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.libsodium
+ set +eu
+ '[' '' '!=' 1 ']'
+ echo a
+ ./pegh.static.libsodium -d q5616t8k3pzg
+ ./pegh.libsodium q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
encrypting same data with same key should result in different ciphertext
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.libsodium q5616t8k3pzg
++ ++ echo a
echo a
++ ./pegh.libsodium q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
encrypting then decrypting with the same key should succeed
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.static.libsodium -d q5616t8k3pzg
+ ./pegh.libsodium -e q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.libsodium -e -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium -d -f /tmp/leading_zero_key
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium -e q5616t8k3pzg -i /tmp/randombytes100
+ + ./pegh.static.libsodium -d q5616t8k3pzg-wrongkey
cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium -e -f /tmp/leading_zero_key_a
+ ./pegh.static.libsodium -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'large values of N without enough memory should fail'
large values of N without enough memory should fail
+ ./pegh.libsodium -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
bad decryption bytes are never output, file should be 0 bytes
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium q5616t8k3pzg
+ ./pegh.static.libsodium -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.503s
user	0m3.796s
sys	0m2.402s
+ test ./pegh.libsodium ./pegh.static.libsodium -v 0
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.static.libsodium
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.libsodium'
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.libsodium
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.static.libsodium -d q5616t8k3pzg
+ ./pegh.libsodium -v 0 q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
encrypting same data with same key should result in different ciphertext
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.libsodium -v 0 q5616t8k3pzg
++ echo a
++ echo a
++ ./pegh.libsodium -v 0 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg
+ ./pegh.static.libsodium -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.libsodium + cmp - /tmp/randombytes100
+ ./pegh.static.libsodium -d -f /tmp/leading_zero_key
-e -v 0 -f /tmp/leading_zero_key
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg -i /tmp/randombytes100
+ ./pegh.static.libsodium + -d cmp q5616t8k3pzg-wrongkey- 
/tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium -e -v 0 + ./pegh.static.libsodium -d -f /tmp/leading_zero_key_b
-f /tmp/leading_zero_key_a
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
bad decryption bytes are never output, file should be 0 bytes
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium -v 0 q5616t8k3pzg
+ ./pegh.static.libsodium -d q5616t8k3pzg -o bla.txt
++ echo -n a
+ cat - /dev/fd/63
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.472s
user	0m3.730s
sys	0m2.382s
+ test ./pegh.libsodium ./pegh.static.libsodium -v 1
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.static.libsodium
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.libsodium'
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.libsodium
+ set +eu
+ '[' 1 '!=' 1 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
+ cmp /dev/fd/63 /dev/fd/62
++ echo a
++ echo a
++ ./pegh.libsodium -v 1 q5616t8k3pzg
++ ./pegh.libsodium -v 1 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg
+ ./pegh.static.libsodium -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.libsodium -e -v 1 -f /tmp/leading_zero_key
+ ./pegh.static.libsodium -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
encrypting with one key and decrypting with another should fail
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium -e -v + ./pegh.static.libsodium -d q5616t8k3pzg-wrongkey
1 q5616t8k3pzg -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.libsodium -e -v 1 -f /tmp/leading_zero_key_a
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium -d -f /tmp/leading_zero_key_b
decryption failed
cmp: EOF on -
+ echo 'large values of N without enough memory should fail'
large values of N without enough memory should fail
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium -v + cat - /dev/fd/63
1 q5616t8k3pzg
+ ./pegh.static.libsodium -d q5616t8k3pzg -o bla.txt
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.835s
user	0m4.217s
sys	0m2.272s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.libsodium ./pegh.libsodium
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.libsodium
+ shift
+ echo testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.libsodium
'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.libsodium'
+ set +eu
+ '[' '' '!=' 1 ']'
+ echo a
+ ./pegh.libsodium q5616t8k3pzg
+ ./pegh.libsodium -d q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
encrypting same data with same key should result in different ciphertext
++ echo a
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.libsodium q5616t8k3pzg
++ ./pegh.libsodium q5616t8k3pzg
++ echo a
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium -e q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium -d q5616t8k3pzg
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.libsodium -e -f /tmp/leading_zero_key
+ ./pegh.libsodium -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
encrypting with one key and decrypting with another should fail
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
+ ./pegh.libsodium -e q5616t8k3pzg -i /tmp/randombytes100
+ ./pegh.libsodium -d q5616t8k3pzg-wrongkey
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo encrypting/decrypting with key in file where last byte is different should fail
'encrypting/decrypting with key in file where last byte is different should fail'
+ ./pegh.libsodium -e -f /tmp/leading_zero_key_a
+ ./pegh.libsodium -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'large values of N without enough memory should fail'
large values of N without enough memory should fail
+ ./pegh.libsodium -e q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ ./pegh.libsodium q5616t8k3pzg
+ ./pegh.libsodium -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
+ echo 'hopefully this doesnt make it to disk'
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.417s
user	0m3.663s
sys	0m2.377s
+ test ./pegh.libsodium ./pegh.libsodium -v 0
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.libsodium
+ shift
+ echo testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.libsodium
'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.libsodium'
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a
+ + ./pegh.libsodium -d q5616t8k3pzg
./pegh.libsodium -v 0 q5616t8k3pzg
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ encrypting same data with same key should result in different ciphertext
set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ++ ./pegh.libsodium -v 0 q5616t8k3pzg
++ ./pegh.libsodium -v 0 q5616t8k3pzg
echo a++ echo a

/dev/fd/63 /dev/fd/62 differ: char 12, line 1
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
encrypting then decrypting with the same key should succeed
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium -d q5616t8k3pzg
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ ./pegh.libsodium -e -v 0 -f /tmp/leading_zero_key
+ ./pegh.libsodium -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
encrypting with one key and decrypting with another should fail
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium -d q5616t8k3pzg-wrongkey
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg -i /tmp/randombytes100
decryption failed
cmp: EOF on -
encrypting/decrypting with key in file where last byte is different should fail
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ + ./pegh.libsodium -d -f ./pegh.libsodium /tmp/leading_zero_key_b
-e -v 0 -f /tmp/leading_zero_key_a
+ cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium -e -v 0 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ ./pegh.libsodium -v 0 q5616t8k3pzg
+ ./pegh.libsodium -d q5616t8k3pzg -o bla.txt
+ echo 'hopefully this doesnt make it to disk'
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m5.379s
user	0m3.717s
sys	0m2.329s
+ test ./pegh.libsodium ./pegh.libsodium -v 1
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.libsodium
+ shift
+ echo testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.libsodium
'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.libsodium'
+ set +eu
+ '[' 1 '!=' 1 ']'
+ set -eu
encrypting same data with same key should result in different ciphertext
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ./pegh.libsodium -v 1 q5616t8k3pzg
++ echo a
++ echo a
++ ./pegh.libsodium -v 1 q5616t8k3pzg
/dev/fd/63 /dev/fd/62 differ: char 12, line 1
encrypting then decrypting with the same key should succeed
+ true
+ echo 'encrypting then decrypting with the same key should succeed'
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg
+ ./pegh.libsodium -d q5616t8k3pzg
+ cmp - /tmp/randombytes100
encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline
+ echo 'encrypting/decrypting with key in file should work, even when key has leading 0s and a trailing newline'
+ ./pegh.libsodium -e -v 1 -f /tmp/leading_zero_key
+ ./pegh.libsodium -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ set +e
+ echo 'encrypting with one key and decrypting with another should fail'
encrypting with one key and decrypting with another should fail
+ + cmp - /tmp/randombytes100
./pegh.libsodium + ./pegh.libsodium -d q5616t8k3pzg-wrongkey
-e -v 1 q5616t8k3pzg -i /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
encrypting/decrypting with key in file where last byte is different should fail
+ + ./pegh.libsodium -d -f /tmp/leading_zero_key_b
./pegh.libsodium -e -v 1 + -f /tmp/leading_zero_key_a
cmp - /tmp/randombytes100
decryption failed
cmp: EOF on -
large values of N without enough memory should fail
+ echo 'large values of N without enough memory should fail'
+ ./pegh.libsodium -e -v 1 q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium -d q5616t8k3pzg -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 155, we only support version 0 (AES-256-GCM) and 1 (Chacha20-Poly1305)
Error: decryption aborting, this file cannot be decrypted with this version/CPU
+ echo 'bad decryption bytes are never output, file should be 0 bytes'
bad decryption bytes are never output, file should be 0 bytes
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium -v 1 q5616t8k3pzg
+ ./pegh.libsodium -d q5616t8k3pzg -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e

real	0m6.062s
user	0m4.228s
sys	0m2.461s
+ echo successful test run!
'successful test run!'
+ echo 'successfully built and tested static pegh against libsodium and openssl!'
successfully built and tested static pegh against libsodium and openssl!
+ mkdir -p release
+ mv pegh.static.libsodium ./release/pegh-linux-amd64-libsodium
+ '[' amd64 '==' aarch64 ]
+ mv pegh.static.openssl ./release/pegh-linux-amd64-openssl
+ mv pegh.static.libsodium-openssl ./release/pegh-linux-amd64-libsodium-openssl
+ '[' amd64 '==' amd64 ]
+ apk add git
(1/9) Installing ca-certificates (20230506-r0)
(2/9) Installing brotli-libs (1.0.9-r14)
(3/9) Installing libunistring (1.1-r1)
(4/9) Installing libidn2 (2.3.4-r1)
(5/9) Installing nghttp2-libs (1.55.1-r0)
(6/9) Installing libcurl (8.2.1-r0)
(7/9) Installing libexpat (2.5.0-r1)
(8/9) Installing pcre2 (10.42-r1)
(9/9) Installing git (2.40.1-r0)
Executing busybox-1.36.1-r2.trigger
Executing ca-certificates-20230506-r0.trigger
OK: 526 MiB in 62 packages
+ git archive HEAD -9 --format zip -o ./release/pegh-source.zip
+ git archive HEAD -9 --format tar.gz -o ./release/pegh-source.tar.gz
+ '[' amd64 '==' amd64 ]
going to try to build windows here...
+ echo 'going to try to build windows here...'
+ apk add mingw-w64-gcc curl wine
(1/77) Installing curl (8.2.1-r0)
(2/77) Installing mingw-w64-binutils (2.40-r1)
(3/77) Installing mingw-w64-crt (11.0.0-r0)
(4/77) Installing mingw-w64-headers (11.0.0-r0)
(5/77) Installing mingw-w64-winpthreads (11.0.0-r0)
(6/77) Installing mingw-w64-gcc (12.2.0-r3)
(7/77) Installing libxau (1.0.11-r2)
(8/77) Installing libmd (1.0.4-r2)
(9/77) Installing libbsd (0.11.7-r1)
(10/77) Installing libxdmcp (1.1.4-r2)
(11/77) Installing libxcb (1.15-r1)
(12/77) Installing libx11 (1.8.4-r4)
(13/77) Installing libxext (1.3.5-r2)
(14/77) Installing libxi (1.8.1-r0)
(15/77) Installing libxrender (0.9.11-r3)
(16/77) Installing libxrandr (1.5.3-r2)
(17/77) Installing opencl (2023.04.17-r1)
(18/77) Installing alsa-lib (1.2.9-r1)
(19/77) Installing libintl (0.21.1-r7)
(20/77) Installing libblkid (2.38.1-r8)
(21/77) Installing libmount (2.38.1-r8)
(22/77) Installing glib (2.76.4-r0)
(23/77) Installing libexif (0.6.24-r1)
(24/77) Installing libjpeg-turbo (2.1.5.1-r3)
(25/77) Installing libltdl (2.4.7-r2)
(26/77) Installing libusb (1.0.26-r2)
(27/77) Installing libgphoto2 (2.5.30-r0)
Executing libgphoto2-2.5.30-r0.pre-install
(28/77) Installing mesa (23.0.4-r0)
(29/77) Installing hwdata-pci (0.370-r0)
(30/77) Installing libpciaccess (0.17-r2)
(31/77) Installing libdrm (2.4.115-r4)
(32/77) Installing wayland-libs-server (1.22.0-r2)
(33/77) Installing mesa-gbm (23.0.4-r0)
(34/77) Installing mesa-glapi (23.0.4-r0)
(35/77) Installing wayland-libs-client (1.22.0-r2)
(36/77) Installing libxshmfence (1.3.2-r2)
(37/77) Installing mesa-egl (23.0.4-r0)
(38/77) Installing libxfixes (6.0.1-r2)
(39/77) Installing libxxf86vm (1.1.5-r3)
(40/77) Installing mesa-gl (23.0.4-r0)
(41/77) Installing libxv (1.0.12-r3)
(42/77) Installing libbz2 (1.0.8-r5)
(43/77) Installing libpng (1.6.39-r3)
(44/77) Installing freetype (2.13.0-r5)
(45/77) Installing fontconfig (2.14.2-r3)
(46/77) Installing pixman (0.42.2-r1)
(47/77) Installing cairo (1.17.8-r1)
(48/77) Installing cdparanoia-libs (10.2-r14)
(49/77) Installing graphene (1.10.8-r2)
(50/77) Installing libcap2 (2.69-r0)
(51/77) Installing gstreamer (1.22.5-r0)
(52/77) Installing libogg (1.3.5-r4)
(53/77) Installing opus (1.4-r0)
(54/77) Installing orc (0.4.34-r0)
(55/77) Installing libxft (2.3.8-r1)
(56/77) Installing fribidi (1.0.13-r0)
(57/77) Installing graphite2 (1.3.14-r5)
(58/77) Installing harfbuzz (7.3.0-r0)
(59/77) Installing pango (1.50.14-r1)
(60/77) Installing libtheora (1.1.1-r17)
(61/77) Installing libvorbis (1.3.7-r1)
(62/77) Installing wayland-libs-cursor (1.22.0-r2)
(63/77) Installing wayland-libs-egl (1.22.0-r2)
(64/77) Installing gst-plugins-base (1.22.5-r0)
(65/77) Installing libpcap (1.10.4-r1)
(66/77) Installing pcsc-lite-libs (1.9.9-r3)
(67/77) Installing libasyncns (0.8-r1)
(68/77) Installing dbus-libs (1.14.8-r0)
(69/77) Installing flac-libs (1.4.3-r0)
(70/77) Installing libsndfile (1.2.0-r2)
(71/77) Installing soxr (0.1.3-r5)
(72/77) Installing speexdsp (1.2.1-r1)
(73/77) Installing tdb-libs (1.4.8-r1)
(74/77) Installing libpulse (16.1-r10)
(75/77) Installing sane (1.1.1-r2)
Executing sane-1.1.1-r2.pre-install
(76/77) Installing eudev-libs (3.2.11-r8)
(77/77) Installing wine (8.13-r0)
Executing busybox-1.36.1-r2.trigger
Executing glib-2.76.4-r0.trigger
OK: 1304 MiB in 139 packages
+ pwd
+ STATIC_LIB_DIR=/tmp
+ LIBSODIUM_VERSION=1.0.18
+ OPENSSL_VERSION=1.1.1h_3
+ OPENSSL_CURL_VERSION=7.73.0_3
+ '[' '!' -d /tmp/libsodium-win32 ]
+ curl -L -O https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-mingw.tar.gz -O https://curl.se/windows/dl-7.73.0_3/openssl-1.1.1h_3-win64-mingw.zip -O https://curl.se/windows/dl-7.73.0_3/openssl-1.1.1h_3-win32-mingw.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 1013k  100 1013k    0     0  3700k      0 --:--:-- --:--:-- --:--:-- 3713k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  6156  100  6156    0     0  70170      0 --:--:-- --:--:-- --:--:-- 70758
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  6156  100  6156    0     0   189k      0 --:--:-- --:--:-- --:--:--  193k
+ echo 'e499c65b1c511cbc6700e436deb3771c3baa737981114c9e9f85f2ec90176861  libsodium-1.0.18-mingw.tar.gz'
+ echo 'fcaa181d848ac56150f00bc46d204d81fde4448a9afe9ef3ca04cc21d3132cb4  openssl-1.1.1h_3-win32-mingw.zip'
+ echo '913ddfa264ed9bae51f9deaa8ebce9d9450fa89fdf4c74ab41a6dfffb5880c67  openssl-1.1.1h_3-win64-mingw.zip'
+ sha256sum -c libs.sha256
libsodium-1.0.18-mingw.tar.gz: OK
openssl-1.1.1h_3-win32-mingw.zip: FAILED
openssl-1.1.1h_3-win64-mingw.zip: FAILED
sha256sum: WARNING: 2 of 3 computed checksums did NOT match
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Email)
[Pipeline] step
Sending e-mails to: admin.jenkins@moparisthebest.com
[Pipeline] }
[Pipeline] // stage
[Pipeline] sh
+ ./bin/build.sh docker-chown
./bin/build.sh: line 8: shift: shift count out of range
+ '[' docker-chown == docker-chown ']'
+ '[' 0 -eq 0 ']'
+ exit 0
[Pipeline] deleteDir
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
[Gitea] Notifying branch build status: FAILURE There was a failure building this commit
[Gitea] Notified
Finished: FAILURE