+ ./pegh.static.libsodium 6gjuvi5vjcho
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m22.913s
user 0m21.496s
sys 0m3.398s
+ test ./pegh.static.libsodium ./pegh.openssl -v 0
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.openssl
+ shift
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.openssl
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.openssl'
+ set +eu
+ '[' 0 '!=' 1 ']'
+ ./pegh.openssl -d 6gjuvi5vjcho
+ ./pegh.static.libsodium -v 0 6gjuvi5vjcho
+ echo a
Error: libsodium does not support AES-256-GCM on this CPU, compile/use openssl version?
usage: pegh [options...] password
password: minimum required length is 12
-e encrypt input to output, default mode
-d decrypt input to output
-i <filename> file to use for input, - means stdin, default stdin
-o <filename> file to use for output, - means stdout, default stdout
-a append to -o instead of truncate
-v pegh file format version to output,
either 0 (AES-256-GCM) or 1 (Chacha20-Poly1305),
default: 0 if AES is hardware accelerated, 1 otherwise
-c <mb> chunk size for encryption, while decrypting/encrypting twice
this ram will be used, the same amount will be needed for
decryption as encryption. This value is saved in the file
format, so decryption will fail if this isn't set high enough,
these are only allocated after scrypt is finished so max usage
will be the highest of these only, not both combined,
max: 65535 (AES-256-GCM) or 262143 (Chacha20-Poly1305),
default: 32
-m <max_mb> maximum megabytes of ram to use when deriving key from password
with scrypt, applies for encryption AND decryption, must
almost linearly scale with -N, if too low operation will fail,
default: 64
-f <filename> read password from file instead of argument, - means stdin
-g prompt for password, confirm on encryption, max characters: 64
-N <num> scrypt parameter N, only applies for encryption, default 32768
this is rounded up to the next highest power of 2
-r <num> scrypt parameter r, only applies for encryption, default 8
-p <num> scrypt parameter p, only applies for encryption, default 1
-s <num> multiplication factor to apply to both -N and -m for easy
work scaling, rounded up to the next highest power of 2,
BEWARE: -s 32 requires 2G ram, -s 64 requires 4G and so on,
default: 1
-h print this usage text
-q do not print error output to stderr
-V show version number and format version support then quit
For additional info on scrypt params refer to:
https://blog.filippo.io/the-scrypt-parameters/https://tools.ietf.org/html/rfc7914#section-2
File too small for decryption, invalid header?
+ '[' 19 -eq 19 -o 1 -eq 19 ']'
+ set -eu
+ echo 'skipping this test because libsodium doesn'\''t support AES on this CPU'
+ return 0
skipping this test because libsodium doesn't support AES on this CPU
real 0m0.026s
user 0m0.018s
sys 0m0.027s
+ 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'
+ set +eu
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.openssl
+ '[' 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 -v 1 6gjuvi5vjcho
++ ./pegh.static.libsodium -v 1 6gjuvi5vjcho
++ 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 -v 1 6gjuvi5vjcho
+ ./pegh.openssl -d 6gjuvi5vjcho
+ 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.openssl -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium -e -v 1 -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 -e -v 1 6gjuvi5vjcho -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
+ ./pegh.openssl -d 6gjuvi5vjcho-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 -v 1 -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.static.libsodium -e -v 1 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.openssl -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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 6gjuvi5vjcho
+ cat - /dev/fd/63
+ ./pegh.openssl -d 6gjuvi5vjcho -o bla.txt
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m22.762s
user 0m21.568s
sys 0m3.405s
+ 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'
+ set +eu
+ '[' '' '!=' 1 ']'
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium-openssl
+ echo a
+ ./pegh.static.libsodium-openssl -d 6gjuvi5vjcho
+ ./pegh.static.libsodium 6gjuvi5vjcho
encrypting same data with same key should result in different ciphertext
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
+ cmp /dev/fd/63 /dev/fd/62
++ ++ ./pegh.static.libsodium 6gjuvi5vjcho
echo a
++ echo a
++ ./pegh.static.libsodium 6gjuvi5vjcho
/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'
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium -e 6gjuvi5vjcho
+ ./pegh.static.libsodium-openssl -d 6gjuvi5vjcho
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
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium-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 + ./pegh.static.libsodium-openssl -d 6gjuvi5vjcho-wrongkey
-e 6gjuvi5vjcho -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
+ cmp - /tmp/randombytes100
+ ./pegh.static.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 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium-openssl -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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.static.libsodium 6gjuvi5vjcho
+ echo 'hopefully this doesnt make it to disk'
+ cat - /dev/fd/63
+ ++ echo -n a
./pegh.static.libsodium-openssl -d 6gjuvi5vjcho -o bla.txt
decryption failed
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium-openssl
+ '[' -s bla.txt ']'
+ set -e
real 0m23.655s
user 0m21.502s
sys 0m3.632s
+ 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'
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.static.libsodium -v 0 6gjuvi5vjcho
+ ./pegh.static.libsodium-openssl -d 6gjuvi5vjcho
Error: libsodium does not support AES-256-GCM on this CPU, compile/use openssl version?
usage: pegh [options...] password
password: minimum required length is 12
-e encrypt input to output, default mode
-d decrypt input to output
-i <filename> file to use for input, - means stdin, default stdin
-o <filename> file to use for output, - means stdout, default stdout
-a append to -o instead of truncate
-v pegh file format version to output,
either 0 (AES-256-GCM) or 1 (Chacha20-Poly1305),
default: 0 if AES is hardware accelerated, 1 otherwise
-c <mb> chunk size for encryption, while decrypting/encrypting twice
this ram will be used, the same amount will be needed for
decryption as encryption. This value is saved in the file
format, so decryption will fail if this isn't set high enough,
these are only allocated after scrypt is finished so max usage
will be the highest of these only, not both combined,
max: 65535 (AES-256-GCM) or 262143 (Chacha20-Poly1305),
default: 32
-m <max_mb> maximum megabytes of ram to use when deriving key from password
with scrypt, applies for encryption AND decryption, must
almost linearly scale with -N, if too low operation will fail,
default: 64
-f <filename> read password from file instead of argument, - means stdin
-g prompt for password, confirm on encryption, max characters: 64
-N <num> scrypt parameter N, only applies for encryption, default 32768
this is rounded up to the next highest power of 2
-r <num> scrypt parameter r, only applies for encryption, default 8
-p <num> scrypt parameter p, only applies for encryption, default 1
-s <num> multiplication factor to apply to both -N and -m for easy
work scaling, rounded up to the next highest power of 2,
BEWARE: -s 32 requires 2G ram, -s 64 requires 4G and so on,
default: 1
-h print this usage text
-q do not print error output to stderr
-V show version number and format version support then quit
For additional info on scrypt params refer to:
https://blog.filippo.io/the-scrypt-parameters/https://tools.ietf.org/html/rfc7914#section-2
File too small for decryption, invalid header?
+ '[' 19 -eq 19 -o 1 -eq 19 ']'
+ set -eu
skipping this test because libsodium doesn't support AES on this CPU
+ echo 'skipping this test because libsodium doesn'\''t support AES on this CPU'
+ return 0
real 0m0.027s
user 0m0.022s
sys 0m0.019s
+ test ./pegh.static.libsodium ./pegh.static.libsodium-openssl -v 1
+ 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 '!=' 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
++ echo a
++ ./pegh.static.libsodium -v 1 6gjuvi5vjcho
++ echo a
++ ./pegh.static.libsodium -v 1 6gjuvi5vjcho
/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 1 6gjuvi5vjcho+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium-openssl -d 6gjuvi5vjcho
+ 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
+ cmp - /tmp/randombytes100
+ ./pegh.static.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.static.libsodium-openssl -d 6gjuvi5vjcho-wrongkey
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium -e -v 1 6gjuvi5vjcho -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.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 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium-openssl -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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 6gjuvi5vjcho
+ ./pegh.static.libsodium-openssl -d 6gjuvi5vjcho -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m22.826s
user 0m21.275s
sys 0m3.353s
+ 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.libsodium-openssl -d 6gjuvi5vjcho
+ ./pegh.static.libsodium 6gjuvi5vjcho
+ '[' 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 6gjuvi5vjcho
++ ./pegh.static.libsodium 6gjuvi5vjcho
++ echo a++ 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'
+ + cmp - /tmp/randombytes100
./pegh.libsodium-openssl -d 6gjuvi5vjcho
+ ./pegh.static.libsodium -e 6gjuvi5vjcho
+ 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
+ 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 6gjuvi5vjcho -i /tmp/randombytes100
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho-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-openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium -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.static.libsodium -e 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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.static.libsodium 6gjuvi5vjcho
echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m22.898s
user 0m22.094s
sys 0m3.153s
+ 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'
+ set +eu
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium-openssl
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho
+ ./pegh.static.libsodium -v 0 6gjuvi5vjcho
Error: libsodium does not support AES-256-GCM on this CPU, compile/use openssl version?
usage: pegh [options...] password
password: minimum required length is 12
-e encrypt input to output, default mode
-d decrypt input to output
-i <filename> file to use for input, - means stdin, default stdin
-o <filename> file to use for output, - means stdout, default stdout
-a append to -o instead of truncate
-v pegh file format version to output,
either 0 (AES-256-GCM) or 1 (Chacha20-Poly1305),
default: 0 if AES is hardware accelerated, 1 otherwise
-c <mb> chunk size for encryption, while decrypting/encrypting twice
this ram will be used, the same amount will be needed for
decryption as encryption. This value is saved in the file
format, so decryption will fail if this isn't set high enough,
these are only allocated after scrypt is finished so max usage
will be the highest of these only, not both combined,
max: 65535 (AES-256-GCM) or 262143 (Chacha20-Poly1305),
default: 32
-m <max_mb> maximum megabytes of ram to use when deriving key from password
with scrypt, applies for encryption AND decryption, must
almost linearly scale with -N, if too low operation will fail,
default: 64
-f <filename> read password from file instead of argument, - means stdin
-g prompt for password, confirm on encryption, max characters: 64
-N <num> scrypt parameter N, only applies for encryption, default 32768
this is rounded up to the next highest power of 2
-r <num> scrypt parameter r, only applies for encryption, default 8
-p <num> scrypt parameter p, only applies for encryption, default 1
-s <num> multiplication factor to apply to both -N and -m for easy
work scaling, rounded up to the next highest power of 2,
BEWARE: -s 32 requires 2G ram, -s 64 requires 4G and so on,
default: 1
-h print this usage text
-q do not print error output to stderr
-V show version number and format version support then quit
For additional info on scrypt params refer to:
https://blog.filippo.io/the-scrypt-parameters/https://tools.ietf.org/html/rfc7914#section-2
File too small for decryption, invalid header?
+ '[' 19 -eq 19 -o 1 -eq 19 ']'
+ set -eu
skipping this test because libsodium doesn't support AES on this CPU
+ echo 'skipping this test because libsodium doesn'\''t support AES on this CPU'
+ return 0
real 0m0.041s
user 0m0.058s
sys 0m0.002s
+ test ./pegh.static.libsodium ./pegh.libsodium-openssl -v 1
+ 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 '!=' 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 6gjuvi5vjcho
++ echo a
++ ./pegh.static.libsodium -v 1 6gjuvi5vjcho
/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 1 6gjuvi5vjcho
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho
+ 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-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 6gjuvi5vjcho -i /tmp/randombytes100
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho-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-openssl -d -f /tmp/leading_zero_key_b
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium -e -v 1 -f /tmp/leading_zero_key_a
decryption failed
cmp: EOF on -
+ echo 'large values of N without enough memory should fail'
+ ./pegh.static.libsodium -e -v 1 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
large values of N without enough memory should fail
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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'
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium -v 1 6gjuvi5vjcho
+ cat - /dev/fd/63
bad decryption bytes are never output, file should be 0 bytes
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho -o bla.txt
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m22.640s
user 0m21.360s
sys 0m3.244s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.static.libsodium ./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'
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium
+ set +eu
+ '[' '' '!=' 1 ']'
+ ./pegh.static.libsodium 6gjuvi5vjcho
+ echo a
+ ./pegh.static.libsodium -d 6gjuvi5vjcho
+ '[' 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.static.libsodium 6gjuvi5vjcho
++ ++ echo a
./pegh.static.libsodium 6gjuvi5vjcho
/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 6gjuvi5vjcho
+ ./pegh.static.libsodium -d 6gjuvi5vjcho
+ 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.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'
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium -d 6gjuvi5vjcho-wrongkey
+ ./pegh.static.libsodium -e 6gjuvi5vjcho -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
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium -e -f /tmp/leading_zero_key_a
+ ./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 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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 6gjuvi5vjcho
+ ./pegh.static.libsodium -d 6gjuvi5vjcho -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.static.libsodium
+ '[' -s bla.txt ']'
+ set -e
real 0m23.695s
user 0m22.504s
sys 0m3.269s
+ test ./pegh.static.libsodium ./pegh.static.libsodium -v 0
+ 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
+ '[' 0 '!=' 1 ']'
+ ./pegh.static.libsodium -v 0 6gjuvi5vjcho
+ echo a
+ ./pegh.static.libsodium -d 6gjuvi5vjcho
Error: libsodium does not support AES-256-GCM on this CPU, compile/use openssl version?
usage: pegh [options...] password
password: minimum required length is 12
-e encrypt input to output, default mode
-d decrypt input to output
-i <filename> file to use for input, - means stdin, default stdin
-o <filename> file to use for output, - means stdout, default stdout
-a append to -o instead of truncate
-v pegh file format version to output,
either 0 (AES-256-GCM) or 1 (Chacha20-Poly1305),
default: 0 if AES is hardware accelerated, 1 otherwise
-c <mb> chunk size for encryption, while decrypting/encrypting twice
this ram will be used, the same amount will be needed for
decryption as encryption. This value is saved in the file
format, so decryption will fail if this isn't set high enough,
these are only allocated after scrypt is finished so max usage
will be the highest of these only, not both combined,
max: 65535 (AES-256-GCM) or 262143 (Chacha20-Poly1305),
default: 32
-m <max_mb> maximum megabytes of ram to use when deriving key from password
with scrypt, applies for encryption AND decryption, must
almost linearly scale with -N, if too low operation will fail,
default: 64
-f <filename> read password from file instead of argument, - means stdin
-g prompt for password, confirm on encryption, max characters: 64
-N <num> scrypt parameter N, only applies for encryption, default 32768
this is rounded up to the next highest power of 2
-r <num> scrypt parameter r, only applies for encryption, default 8
-p <num> scrypt parameter p, only applies for encryption, default 1
-s <num> multiplication factor to apply to both -N and -m for easy
work scaling, rounded up to the next highest power of 2,
BEWARE: -s 32 requires 2G ram, -s 64 requires 4G and so on,
default: 1
-h print this usage text
-q do not print error output to stderr
-V show version number and format version support then quit
For additional info on scrypt params refer to:
https://blog.filippo.io/the-scrypt-parameters/https://tools.ietf.org/html/rfc7914#section-2
File too small for decryption, invalid header?
+ '[' 19 -eq 19 -o 1 -eq 19 ']'
+ set -eu
+ echo 'skipping this test because libsodium doesn'\''t support AES on this CPU'
skipping this test because libsodium doesn't support AES on this CPU
+ return 0
real 0m0.024s
user 0m0.013s
sys 0m0.027s
+ 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
+ cmp /dev/fd/63 /dev/fd/62
++ echo a
++ echo a
++ ./pegh.static.libsodium -v 1 6gjuvi5vjcho
++ ./pegh.static.libsodium -v 1 6gjuvi5vjcho
/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 1 6gjuvi5vjcho
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium -d 6gjuvi5vjcho
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 /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 -d 6gjuvi5vjcho-wrongkey
+ ./pegh.static.libsodium -e -v 1 6gjuvi5vjcho -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 -v 1 -f /tmp/leading_zero_key_a
+ + cmp ./pegh.static.libsodium -d -f - /tmp/randombytes100
/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 1 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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 -d 6gjuvi5vjcho -o bla.txt
+ ./pegh.static.libsodium -v 1 6gjuvi5vjcho
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m21.689s
user 0m20.606s
sys 0m3.263s
+ 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 6gjuvi5vjcho
+ ./pegh.libsodium -d 6gjuvi5vjcho
+ '[' 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 6gjuvi5vjcho
++ echo a
++ ./pegh.static.libsodium 6gjuvi5vjcho
++ 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 6gjuvi5vjcho
+ ./pegh.libsodium -d 6gjuvi5vjcho
+ 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 -d + + -f ./pegh.static.libsodium -e /tmp/leading_zero_key
-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 -d 6gjuvi5vjcho-wrongkey
+ ./pegh.static.libsodium cmp - /tmp/randombytes100
-e 6gjuvi5vjcho -i /tmp/randombytes100
decryption failed
cmp: EOF on -
+ echo 'encrypting/decrypting with key in file where last byte is different should fail'
+ + ./pegh.libsodium -d -f /tmp/leading_zero_key_b
cmp - /tmp/randombytes100
encrypting/decrypting with key in file where last byte is different should fail
+ ./pegh.static.libsodium -e -f /tmp/leading_zero_key_a
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 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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.static.libsodium + 6gjuvi5vjcho
echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium -d 6gjuvi5vjcho -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium
+ '[' -s bla.txt ']'
+ set -e
real 0m22.873s
user 0m21.902s
sys 0m3.282s
+ test ./pegh.static.libsodium ./pegh.libsodium -v 0
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.libsodium
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium'
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.libsodium -d 6gjuvi5vjcho
+ ./pegh.static.libsodium -v 0 6gjuvi5vjcho
Error: libsodium does not support AES-256-GCM on this CPU, compile/use openssl version?
usage: pegh [options...] password
password: minimum required length is 12
-e encrypt input to output, default mode
-d decrypt input to output
-i <filename> file to use for input, - means stdin, default stdin
-o <filename> file to use for output, - means stdout, default stdout
-a append to -o instead of truncate
-v pegh file format version to output,
either 0 (AES-256-GCM) or 1 (Chacha20-Poly1305),
default: 0 if AES is hardware accelerated, 1 otherwise
-c <mb> chunk size for encryption, while decrypting/encrypting twice
this ram will be used, the same amount will be needed for
decryption as encryption. This value is saved in the file
format, so decryption will fail if this isn't set high enough,
these are only allocated after scrypt is finished so max usage
will be the highest of these only, not both combined,
max: 65535 (AES-256-GCM) or 262143 (Chacha20-Poly1305),
default: 32
-m <max_mb> maximum megabytes of ram to use when deriving key from password
with scrypt, applies for encryption AND decryption, must
almost linearly scale with -N, if too low operation will fail,
default: 64
-f <filename> read password from file instead of argument, - means stdin
-g prompt for password, confirm on encryption, max characters: 64
-N <num> scrypt parameter N, only applies for encryption, default 32768
this is rounded up to the next highest power of 2
-r <num> scrypt parameter r, only applies for encryption, default 8
-p <num> scrypt parameter p, only applies for encryption, default 1
-s <num> multiplication factor to apply to both -N and -m for easy
work scaling, rounded up to the next highest power of 2,
BEWARE: -s 32 requires 2G ram, -s 64 requires 4G and so on,
default: 1
-h print this usage text
-q do not print error output to stderr
-V show version number and format version support then quit
For additional info on scrypt params refer to:
https://blog.filippo.io/the-scrypt-parameters/https://tools.ietf.org/html/rfc7914#section-2
File too small for decryption, invalid header?
+ '[' 19 -eq 19 -o 1 -eq 19 ']'
+ set -eu
+ echo 'skipping this test because libsodium doesn'\''t support AES on this CPU'
skipping this test because libsodium doesn't support AES on this CPU
+ return 0
real 0m0.035s
user 0m0.038s
sys 0m0.005s
+ test ./pegh.static.libsodium ./pegh.libsodium -v 1
+ bin=./pegh.static.libsodium
+ shift
+ bin_decrypt=./pegh.libsodium
+ shift
+ echo 'testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium'
+ set +eu
testing binaries bin: ./pegh.static.libsodium bin_decrypt: ./pegh.libsodium
+ '[' 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 6gjuvi5vjcho
++ echo a
++ ./pegh.static.libsodium -v 1 6gjuvi5vjcho
/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 6gjuvi5vjcho
+ ./pegh.libsodium -d 6gjuvi5vjcho
+ 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.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 1 6gjuvi5vjcho -i /tmp/randombytes100
+ ./pegh.libsodium -d 6gjuvi5vjcho-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
+ cmp - + ./pegh.libsodium -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 1 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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 6gjuvi5vjcho
+ ./pegh.libsodium -d 6gjuvi5vjcho -o bla.txt
++ echo -n a
+ cat - /dev/fd/63
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m22.633s
user 0m21.710s
sys 0m3.053s
+ 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'
+ set +eu
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.openssl
+ '[' '' '!=' 1 ']'
+ echo a
+ ./pegh.libsodium 6gjuvi5vjcho
+ ./pegh.static.openssl -d 6gjuvi5vjcho
+ '[' 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 6gjuvi5vjcho
++ echo a
++ echo a
++ ./pegh.libsodium 6gjuvi5vjcho
/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.openssl -d 6gjuvi5vjcho
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium -e 6gjuvi5vjcho
+ 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.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 6gjuvi5vjcho -i /tmp/randombytes100
+ ./pegh.static.openssl -d 6gjuvi5vjcho-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
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium -e + ./pegh.static.openssl -d -f /tmp/leading_zero_key_b
-f /tmp/leading_zero_key_a
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 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.openssl -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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
+ cat - /dev/fd/63
+ ./pegh.static.openssl -d 6gjuvi5vjcho -o bla.txt
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.libsodium 6gjuvi5vjcho
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m23.397s
user 0m22.092s
sys 0m3.504s
+ test ./pegh.libsodium ./pegh.static.openssl -v 0
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.static.openssl
+ shift
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.openssl
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.openssl'
+ set +eu
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.static.openssl -d 6gjuvi5vjcho
+ ./pegh.libsodium -v 0 6gjuvi5vjcho
Error: libsodium does not support AES-256-GCM on this CPU, compile/use openssl version?
usage: pegh [options...] password
password: minimum required length is 12
-e encrypt input to output, default mode
-d decrypt input to output
-i <filename> file to use for input, - means stdin, default stdin
-o <filename> file to use for output, - means stdout, default stdout
-a append to -o instead of truncate
-v pegh file format version to output,
either 0 (AES-256-GCM) or 1 (Chacha20-Poly1305),
default: 0 if AES is hardware accelerated, 1 otherwise
-c <mb> chunk size for encryption, while decrypting/encrypting twice
this ram will be used, the same amount will be needed for
decryption as encryption. This value is saved in the file
format, so decryption will fail if this isn't set high enough,
these are only allocated after scrypt is finished so max usage
will be the highest of these only, not both combined,
max: 65535 (AES-256-GCM) or 262143 (Chacha20-Poly1305),
default: 32
-m <max_mb> maximum megabytes of ram to use when deriving key from password
with scrypt, applies for encryption AND decryption, must
almost linearly scale with -N, if too low operation will fail,
default: 64
-f <filename> read password from file instead of argument, - means stdin
-g prompt for password, confirm on encryption, max characters: 64
-N <num> scrypt parameter N, only applies for encryption, default 32768
this is rounded up to the next highest power of 2
-r <num> scrypt parameter r, only applies for encryption, default 8
-p <num> scrypt parameter p, only applies for encryption, default 1
-s <num> multiplication factor to apply to both -N and -m for easy
work scaling, rounded up to the next highest power of 2,
BEWARE: -s 32 requires 2G ram, -s 64 requires 4G and so on,
default: 1
-h print this usage text
-q do not print error output to stderr
-V show version number and format version support then quit
For additional info on scrypt params refer to:
https://blog.filippo.io/the-scrypt-parameters/https://tools.ietf.org/html/rfc7914#section-2
File too small for decryption, invalid header?
+ '[' 19 -eq 19 -o 1 -eq 19 ']'
+ set -eu
+ echo 'skipping this test because libsodium doesn'\''t support AES on this CPU'
skipping this test because libsodium doesn't support AES on this CPU
+ return 0
real 0m0.031s
user 0m0.045s
sys 0m0.000s
+ 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'
+ set +eu
+ '[' 1 '!=' 1 ']'
+ set -eu
+ echo 'encrypting same data with same key should result in different ciphertext'
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.static.openssl
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 6gjuvi5vjcho
++ ./pegh.libsodium -v 1 6gjuvi5vjcho
/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 6gjuvi5vjcho
+ cmp - /tmp/randombytes100
+ ./pegh.static.openssl -d 6gjuvi5vjcho
+ 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.static.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 + ./pegh.static.openssl -d 6gjuvi5vjcho-wrongkey
6gjuvi5vjcho -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.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 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.openssl -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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.static.openssl -d 6gjuvi5vjcho -o bla.txt
+ + echo 'hopefully this doesnt make it to disk'
./pegh.libsodium -v 1 6gjuvi5vjcho
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m22.860s
user 0m21.468s
sys 0m3.562s
+ 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 6gjuvi5vjcho
+ ./pegh.openssl -d 6gjuvi5vjcho
encrypting same data with same key should result in different ciphertext
+ '[' 0 -eq 19 -o 0 -eq 19 ']'
+ 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 6gjuvi5vjcho
++ echo a
++ ./pegh.libsodium 6gjuvi5vjcho
/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 6gjuvi5vjcho
./pegh.openssl -d 6gjuvi5vjcho
+ 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
+ ./pegh.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 6gjuvi5vjcho -i /tmp/randombytes100
+ ./pegh.openssl -d 6gjuvi5vjcho-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 -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.libsodium -e 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.openssl -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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 6gjuvi5vjcho
+ + cat - /dev/fd/63
++ echo -n a
./pegh.openssl -d 6gjuvi5vjcho -o bla.txt
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m24.220s
user 0m23.194s
sys 0m3.358s
+ 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'
+ set +eu
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.openssl
+ '[' 0 '!=' 1 ']'
+ ./pegh.openssl -d 6gjuvi5vjcho
+ echo a
+ ./pegh.libsodium -v 0 6gjuvi5vjcho
Error: libsodium does not support AES-256-GCM on this CPU, compile/use openssl version?
usage: pegh [options...] password
password: minimum required length is 12
-e encrypt input to output, default mode
-d decrypt input to output
-i <filename> file to use for input, - means stdin, default stdin
-o <filename> file to use for output, - means stdout, default stdout
-a append to -o instead of truncate
-v pegh file format version to output,
either 0 (AES-256-GCM) or 1 (Chacha20-Poly1305),
default: 0 if AES is hardware accelerated, 1 otherwise
-c <mb> chunk size for encryption, while decrypting/encrypting twice
this ram will be used, the same amount will be needed for
decryption as encryption. This value is saved in the file
format, so decryption will fail if this isn't set high enough,
these are only allocated after scrypt is finished so max usage
will be the highest of these only, not both combined,
max: 65535 (AES-256-GCM) or 262143 (Chacha20-Poly1305),
default: 32
-m <max_mb> maximum megabytes of ram to use when deriving key from password
with scrypt, applies for encryption AND decryption, must
almost linearly scale with -N, if too low operation will fail,
default: 64
-f <filename> read password from file instead of argument, - means stdin
-g prompt for password, confirm on encryption, max characters: 64
-N <num> scrypt parameter N, only applies for encryption, default 32768
this is rounded up to the next highest power of 2
-r <num> scrypt parameter r, only applies for encryption, default 8
-p <num> scrypt parameter p, only applies for encryption, default 1
-s <num> multiplication factor to apply to both -N and -m for easy
work scaling, rounded up to the next highest power of 2,
BEWARE: -s 32 requires 2G ram, -s 64 requires 4G and so on,
default: 1
-h print this usage text
-q do not print error output to stderr
-V show version number and format version support then quit
For additional info on scrypt params refer to:
https://blog.filippo.io/the-scrypt-parameters/https://tools.ietf.org/html/rfc7914#section-2
File too small for decryption, invalid header?
+ '[' 19 -eq 19 -o 1 -eq 19 ']'
+ set -eu
skipping this test because libsodium doesn't support AES on this CPU
+ echo 'skipping this test because libsodium doesn'\''t support AES on this CPU'
+ return 0
real 0m0.040s
user 0m0.027s
sys 0m0.037s
+ test ./pegh.libsodium ./pegh.openssl -v 1
+ 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 '!=' 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.libsodium -v 1 6gjuvi5vjcho
++ echo a
++ ./pegh.libsodium -v 1 6gjuvi5vjcho
/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 6gjuvi5vjcho
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium -e -v 1 6gjuvi5vjcho
+ 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.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 6gjuvi5vjcho -i /tmp/randombytes100
+ cmp - /tmp/randombytes100
+ ./pegh.openssl -d 6gjuvi5vjcho-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.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 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.openssl -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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 -v 1 6gjuvi5vjcho
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.openssl -d 6gjuvi5vjcho -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m22.332s
user 0m21.541s
sys 0m3.038s
+ 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.static.libsodium-openssl -d 6gjuvi5vjcho
+ ./pegh.libsodium 6gjuvi5vjcho
+ '[' 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 6gjuvi5vjcho
++ echo a
++ ./pegh.libsodium 6gjuvi5vjcho
/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
+ + cmp - /tmp/randombytes100./pegh.libsodium -e 6gjuvi5vjcho
+
./pegh.static.libsodium-openssl -d 6gjuvi5vjcho
+ 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
+ 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 6gjuvi5vjcho -i /tmp/randombytes100
+ ./pegh.static.libsodium-openssl -d 6gjuvi5vjcho-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-openssl -d -f /tmp/leading_zero_key_b
+ ./pegh.libsodium -e -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 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium-openssl -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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 6gjuvi5vjcho
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium-openssl -d 6gjuvi5vjcho -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m23.083s
user 0m21.883s
sys 0m3.477s
+ 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 + ./pegh.static.libsodium-openssl -d 6gjuvi5vjcho
-v 0 6gjuvi5vjcho
Error: libsodium does not support AES-256-GCM on this CPU, compile/use openssl version?
usage: pegh [options...] password
password: minimum required length is 12
-e encrypt input to output, default mode
-d decrypt input to output
-i <filename> file to use for input, - means stdin, default stdin
-o <filename> file to use for output, - means stdout, default stdout
-a append to -o instead of truncate
-v pegh file format version to output,
either 0 (AES-256-GCM) or 1 (Chacha20-Poly1305),
default: 0 if AES is hardware accelerated, 1 otherwise
-c <mb> chunk size for encryption, while decrypting/encrypting twice
this ram will be used, the same amount will be needed for
decryption as encryption. This value is saved in the file
format, so decryption will fail if this isn't set high enough,
these are only allocated after scrypt is finished so max usage
will be the highest of these only, not both combined,
max: 65535 (AES-256-GCM) or 262143 (Chacha20-Poly1305),
default: 32
-m <max_mb> maximum megabytes of ram to use when deriving key from password
with scrypt, applies for encryption AND decryption, must
almost linearly scale with -N, if too low operation will fail,
default: 64
-f <filename> read password from file instead of argument, - means stdin
-g prompt for password, confirm on encryption, max characters: 64
-N <num> scrypt parameter N, only applies for encryption, default 32768
this is rounded up to the next highest power of 2
-r <num> scrypt parameter r, only applies for encryption, default 8
-p <num> scrypt parameter p, only applies for encryption, default 1
-s <num> multiplication factor to apply to both -N and -m for easy
work scaling, rounded up to the next highest power of 2,
BEWARE: -s 32 requires 2G ram, -s 64 requires 4G and so on,
default: 1
-h print this usage text
-q do not print error output to stderr
-V show version number and format version support then quit
For additional info on scrypt params refer to:
https://blog.filippo.io/the-scrypt-parameters/https://tools.ietf.org/html/rfc7914#section-2
File too small for decryption, invalid header?
+ '[' 19 -eq 19 -o 1 -eq 19 ']'
skipping this test because libsodium doesn't support AES on this CPU
+ set -eu
+ echo 'skipping this test because libsodium doesn'\''t support AES on this CPU'
+ return 0
real 0m0.032s
user 0m0.047s
sys 0m0.006s
+ test ./pegh.libsodium ./pegh.static.libsodium-openssl -v 1
+ 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 '!=' 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 -v 1 6gjuvi5vjcho
++ echo a
++ echo a
++ ./pegh.libsodium -v 1 6gjuvi5vjcho
/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 6gjuvi5vjcho
+ cmp - /tmp/randombytes100
+ ./pegh.static.libsodium-openssl -d 6gjuvi5vjcho
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-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 + cmp - /tmp/randombytes100
-v 1 6gjuvi5vjcho -i /tmp/randombytes100
+ ./pegh.static.libsodium-openssl -d 6gjuvi5vjcho-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-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 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium-openssl -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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-openssl -d 6gjuvi5vjcho -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
+ ./pegh.libsodium -v 1 6gjuvi5vjcho
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m22.439s
user 0m21.524s
sys 0m3.136s
+ 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 6gjuvi5vjcho
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho
+ '[' 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
++ ++ echo a
./pegh.libsodium ++ ./pegh.libsodium 6gjuvi5vjcho
6gjuvi5vjcho
/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 6gjuvi5vjcho
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho
+ 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 -d -f /tmp/leading_zero_key
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium -e -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 + ./pegh.libsodium-openssl -d 6gjuvi5vjcho-wrongkey
6gjuvi5vjcho -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.libsodium-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 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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 6gjuvi5vjcho
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m23.315s
user 0m22.426s
sys 0m3.050s
+ test ./pegh.libsodium ./pegh.libsodium-openssl -v 0
+ 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
+ '[' 0 '!=' 1 ']'
+ echo a
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho
+ ./pegh.libsodium -v 0 6gjuvi5vjcho
Error: libsodium does not support AES-256-GCM on this CPU, compile/use openssl version?
usage: pegh [options...] password
password: minimum required length is 12
-e encrypt input to output, default mode
-d decrypt input to output
-i <filename> file to use for input, - means stdin, default stdin
-o <filename> file to use for output, - means stdout, default stdout
-a append to -o instead of truncate
-v pegh file format version to output,
either 0 (AES-256-GCM) or 1 (Chacha20-Poly1305),
default: 0 if AES is hardware accelerated, 1 otherwise
-c <mb> chunk size for encryption, while decrypting/encrypting twice
this ram will be used, the same amount will be needed for
decryption as encryption. This value is saved in the file
format, so decryption will fail if this isn't set high enough,
these are only allocated after scrypt is finished so max usage
will be the highest of these only, not both combined,
max: 65535 (AES-256-GCM) or 262143 (Chacha20-Poly1305),
default: 32
-m <max_mb> maximum megabytes of ram to use when deriving key from password
with scrypt, applies for encryption AND decryption, must
almost linearly scale with -N, if too low operation will fail,
default: 64
-f <filename> read password from file instead of argument, - means stdin
-g prompt for password, confirm on encryption, max characters: 64
-N <num> scrypt parameter N, only applies for encryption, default 32768
this is rounded up to the next highest power of 2
-r <num> scrypt parameter r, only applies for encryption, default 8
-p <num> scrypt parameter p, only applies for encryption, default 1
-s <num> multiplication factor to apply to both -N and -m for easy
work scaling, rounded up to the next highest power of 2,
BEWARE: -s 32 requires 2G ram, -s 64 requires 4G and so on,
default: 1
-h print this usage text
-q do not print error output to stderr
-V show version number and format version support then quit
For additional info on scrypt params refer to:
https://blog.filippo.io/the-scrypt-parameters/https://tools.ietf.org/html/rfc7914#section-2
File too small for decryption, invalid header?
+ '[' 19 -eq 19 -o 1 -eq 19 ']'
+ set -eu
skipping this test because libsodium doesn't support AES on this CPU
+ echo 'skipping this test because libsodium doesn'\''t support AES on this CPU'
+ return 0
real 0m0.037s
user 0m0.040s
sys 0m0.022s
+ 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 6gjuvi5vjcho
++ ++ ./pegh.libsodium -v 1 6gjuvi5vjcho
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 1 6gjuvi5vjcho
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho
+ 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 -d -f /tmp/leading_zero_key
+ ./pegh.libsodium -e -v 1 -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 6gjuvi5vjcho -i /tmp/randombytes100
+ ./pegh.libsodium-openssl -d + 6gjuvi5vjcho-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
+ ./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 -e -v 1 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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'
+ cat - /dev/fd/63
+ ./pegh.libsodium -v 1 6gjuvi5vjcho
+ ./pegh.libsodium-openssl -d 6gjuvi5vjcho -o bla.txt
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m22.461s
user 0m21.389s
sys 0m3.414s
+ 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 ']'
+ ./pegh.libsodium 6gjuvi5vjcho
+ ./pegh.static.libsodium -d 6gjuvi5vjcho
+ echo a
+ '[' 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 6gjuvi5vjcho
++ echo a
++ ./pegh.libsodium 6gjuvi5vjcho
/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 6gjuvi5vjcho
+ ./pegh.static.libsodium -d 6gjuvi5vjcho
+ 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 -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.libsodium -d 6gjuvi5vjcho-wrongkey
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium -e 6gjuvi5vjcho -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 -d -f /tmp/leading_zero_key_b
+ ./pegh.libsodium -e -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 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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 6gjuvi5vjcho
+ ./pegh.static.libsodium -d 6gjuvi5vjcho -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m23.187s
user 0m22.248s
sys 0m3.169s
+ 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 ']'
+ ./pegh.libsodium -v 0 6gjuvi5vjcho
+ ./pegh.static.libsodium -d 6gjuvi5vjcho
+ echo a
Error: libsodium does not support AES-256-GCM on this CPU, compile/use openssl version?
usage: pegh [options...] password
password: minimum required length is 12
-e encrypt input to output, default mode
-d decrypt input to output
-i <filename> file to use for input, - means stdin, default stdin
-o <filename> file to use for output, - means stdout, default stdout
-a append to -o instead of truncate
-v pegh file format version to output,
either 0 (AES-256-GCM) or 1 (Chacha20-Poly1305),
default: 0 if AES is hardware accelerated, 1 otherwise
-c <mb> chunk size for encryption, while decrypting/encrypting twice
this ram will be used, the same amount will be needed for
decryption as encryption. This value is saved in the file
format, so decryption will fail if this isn't set high enough,
these are only allocated after scrypt is finished so max usage
will be the highest of these only, not both combined,
max: 65535 (AES-256-GCM) or 262143 (Chacha20-Poly1305),
default: 32
-m <max_mb> maximum megabytes of ram to use when deriving key from password
with scrypt, applies for encryption AND decryption, must
almost linearly scale with -N, if too low operation will fail,
default: 64
-f <filename> read password from file instead of argument, - means stdin
-g prompt for password, confirm on encryption, max characters: 64
-N <num> scrypt parameter N, only applies for encryption, default 32768
this is rounded up to the next highest power of 2
-r <num> scrypt parameter r, only applies for encryption, default 8
-p <num> scrypt parameter p, only applies for encryption, default 1
-s <num> multiplication factor to apply to both -N and -m for easy
work scaling, rounded up to the next highest power of 2,
BEWARE: -s 32 requires 2G ram, -s 64 requires 4G and so on,
default: 1
-h print this usage text
-q do not print error output to stderr
-V show version number and format version support then quit
For additional info on scrypt params refer to:
https://blog.filippo.io/the-scrypt-parameters/https://tools.ietf.org/html/rfc7914#section-2
File too small for decryption, invalid header?
+ '[' 19 -eq 19 -o 1 -eq 19 ']'
+ set -eu
+ echo 'skipping this test because libsodium doesn'\''t support AES on this CPU'
skipping this test because libsodium doesn't support AES on this CPU
+ return 0
real 0m0.027s
user 0m0.038s
sys 0m0.009s
+ 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
++ ./pegh.libsodium -v 1 6gjuvi5vjcho
++ ./pegh.libsodium -v 1 6gjuvi5vjcho
++ 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 -e -v 1 6gjuvi5vjcho
+ ./pegh.static.libsodium -d 6gjuvi5vjcho
+ 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 -d -f /tmp/leading_zero_key
./pegh.libsodium -e -v 1 -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 6gjuvi5vjcho -i /tmp/randombytes100
+ ./pegh.static.libsodium -d 6gjuvi5vjcho-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 -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 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.static.libsodium -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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 1 6gjuvi5vjcho
+ echo 'hopefully this doesnt make it to disk'
+ ./pegh.static.libsodium -d 6gjuvi5vjcho -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m22.557s
user 0m21.370s
sys 0m3.409s
+ for bin_decrypt in $TEST_BINS
+ test ./pegh.libsodium ./pegh.libsodium
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.libsodium
+ bin=./pegh.libsodium
+ shift
+ bin_decrypt=./pegh.libsodium
+ shift
+ echo 'testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.libsodium'
+ set +eu
+ '[' '' '!=' 1 ']'
+ ./pegh.libsodium 6gjuvi5vjcho
+ echo a
+ ./pegh.libsodium -d 6gjuvi5vjcho
+ '[' 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 6gjuvi5vjcho
++ echo a
++ ./pegh.libsodium 6gjuvi5vjcho
++ 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 6gjuvi5vjcho
+ + cmp - /tmp/randombytes100
./pegh.libsodium -d 6gjuvi5vjcho
+ 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 + ./pegh.libsodium -e -f /tmp/leading_zero_key
-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 6gjuvi5vjcho -i /tmp/randombytes100
+ ./pegh.libsodium -d 6gjuvi5vjcho-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 -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 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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 -d 6gjuvi5vjcho -o bla.txt
+ ./pegh.libsodium 6gjuvi5vjcho
echo 'hopefully this doesnt make it to disk'
+ cat - /dev/fd/63
++ echo -n a
decryption failed
testing binaries bin: ./pegh.libsodium bin_decrypt: ./pegh.libsodium
+ '[' -s bla.txt ']'
+ set -e
real 0m23.238s
user 0m22.138s
sys 0m3.541s
+ 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'
+ set +eu
+ '[' 0 '!=' 1 ']'
+ ./pegh.libsodium -v 0 6gjuvi5vjcho
+ echo a
+ ./pegh.libsodium -d 6gjuvi5vjcho
Error: libsodium does not support AES-256-GCM on this CPU, compile/use openssl version?
usage: pegh [options...] password
password: minimum required length is 12
-e encrypt input to output, default mode
-d decrypt input to output
-i <filename> file to use for input, - means stdin, default stdin
-o <filename> file to use for output, - means stdout, default stdout
-a append to -o instead of truncate
-v pegh file format version to output,
either 0 (AES-256-GCM) or 1 (Chacha20-Poly1305),
default: 0 if AES is hardware accelerated, 1 otherwise
-c <mb> chunk size for encryption, while decrypting/encrypting twice
this ram will be used, the same amount will be needed for
decryption as encryption. This value is saved in the file
format, so decryption will fail if this isn't set high enough,
these are only allocated after scrypt is finished so max usage
will be the highest of these only, not both combined,
max: 65535 (AES-256-GCM) or 262143 (Chacha20-Poly1305),
default: 32
-m <max_mb> maximum megabytes of ram to use when deriving key from password
with scrypt, applies for encryption AND decryption, must
almost linearly scale with -N, if too low operation will fail,
default: 64
-f <filename> read password from file instead of argument, - means stdin
-g prompt for password, confirm on encryption, max characters: 64
-N <num> scrypt parameter N, only applies for encryption, default 32768
this is rounded up to the next highest power of 2
-r <num> scrypt parameter r, only applies for encryption, default 8
-p <num> scrypt parameter p, only applies for encryption, default 1
-s <num> multiplication factor to apply to both -N and -m for easy
work scaling, rounded up to the next highest power of 2,
BEWARE: -s 32 requires 2G ram, -s 64 requires 4G and so on,
default: 1
-h print this usage text
-q do not print error output to stderr
-V show version number and format version support then quit
For additional info on scrypt params refer to:
https://blog.filippo.io/the-scrypt-parameters/https://tools.ietf.org/html/rfc7914#section-2
File too small for decryption, invalid header?
+ '[' 19 -eq 19 -o 1 -eq 19 ']'
+ set -eu
+ echo 'skipping this test because libsodium doesn'\''t support AES on this CPU'
skipping this test because libsodium doesn't support AES on this CPU
+ return 0
real 0m0.037s
user 0m0.041s
sys 0m0.017s
+ 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
+ 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 1 6gjuvi5vjcho
++ ./pegh.libsodium -v 1 6gjuvi5vjcho
++ 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 1 6gjuvi5vjcho
+ cmp - /tmp/randombytes100
+ ./pegh.libsodium -d 6gjuvi5vjcho
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
+ ./pegh.libsodium -e -v 1 6gjuvi5vjcho -i /tmp/randombytes100
+ ./pegh.libsodium -d 6gjuvi5vjcho-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
+ + ./pegh.libsodium -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.libsodium -e -v 1 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
scrypt key derivation error, needed memory 2049 mb, allowed memory 64 mb, increase -m
+ ./pegh.libsodium -d 6gjuvi5vjcho -N 2000000 -i /tmp/randombytes100
Error: unsupported file format version 116, 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 6gjuvi5vjcho
+ ./pegh.libsodium -d 6gjuvi5vjcho -o bla.txt
+ cat - /dev/fd/63
++ echo -n a
decryption failed
+ '[' -s bla.txt ']'
+ set -e
real 0m22.487s
user 0m21.363s
sys 0m3.393s
+ 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-ppc64le-libsodium
+ '[' ppc64le '==' aarch64 ]
+ mv pegh.static.openssl ./release/pegh-linux-ppc64le-openssl
+ mv pegh.static.libsodium-openssl ./release/pegh-linux-ppc64le-libsodium-openssl
+ '[' ppc64le '==' amd64 ]
+ '[' ppc64le '==' amd64 ]
+ '[' ppc64le '==' i386 ]
+ '[' -e .ci/release.sh ']'
+ '[' -d release ']'
+ ci-release-helper.sh standard_pre_release
Everything up-to-date
Everything up-to-date
deleting github release_id: 41341650
deleting gitea release_id: 347233
+ cd release
+ find -type f '!' -path ./sha256sum.txt -print0
+ xargs -0 sha256sum
+ gpg --clearsign sha256sum.txt
+ ci-release-helper.sh standard_multi_release sha256sum.txt text/plain
all tags:
beta
{
"url": "https://api.github.com/repos/moparisthebest/pegh/releases/43406674",
"assets_url": "https://api.github.com/repos/moparisthebest/pegh/releases/43406674/assets",
"upload_url": "https://uploads.github.com/repos/moparisthebest/pegh/releases/43406674/assets{?name,label}",
"html_url": "https://github.com/moparisthebest/pegh/releases/tag/beta",
"id": 43406674,
"author": {
"login": "moparisthebest",
"id": 363760,
"node_id": "MDQ6VXNlcjM2Mzc2MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/363760?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/moparisthebest",
"html_url": "https://github.com/moparisthebest",
"followers_url": "https://api.github.com/users/moparisthebest/followers",
"following_url": "https://api.github.com/users/moparisthebest/following{/other_user}",
"gists_url": "https://api.github.com/users/moparisthebest/gists{/gist_id}",
"starred_url": "https://api.github.com/users/moparisthebest/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/moparisthebest/subscriptions",
"organizations_url": "https://api.github.com/users/moparisthebest/orgs",
"repos_url": "https://api.github.com/users/moparisthebest/repos",
"events_url": "https://api.github.com/users/moparisthebest/events{/privacy}",
"received_events_url": "https://api.github.com/users/moparisthebest/received_events",
"type": "User",
"site_admin": false
},
"node_id": "MDc6UmVsZWFzZTQzNDA2Njc0",
"tag_name": "beta",
"target_commitish": "master",
"name": null,
"draft": false,
"prerelease": false,
"created_at": "2020-11-28T04:00:27Z",
"published_at": "2021-05-22T09:00:13Z",
"assets": [
],
"tarball_url": "https://api.github.com/repos/moparisthebest/pegh/tarball/beta",
"zipball_url": "https://api.github.com/repos/moparisthebest/pegh/zipball/beta",
"body": null
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333671","id":37333671,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjcx","name":"sha256sum.txt","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"text/plain","state":"uploaded","size":2050,"download_count":0,"created_at":"2021-05-22T09:00:13Z","updated_at":"2021-05-22T09:00:13Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/sha256sum.txt"}{"id":347233,"tag_name":"beta","target_commitish":"","name":"","body":"","url":"https://code.moparisthebest.com/api/v1/repos/moparisthebest/pegh/releases/347233","html_url":"https://code.moparisthebest.com/moparisthebest/pegh/releases/tag/beta","tarball_url":"https://code.moparisthebest.com/moparisthebest/pegh/archive/beta.tar.gz","zipball_url":"https://code.moparisthebest.com/moparisthebest/pegh/archive/beta.zip","draft":false,"prerelease":false,"created_at":"2020-11-27T23:00:27-05:00","published_at":"2020-11-27T23:00:27-05:00","author":{"id":1,"login":"moparisthebest","full_name":"Travis Burtrum","email":"admin.code@moparisthebest.com","avatar_url":"https://code.moparisthebest.com/user/avatar/moparisthebest/-1","language":"en-US","is_admin":true,"last_login":"2021-05-12T01:04:07-04:00","created":"2018-07-01T22:04:44-04:00","username":"moparisthebest"},"assets":[]}uploading file to gitea release_id: 347233
{"id":2562,"name":"sha256sum.txt","size":2050,"download_count":0,"created_at":"2021-05-22T05:00:14-04:00","uuid":"8e24735c-a012-40f8-902f-b5ac1837e569","browser_download_url":"https://code.moparisthebest.com/attachments/8e24735c-a012-40f8-902f-b5ac1837e569"}+ ci-release-helper.sh standard_multi_release sha256sum.txt.asc text/plain
all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333672","id":37333672,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjcy","name":"sha256sum.txt.asc","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"text/plain","state":"uploaded","size":2327,"download_count":0,"created_at":"2021-05-22T09:00:15Z","updated_at":"2021-05-22T09:00:15Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/sha256sum.txt.asc"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2563,"name":"sha256sum.txt.asc","size":2327,"download_count":0,"created_at":"2021-05-22T05:00:15-04:00","uuid":"ff607efd-f031-4f38-809b-b3b5cb15c9a4","browser_download_url":"https://code.moparisthebest.com/attachments/ff607efd-f031-4f38-809b-b3b5cb15c9a4"}+ rm -f sha256sum.txt sha256sum.txt.asc
+ find -type f -print0
+ xargs -0n1 -I '{}' ci-release-helper.sh standard_multi_release '{}' application/octet-stream
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value
all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333674","id":37333674,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjc0","name":"pegh-linux-amd64-libsodium","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":272936,"download_count":0,"created_at":"2021-05-22T09:00:17Z","updated_at":"2021-05-22T09:00:18Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-linux-amd64-libsodium"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2564,"name":"pegh-linux-amd64-libsodium","size":272936,"download_count":0,"created_at":"2021-05-22T05:00:19-04:00","uuid":"feda4753-4c6f-4c7d-ad14-f68bef6d02a6","browser_download_url":"https://code.moparisthebest.com/attachments/feda4753-4c6f-4c7d-ad14-f68bef6d02a6"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333676","id":37333676,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjc2","name":"pegh-linux-amd64-openssl","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":2031912,"download_count":0,"created_at":"2021-05-22T09:00:20Z","updated_at":"2021-05-22T09:00:21Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-linux-amd64-openssl"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2565,"name":"pegh-linux-amd64-openssl","size":2031912,"download_count":0,"created_at":"2021-05-22T05:00:21-04:00","uuid":"a15e2da1-0402-4705-8546-884d23654490","browser_download_url":"https://code.moparisthebest.com/attachments/a15e2da1-0402-4705-8546-884d23654490"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333677","id":37333677,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjc3","name":"pegh-linux-amd64-libsodium-openssl","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":2249736,"download_count":0,"created_at":"2021-05-22T09:00:21Z","updated_at":"2021-05-22T09:00:22Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-linux-amd64-libsodium-openssl"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2566,"name":"pegh-linux-amd64-libsodium-openssl","size":2249736,"download_count":0,"created_at":"2021-05-22T05:00:22-04:00","uuid":"a4da0130-f612-4a3c-bfd5-60665206fca9","browser_download_url":"https://code.moparisthebest.com/attachments/a4da0130-f612-4a3c-bfd5-60665206fca9"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333678","id":37333678,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjc4","name":"pegh-source.zip","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":32076,"download_count":0,"created_at":"2021-05-22T09:00:23Z","updated_at":"2021-05-22T09:00:23Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-source.zip"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2567,"name":"pegh-source.zip","size":32076,"download_count":0,"created_at":"2021-05-22T05:00:24-04:00","uuid":"b870f7a0-6dff-4637-9b4b-5fae2f547a30","browser_download_url":"https://code.moparisthebest.com/attachments/b870f7a0-6dff-4637-9b4b-5fae2f547a30"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333679","id":37333679,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjc5","name":"pegh-source.tar.gz","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":29709,"download_count":0,"created_at":"2021-05-22T09:00:24Z","updated_at":"2021-05-22T09:00:24Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-source.tar.gz"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2568,"name":"pegh-source.tar.gz","size":29709,"download_count":0,"created_at":"2021-05-22T05:00:25-04:00","uuid":"cbcd74b3-0282-40b1-9411-8dee79fbd9fb","browser_download_url":"https://code.moparisthebest.com/attachments/cbcd74b3-0282-40b1-9411-8dee79fbd9fb"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333680","id":37333680,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjgw","name":"pegh-windows-amd64-libsodium-openssl.exe","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":2715648,"download_count":0,"created_at":"2021-05-22T09:00:26Z","updated_at":"2021-05-22T09:00:29Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-windows-amd64-libsodium-openssl.exe"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2569,"name":"pegh-windows-amd64-libsodium-openssl.exe","size":2715648,"download_count":0,"created_at":"2021-05-22T05:00:29-04:00","uuid":"175649bb-9828-4c9e-8fce-ad3bb798c945","browser_download_url":"https://code.moparisthebest.com/attachments/175649bb-9828-4c9e-8fce-ad3bb798c945"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333681","id":37333681,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjgx","name":"pegh-windows-amd64-libsodium.exe","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":306688,"download_count":0,"created_at":"2021-05-22T09:00:30Z","updated_at":"2021-05-22T09:00:30Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-windows-amd64-libsodium.exe"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2570,"name":"pegh-windows-amd64-libsodium.exe","size":306688,"download_count":0,"created_at":"2021-05-22T05:00:31-04:00","uuid":"6d5c33df-b81c-45ed-947b-9222e72c470b","browser_download_url":"https://code.moparisthebest.com/attachments/6d5c33df-b81c-45ed-947b-9222e72c470b"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333683","id":37333683,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjgz","name":"pegh-windows-amd64-openssl.exe","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":2456064,"download_count":0,"created_at":"2021-05-22T09:00:31Z","updated_at":"2021-05-22T09:00:33Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-windows-amd64-openssl.exe"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2571,"name":"pegh-windows-amd64-openssl.exe","size":2456064,"download_count":0,"created_at":"2021-05-22T05:00:33-04:00","uuid":"40a2d059-e422-48da-b80b-efacfd7a7469","browser_download_url":"https://code.moparisthebest.com/attachments/40a2d059-e422-48da-b80b-efacfd7a7469"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333685","id":37333685,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjg1","name":"pegh-linux-i386-libsodium","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":329156,"download_count":0,"created_at":"2021-05-22T09:00:34Z","updated_at":"2021-05-22T09:00:34Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-linux-i386-libsodium"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2572,"name":"pegh-linux-i386-libsodium","size":329156,"download_count":0,"created_at":"2021-05-22T05:00:34-04:00","uuid":"5d4b81a5-a3f3-496a-8324-b8e66c0e7da5","browser_download_url":"https://code.moparisthebest.com/attachments/5d4b81a5-a3f3-496a-8324-b8e66c0e7da5"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333687","id":37333687,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjg3","name":"pegh-linux-i386-openssl","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":2048532,"download_count":0,"created_at":"2021-05-22T09:00:35Z","updated_at":"2021-05-22T09:00:36Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-linux-i386-openssl"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2573,"name":"pegh-linux-i386-openssl","size":2048532,"download_count":0,"created_at":"2021-05-22T05:00:36-04:00","uuid":"fa035ae1-a90d-4c62-8c7f-ea4d26aac80f","browser_download_url":"https://code.moparisthebest.com/attachments/fa035ae1-a90d-4c62-8c7f-ea4d26aac80f"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333691","id":37333691,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjkx","name":"pegh-linux-i386-libsodium-openssl","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":2310864,"download_count":0,"created_at":"2021-05-22T09:00:37Z","updated_at":"2021-05-22T09:00:38Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-linux-i386-libsodium-openssl"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2574,"name":"pegh-linux-i386-libsodium-openssl","size":2310864,"download_count":0,"created_at":"2021-05-22T05:00:38-04:00","uuid":"85b5897b-4920-4dc8-9027-8d6641734962","browser_download_url":"https://code.moparisthebest.com/attachments/85b5897b-4920-4dc8-9027-8d6641734962"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333693","id":37333693,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjkz","name":"pegh-windows-i386-libsodium-openssl.exe","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":2335744,"download_count":0,"created_at":"2021-05-22T09:00:39Z","updated_at":"2021-05-22T09:00:39Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-windows-i386-libsodium-openssl.exe"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2575,"name":"pegh-windows-i386-libsodium-openssl.exe","size":2335744,"download_count":0,"created_at":"2021-05-22T05:00:40-04:00","uuid":"a6b4fac2-b97c-4321-b493-43f4ac9b45d0","browser_download_url":"https://code.moparisthebest.com/attachments/a6b4fac2-b97c-4321-b493-43f4ac9b45d0"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333694","id":37333694,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjk0","name":"pegh-windows-i386-libsodium.exe","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":357888,"download_count":0,"created_at":"2021-05-22T09:00:41Z","updated_at":"2021-05-22T09:00:41Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-windows-i386-libsodium.exe"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2576,"name":"pegh-windows-i386-libsodium.exe","size":357888,"download_count":0,"created_at":"2021-05-22T05:00:41-04:00","uuid":"fbf87915-b1d0-44fb-9ed2-220e471c216e","browser_download_url":"https://code.moparisthebest.com/attachments/fbf87915-b1d0-44fb-9ed2-220e471c216e"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333696","id":37333696,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjk2","name":"pegh-windows-i386-openssl.exe","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":2019840,"download_count":0,"created_at":"2021-05-22T09:00:42Z","updated_at":"2021-05-22T09:00:43Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-windows-i386-openssl.exe"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2577,"name":"pegh-windows-i386-openssl.exe","size":2019840,"download_count":0,"created_at":"2021-05-22T05:00:43-04:00","uuid":"f93fb081-573e-481e-abc7-4bfa35a2927d","browser_download_url":"https://code.moparisthebest.com/attachments/f93fb081-573e-481e-abc7-4bfa35a2927d"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333697","id":37333697,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjk3","name":"pegh-linux-aarch64-libsodium","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":178296,"download_count":0,"created_at":"2021-05-22T09:00:44Z","updated_at":"2021-05-22T09:00:44Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-linux-aarch64-libsodium"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2578,"name":"pegh-linux-aarch64-libsodium","size":178296,"download_count":0,"created_at":"2021-05-22T05:00:45-04:00","uuid":"f378aaa2-db50-43fe-bac9-7acc3aefd324","browser_download_url":"https://code.moparisthebest.com/attachments/f378aaa2-db50-43fe-bac9-7acc3aefd324"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333698","id":37333698,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNjk4","name":"pegh-linux-armv7-libsodium","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":161264,"download_count":0,"created_at":"2021-05-22T09:00:45Z","updated_at":"2021-05-22T09:00:46Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-linux-armv7-libsodium"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2579,"name":"pegh-linux-armv7-libsodium","size":161264,"download_count":0,"created_at":"2021-05-22T05:00:46-04:00","uuid":"9fa7f1e2-3bba-4488-8fc7-4538ef14cf70","browser_download_url":"https://code.moparisthebest.com/attachments/9fa7f1e2-3bba-4488-8fc7-4538ef14cf70"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333700","id":37333700,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNzAw","name":"pegh-linux-armv7-openssl","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":1216648,"download_count":0,"created_at":"2021-05-22T09:00:46Z","updated_at":"2021-05-22T09:00:47Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-linux-armv7-openssl"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2580,"name":"pegh-linux-armv7-openssl","size":1216648,"download_count":0,"created_at":"2021-05-22T05:00:47-04:00","uuid":"022c2843-08c9-4dea-955a-f3cd42a5028e","browser_download_url":"https://code.moparisthebest.com/attachments/022c2843-08c9-4dea-955a-f3cd42a5028e"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333701","id":37333701,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNzAx","name":"pegh-linux-armv7-libsodium-openssl","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":1335588,"download_count":0,"created_at":"2021-05-22T09:00:48Z","updated_at":"2021-05-22T09:00:49Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-linux-armv7-libsodium-openssl"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2581,"name":"pegh-linux-armv7-libsodium-openssl","size":1335588,"download_count":0,"created_at":"2021-05-22T05:00:49-04:00","uuid":"3981094e-c5cb-423f-b326-4b7657a86fbd","browser_download_url":"https://code.moparisthebest.com/attachments/3981094e-c5cb-423f-b326-4b7657a86fbd"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333702","id":37333702,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNzAy","name":"pegh-linux-ppc64le-libsodium","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":198856,"download_count":0,"created_at":"2021-05-22T09:00:50Z","updated_at":"2021-05-22T09:00:50Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-linux-ppc64le-libsodium"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2582,"name":"pegh-linux-ppc64le-libsodium","size":198856,"download_count":0,"created_at":"2021-05-22T05:00:50-04:00","uuid":"4657e524-2b6c-4bd9-8aa8-d83de8b432c6","browser_download_url":"https://code.moparisthebest.com/attachments/4657e524-2b6c-4bd9-8aa8-d83de8b432c6"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333703","id":37333703,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNzAz","name":"pegh-linux-ppc64le-openssl","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":2039160,"download_count":0,"created_at":"2021-05-22T09:00:51Z","updated_at":"2021-05-22T09:00:52Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-linux-ppc64le-openssl"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2583,"name":"pegh-linux-ppc64le-openssl","size":2039160,"download_count":0,"created_at":"2021-05-22T05:00:52-04:00","uuid":"e60bf985-ecaa-4b86-92f5-9ae3a4ba86a0","browser_download_url":"https://code.moparisthebest.com/attachments/e60bf985-ecaa-4b86-92f5-9ae3a4ba86a0"}all tags:
beta
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-release"
}
uploading file to github release_id: 43406674
{"url":"https://api.github.com/repos/moparisthebest/pegh/releases/assets/37333704","id":37333704,"node_id":"MDEyOlJlbGVhc2VBc3NldDM3MzMzNzA0","name":"pegh-linux-ppc64le-libsodium-openssl","label":"","uploader":{"login":"moparisthebest","id":363760,"node_id":"MDQ6VXNlcjM2Mzc2MA==","avatar_url":"https://avatars.githubusercontent.com/u/363760?v=4","gravatar_id":"","url":"https://api.github.com/users/moparisthebest","html_url":"https://github.com/moparisthebest","followers_url":"https://api.github.com/users/moparisthebest/followers","following_url":"https://api.github.com/users/moparisthebest/following{/other_user}","gists_url":"https://api.github.com/users/moparisthebest/gists{/gist_id}","starred_url":"https://api.github.com/users/moparisthebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moparisthebest/subscriptions","organizations_url":"https://api.github.com/users/moparisthebest/orgs","repos_url":"https://api.github.com/users/moparisthebest/repos","events_url":"https://api.github.com/users/moparisthebest/events{/privacy}","received_events_url":"https://api.github.com/users/moparisthebest/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":2170512,"download_count":0,"created_at":"2021-05-22T09:00:53Z","updated_at":"2021-05-22T09:00:53Z","browser_download_url":"https://github.com/moparisthebest/pegh/releases/download/beta/pegh-linux-ppc64le-libsodium-openssl"}{"message":"Release is has no Tag","url":"https://code.moparisthebest.com/api/swagger"}uploading file to gitea release_id: 347233
{"id":2584,"name":"pegh-linux-ppc64le-libsodium-openssl","size":2170512,"download_count":0,"created_at":"2021-05-22T05:00:54-04:00","uuid":"690c7bbd-32be-4628-8f3a-27b2c8971493","browser_download_url":"https://code.moparisthebest.com/attachments/690c7bbd-32be-4628-8f3a-27b2c8971493"}+ exit 0
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Email)
[Pipeline] step
[Pipeline] }
[Pipeline] // stage
[Pipeline] sh
+ ./bin/build.sh docker-chown
+ BUILD_SCRIPT=docker-chown
+ shift
+ '[' '' == docker-chown ']'
+ '[' docker-chown == docker-chown ']'
++ pwd
++ id -g
+ docker run --rm -v /var/lib/jenkins/workspace/moparisthebest_pegh_master:/tmp alpine chown -R 971:971 /tmp
+ exit 0
[Pipeline] deleteDir
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
[Gitea] Notifying branch build status: SUCCESS This commit looks good
[Gitea] Notified
Finished: SUCCESS