0.2.19 • Published 9 years ago
eccrypto-scripts v0.2.19
eccrypto-scripts
testing
brew install bats
./testsfunctions
# decrypt
./decrypt "$private_key" \
"$input_vector" \
"$ephemeral_public_key" \
"$mac" \
"$cipher_text" > decrypted.json
# or
echo -n $ciphertext | ./decrypt "$private_key" \
"$input_vector" \
"$ephemeral_public_key" \
"$mac" > decrypted.json
# derive
./derive "$private_key" "$public_key" > shared_secret.json
# encrypt
cat my-message.txt | ./encrypt "$public_key" > encrypted.json
# or
./encrypt "$public_key" "$message" > encrypted.json
# sign
cat my-message.txt | ./sign "$private_key" > signature.json
# or
./sign "$private_key" "$message" > signature.json
# verify
cat my-message.txt | ./verify "$public_key" "$signature" > verification.json
# or
./verify "$public_key" \
"$signature" \
"$message" > verification.json
# new-keypair
./new-keypair > my-keypair.json
# or
./new-keypair --plain my-keypair.txtall together now...
# this snippet requires jq (https://github.com/stedolan/jq)
read -r pub_a priv_a <<< $(./bin/new-keypair --plain)
read -r pub_b priv_b <<< $(./bin/new-keypair --plain)
./bin/encrypt $pub_a < file-from-b > encrypted_a
signable_a="${pub_a}|$(cat encrypted_a)"
read -r signature_b <<< $(echo -n $signable_a | ./bin/sign $priv_b | jq -r -c -M '.signature')
echo -n $signable_a | ./bin/verify $pub_b $signature_b
read -r iv_a ep_a ct_a mc_a <<< $(cat encrypted_a | jq -r -c -M '.iv, .ephemPublicKey, .ciphertext, .mac')
echo -n $ct_a | ./bin/decrypt $priv_a $iv_a $ep_a $mc_a0.2.19
9 years ago
0.2.18
10 years ago
0.2.17
10 years ago
0.2.15
10 years ago
0.2.14
10 years ago
0.2.12
10 years ago
0.2.10
10 years ago
0.2.9
10 years ago
0.2.8
10 years ago
0.2.7
10 years ago
0.2.6
10 years ago
0.2.5
10 years ago
0.2.4
10 years ago
0.2.3
10 years ago
0.2.2
10 years ago
0.2.1
10 years ago
0.2.0
10 years ago
0.1.2
10 years ago
0.1.1
10 years ago
0.1.0
10 years ago