Yubico Forum
https://forum.yubico.com/

Yubikey Ruby Gem
https://forum.yubico.com/viewtopic.php?f=8&t=305
Page 1 of 1

Author:  Titanous [ Fri Apr 03, 2009 3:00 am ]
Post subject:  Yubikey Ruby Gem

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.

Author:  gigdates [ Mon Jul 16, 2012 6:05 pm ]
Post subject:  Re: Yubikey Ruby Gem

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! :(

Author:  Klas [ Mon Aug 06, 2012 8:26 am ]
Post subject:  Re: Yubikey Ruby Gem

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

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/