Yubico Forum

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

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Yubikey Ruby Gem
PostPosted: Fri Apr 03, 2009 3:00 am 
Offline

Joined: Fri Mar 27, 2009 11:08 pm
Posts: 1
I've written a rubygem that decodes, decrypts, and parses Yubikey OTPs.

Install it by running
Code:
sudo gem install yubikey

The source is available at http://github.com/titanous/yubikey

The gem wraps the C library for ModHex decoding, AES decryption, and CRC verification.

Let me know if you have questions.


Top
 Profile  
Reply with quote  

Share On:

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

 Post subject: Re: Yubikey Ruby Gem
PostPosted: Mon Jul 16, 2012 6:05 pm 
Offline

Joined: Mon Jul 16, 2012 5:59 pm
Posts: 1
Titanous wrote:
I've written a rubygem that decodes, decrypts, and parses Yubikey OTPs.

Install it by running
Code:
sudo gem install yubikey

The source is available at http://github.com/titanous/yubikey

The gem wraps the C library for ModHex decoding, AES decryption, and CRC verification.

Let me know if you have questions.


I went to https://upgrade.yubico.com/getapikey/ and generated a secret key. This key looks like AES because it ends with an = sign.

I tried this key when calling Yubikey::OTP.new(otp, key) and I get the following error.

Yubikey::OTP::InvalidKeyError: Key must be 32 hex characters

I then went to http://demo.yubico.com/php-yubico/Modhex_Calculator.php and tried a bunch of different combinations but the results are the same.

HELP! :(


Top
 Profile  
Reply with quote  
 Post subject: Re: Yubikey Ruby Gem
PostPosted: Mon Aug 06, 2012 8:26 am 
Offline
Site Admin
Site Admin

Joined: Thu Apr 19, 2012 1:45 pm
Posts: 148
Hello,

That code looks to be for decrypting OTPs, not verifying them. If you look at https://github.com/titanous/yubikey there is an example for verifying OTP with Yubikey::OTP::Verify

/klas


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