normalization

This commit is contained in:
2026-05-23 05:28:27 -06:00
parent a435b9503d
commit a1f18b566e
5 changed files with 46 additions and 1 deletions
Submodule Encrypt-Share-Attribution deleted from e2a3f08b51
+1
View File
@@ -0,0 +1 @@
# todo: make this nice
+1
View File
@@ -0,0 +1 @@
put files to verifiably archive in here
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
set -e
attrib_hash=$(cat "./attribution.sha512")
echo "enter passphrase to test"
read passphrase
echo
tested_hash=$( ( echo -n "$passphrase"; cat "./contents.7z" ) | sha512sum | awk '{print $1}')
if [[ "$attrib_hash" == "$tested_hash" ]]; then
echo -e "\n\nAttribution With Password $passphrase: \033[0;32mOK!\033[0m\n\n"
else
echo -e "Attribution With Password $passphrase: \033[0;31mFAIL!\033[0m"
fi
+29
View File
@@ -0,0 +1,29 @@
#!/bin/bash
set -e
checkcode () {
if [ -z "$1" ]; then
echo -e "\n\e[31mERROR!\033[0m chkcode missing return code paramater\n"
exit 1
else
retcode=$1
fi
if [ $retcode -ne 0 ]; then
echo -e "\t\e[31mERROR!\033[0m Response Code: $retcode"
else
printf '\e[1;32mOK!\e[0m\n'
fi
}
printf "Testing contents.7z integrity... "
7z t contents.7z > /dev/null 2>&1
checkcode $?
printf "Checking sha512 checksums... "
sha512sum -c checksums.sha512 > /dev/null 2>&1
checkcode $?
printf "Checking signature against provided public key... "
ssh-keygen -Y verify -f "./anonymous_signer" -I "anonymous" -n "file-integrity" -s contents.7z.sig < contents.7z > /dev/null > /dev/null > /dev/null 2>&1
checkcode $?