security: ass signing and signature verification tool
modulus and exponent can be generated and obtained as follows:
$ssh-keygen -b 2048 -t rsa -P "" -f YOURKEY
$openssl rsa -in YOURKEY -text -noout
TESTING:
$ echo -n "valid hash is " && echo Hello | sha256sum
valid hash is 66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18 -
$ echo Hello | ./nanohub_sign sign test_exponent test_modulus > signature
Reading data to sign... read 6 bytes
Retriculating splines...DONE
success
$ ./nanohub_sign sigdecode test_modulus < signature
66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18
$ dd if=/dev/zero of=signature bs=1 count=1 conv=notrunc
$ ./nanohub_sign sigdecode test_modulus < signature
Padding header is invalid
Change-Id: I48688860711153da2b529f109fd763f065b24be5
4 files changed