Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 7:49 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Jan 02, 2015 2:01 am 
Offline

Joined: Fri Jan 02, 2015 1:45 am
Posts: 1
I'm just getting started with Yubikey, and with smart cards in general, so this might be a dumb question. I am trying to perform what should be a simple operation: digitally sign something using the Yubikey, and then verify the signature using OpenSSL.

I have generated an ECDSA-256 certificate request in slot 9a, issued the certificate, and installed it. I am then generating a digital signature for a file using:

Code:
#pkcs11-tool --module /usr/lib/i386-linux-gnu/opensc-pkcs11.so --sign --input-file=Downloads/test_file --output-file=test_file.sig
Using slot 1 with a present token (0x1)
Logging in to "PIV_II (PIV Card Holder pin)".
Please enter User PIN:
Using signature algorithm ECDSA
Writing OpenSSL ECDSA_SIG


So far, so good. This generated a file with a length of 70 bytes.

Now I try to verify the signature using OpenSSL. I have extracted the public key for my certificate into the file "yubikey.pubkey" previously:
Code:
#openssl dgst -verify yubikey.pubkey -signature test_file.sig test_file
Verification Failure


Am I way off the mark in what I'm trying to do here? Any ideas? Thanks!


Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group