Yubico Forum

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

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat Jan 29, 2011 10:05 pm 
Offline

Joined: Sat Jan 29, 2011 9:55 pm
Posts: 2
Hi there,

I try to integrate HMAC-SHA1 challenge-response into one of my programs.
So I set my config #2 to HMAC-SHA1, variable size, NIST test key (3031..43)
My first experiments are with the 'Sample YubiClientAPI test container'.
When I set the PutBuffer to 'Sample #2' and press 'hmacSha1' I get a different result every time I press the button, but never the NIST vector (0922...) which I should get according to the document 'Yubikey Client COM API' Version 1.0.
What am I doing wrong?
Why is the result changing and not static?
Is the manual wrong or the software?
Thank you for your help

Josef


Top
 Profile  
Reply with quote  

Share On:

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

PostPosted: Sun Jan 30, 2011 3:07 am 
Offline
Site Admin
Site Admin

Joined: Wed May 28, 2008 7:04 pm
Posts: 263
Location: Yubico base camp in Sweden - Now in Palo Alto
As there is only one buffer for both in- and out transaction, the input data must be written for each request. If sequential HMAC operations are performed, the input data is taken from the previous operation's out data and I guess that is why you experience this behavior.

In the sample client container, do the following steps:

1. Set data encoding to Ascii and click PutBuffer. The string "Sample #2" is written to the buffer

2. Set data encoding to hex (you can verify the data in hex by clicking GetBuffer, which then yields VT_BSTR 53616d706c65202332)

3. Check config #2

4. Press hmacSha1

5. The NIST string is displayed in the get field as VT_BSTR 0922d3405faa3d194f82a45830737d5cc6c75d24


The sample is maybe a bit unintuitive here so thanks for pointing this out. We shall update the manual.

Please let me know if this solved your problem.

Best regards,

JakobE
Hardware- and firmware guy @ Yubico


Top
 Profile  
Reply with quote  
PostPosted: Sun Jan 30, 2011 11:59 am 
Offline

Joined: Sat Jan 29, 2011 9:55 pm
Posts: 2
It works, thank you.
I also made the mistake to 'putbuffer' the NIST string in hex encoding.
One improvement of the test container could be, that it displays a warning if the user tries to 'putbuffer' something which is not valid according to the current data encoding.

Best regards,

Josef


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 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