VIDEO EXPLANATION: https://youtu.be/_uYRIrkq-KE
The repository root contains the file utils.sh, that contains sign, dhash and solve functions.
The sign function allows to produce the manifest (.manifest containing sha256 checksums) of target <folder-or-file>, and append one's own key's (~/.ssh/id_rsa) signature to the .sign file named with sha256 checksum of the .manifest file. It is useful when multiple parties want to create a list of signatures (.sign) file, proving their identity witness of folder or file content.
- Generate RSA keypair by:
ssh-keygen -m pem (if you don't already have one)
- Add the utils.sh content into
~/.bashrcand source it (run. ~/.bashrc), or alternatively -- reopen terminal.
For ZSH users:
- wget:
wget -Oq- https://raw.githubusercontent.com/mindey/ident/master/utils.sh -O ~/.sign.sh && chmod a+x ~/.sign.sh && echo ". ~/.sign.sh" >> ~/.zshrc - curl:
curl https://raw.githubusercontent.com/mindey/ident/master/utils.sh -o ~/.sign.sh && chmod a+x ~/.sign.sh && echo ". ~/.sign.sh" >> ~/.zshrc
For BASH users:
- wget:
wget -Oq- https://raw.githubusercontent.com/mindey/ident/master/utils.sh -O ~/.sign.sh && chmod a+x ~/.sign.sh && echo ". ~/.sign.sh" >> ~/.bashrc - curl:
curl https://raw.githubusercontent.com/mindey/ident/master/utils.sh -o ~/.sign.sh && chmod a+x ~/.sign.sh && echo ". ~/.sign.sh" >> ~/.bashrc
- Now, you can run:
sign <folder-or-file>
to produce signatures.
brew install coreutils
- Generate RSA keypair by:
ssh-keygen -m pem (if you don't already have one)
- Add the utils.sh content into
~/.profileand source it (run. ~/.profile), or alternatively -- reopen terminal.
For BASH users:
- curl:
curl https://raw.githubusercontent.com/mindey/ident/master/utils.sh -o ~/.sign.sh && chmod a+x ~/.sign.sh && echo ". ~/.sign.sh" >> ~/.bashrc
Now, you can run:
sign <folder-or-file>
to produce signatures.
-
Install git-bash on Windows
-
Generate RSA keypair by:
ssh-keygen -m pem (if you don't already have one)
(-m parameter is important, it doesn't work otherwise generated keys)
-
Add the utils.sh content into
~/.bashrcand source it (run. ~/.bashrc), or alternatively -- reopen terminal. -
Disable Thumbs.db, as described in here.
For BASH users:
- curl:
curl https://raw.githubusercontent.com/mindey/ident/master/utils.sh -o ~/.sign.sh && chmod a+x ~/.sign.sh && echo ". ~/.sign.sh" >> ~/.bashrc
Now, you can run:
sign <folder-or-file>
to produce signatures in the .sign file.
pip install ident
Once you have accumulated all the signatures, and want to do final verification of the signing integrity, answer "Y" to the question at the end:
Rename folder to the hash value for final verification? [y/N] Y
Then, the folder or file signed will be renamed, and you can run the verify command from the Python3 pip install ident package, like so:
verify -d <folder-or-file> -s <signature-file>.sig
$ verify -d 0bd263b05fa66f00aa8d963c310645624391e1af7a2efa0a30610e4dd791cd3f -s 63d1b91908456f6a42dc2a17ebec0d7668451804c8c9d944b99dd4b57f4302d4.sign
[OK] Manifest (.manifest) hash is in .sign filename.
[OK] Manifest (.manifest) hashes match folder's file hashes.
Verifying signatures one by one:
- mindey@world: [YES]
All signatures are valid.
Final hash is correct, and is as folder's name:
0bd263b05fa66f00aa8d963c310645624391e1af7a2efa0a30610e4dd791cd3f
(It is safe to write it to blockchain, as proof of data witness.)