Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 11:44 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Jun 06, 2013 3:32 pm 
Offline

Joined: Thu Jun 06, 2013 2:14 pm
Posts: 7
Hi again,

I am trying to understand how to implement OTP validation in a PHP web application which has no internet access, so it must not use the online Yubico validation server.

I am not much concerned with the actual code, rather with the logical flow validation must follow.

Suppose that a YubiKey is configured as follows:

Code:
Public ID: dd kg ub uh uh rv
Private ID: 54 e6 a5 4a cd 40
AES Key: b3 e1 86 d6 89 39 cb 99 8b 73 be 4b 8a 21 23 b9


And that the web-app recieves the following OTP:

Code:
ddkgubuhuhrvnclikhifnkbeifiuihdkkbcdgrlubvdg


How do I then proceed validating it?

Until now, here is what I have done:

1. split the OTP in Public ID (ddkgubuhuhrv) and actual OTP (nclikhifnkbeifiuihdkkbcdgrlubvdg)
2. convert OTP from ModHex to binary, by first "translating" it to standard hexadecilmal and then to binary
3. decode the binary using the AES key, obtaining a new binary string

But now, how do I go on?

I have read the manual that I should perform a CRC16 check, so I found a PHP implementation of it, but on which string should I call it? And after that?

Thanks in advance for your help.


Top
 Profile  
Reply with quote  

Share On:

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

PostPosted: Mon Jun 17, 2013 10:14 am 
Offline
Site Admin
Site Admin

Joined: Wed Nov 14, 2012 2:59 pm
Posts: 666
You need this:
https://github.com/Yubico/php-yubico

and this:
https://github.com/Yubico/yubikey-val

and this if you do not have a HSM:
https://github.com/Yubico/yubikey-ksm

_________________
-Tom


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 17, 2013 10:34 am 
Offline

Joined: Thu Jun 06, 2013 2:14 pm
Posts: 7
Thanks for the hints, I'll download them and study them right away.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 17, 2013 11:42 am 
Offline
Site Admin
Site Admin

Joined: Wed Nov 14, 2012 2:59 pm
Posts: 666
You can use YubiRADIUS as alternative

https://www.yubico.com/products/service ... ubiradius/

_________________
-Tom


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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