From c4b9ad3c1284a79cf690be17a529dd9ff0294f8a Mon Sep 17 00:00:00 2001 From: Nathan Christopher McRae Date: Sat, 22 Nov 2025 22:57:07 -0800 Subject: [PATCH] Add simple usage explanation + TODOs --- create-file-message.sh | 1 + readme.txt | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/create-file-message.sh b/create-file-message.sh index e493df5..2c6ccf7 100644 --- a/create-file-message.sh +++ b/create-file-message.sh @@ -2,6 +2,7 @@ TEMPLATE_FILE="$(dirname $0)/verify-script.template" +# TODO: argument for the message in case you want to apply it to many files. read -p "Enter message to sign for the file: " MESSAGE MESSAGE="$MESSAGE\n" #echo "message: $MESSAGE" diff --git a/readme.txt b/readme.txt index 8febc74..2734ab6 100644 --- a/readme.txt +++ b/readme.txt @@ -1,3 +1,9 @@ +This simple script takes a file as an argument and prompts the user for a message. Then a new script is created alongside the target file as {filename}.sh which has the message and file hash embedded. You would then sign the script file and distribute all three. + +To verify that your message applies to the file they recieved, your recipient(s) would verify your signature of the script, and then run it (or merely inspect it if they don't trust you too much) which will confirm their file matches the one you wrote the message about. + +Motivation: + Signing a file typically means "I authored this", but sometimes you want to sign something else, for example to indicate that you retrieved something on a given date. However, just signing the file can't really convey that meaning. There are probably plenty of potential formats that could deal with this, but one very simple method is to create a bash file associated with the file you want to attest and have a message + file hash embedded in the script. Then you can sign the script which ties the message to the specific version of the file. Whoever recieves the trio of files would verify the script with the signature, then run the script which would output the message if the target file matches the embedded hash. \ No newline at end of file