SSL folder #1
This commit is contained in:
commit
a0f2aff23d
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "missing arguments {in_file} {in_signature}" && exit;
|
||||
fi;
|
||||
|
||||
openssl dgst -sha512 -verify ./keys/key.pub -signature $2 $1;
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "missing arguments {in_encrypted} {out_decrypted}" && exit;
|
||||
fi;
|
||||
|
||||
|
||||
openssl enc -aes-256-cbc -d -in $1 -out $2;
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "missing arguments {in_file} {out_encrypted}" && exit;
|
||||
fi;
|
||||
|
||||
|
||||
openssl enc -aes-256-cbc -in $1 -out $2;
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
# create private key (ecdsa:521)
|
||||
openssl ecparam -genkey -name secp256k1 -noout -out ./keys/key;
|
||||
|
||||
# generate public key
|
||||
openssl ec -in ./keys/key -pubout -out ./keys/key.pub;
|
|
@ -0,0 +1,5 @@
|
|||
-----BEGIN EC PRIVATE KEY-----
|
||||
MHQCAQEEIG41CO5zSQGJhe+Ft/r8VEZud7baXI7FiQgoSy7cM+1NoAcGBSuBBAAK
|
||||
oUQDQgAE6ACA5jxI8MXDuFGsXBaslk7vOR4Jq3m2qaYGkFM7o8bEhpil2CgCFOPW
|
||||
ACOFlMiQEkVU7T/KphK78dyosClHIA==
|
||||
-----END EC PRIVATE KEY-----
|
|
@ -0,0 +1,4 @@
|
|||
-----BEGIN PUBLIC KEY-----
|
||||
MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAE6ACA5jxI8MXDuFGsXBaslk7vOR4Jq3m2
|
||||
qaYGkFM7o8bEhpil2CgCFOPWACOFlMiQEkVU7T/KphK78dyosClHIA==
|
||||
-----END PUBLIC KEY-----
|
Loading…
Reference in New Issue