Yubico Forum

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

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Nov 22, 2010 4:09 pm 
Offline

Joined: Mon Nov 22, 2010 4:02 pm
Posts: 14
Location: Germany
Dear forum members,

I got an authentication backend doing 2 factor authentication and one time passwords.
I'd like to do the personalization of the yubikey directly from within my application. I am used to do it with smartcards where you got the pkcs11 interface. In the pkcs11 case you can write one code with one kind of API
calls, that might run on windows, linux and maybe on mac os ;-) if the pkcs11 library is available for those operating systems.

I took a glance at the personalization tool code under linux and it looks like, that there is no such library for the yubikey. The
personalization tool for linux e.g. defines all the functions by itself:

Code:
yk_init() is not defined in a library but in ykpers.c.
yk_write_config() ...


and so on and so on.

Wouldn't it be easier to define those "top-level" function in a yubikey library that would be available for linux and windows... (at least easier for me ;-)

If I missed something at this point, I am happy to be pointed to the right direction.

Kind regards
Cornelius


Top
 Profile  
Reply with quote  

Share On:

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

PostPosted: Wed Nov 24, 2010 4:17 pm 
Offline
Yubico Team
Yubico Team

Joined: Mon Feb 22, 2010 9:49 am
Posts: 183
A Yubico Personalization Library which can be complied on Linux, MAC and Windows platform already exists. The Library can be found at the link below:

http://code.google.com/p/yubikey-personalization/

Yubico is also working on a unified user interface to reprogram the YubiKey which will work on all Linux, MAC and Windows platform.
We will update you once it is available.


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 24, 2010 5:54 pm 
Offline

Joined: Mon Nov 22, 2010 4:02 pm
Posts: 14
Location: Germany
Hi Samir,

thanks for your reply. Maybe I get something wrong or maybe I am not the double plus perfect C programmer. (At least I know the last is true ;-)

Obviously this is exactly what is used for the ubuntu package yubikey-personalization.
And the functions of interest are contained in the ykpers.c file. Which will be compiled and statically linked into the command line tool ykpersonalize.

But I do not want to compile these functions statically but I'd rather use a shared library. In fact, i can not compile it into my project, since it is a python programm. And there I'd like to use a .so or .dll. And I'd like to do the same function calls for Linux and Windows.

When I take a look at ykpersonalize.c to get an idea which functions need to be called, those functions are not contained in any shared lib. I modified a ykpersonalize.c this way, to make it easy in some simple steps to enroll a YK with HOTP without userinteraction - this would be:

Code:
yk_init()
yk = yk_open_first_key()
yk_get_status(yk, st)
yk_check_firmware_version(yk)
ykp_configure_for(cfg, 1, st)
ykp_set_tktflag_OATH_HOTP(cfg, true)
ykp_write_config(cfg, writer, stderr)
yk_write_config(yk,ykp_core_config(cfg), ykp_config_num(cfg),use_access_code ? access_code : NULL)

done.

Again, I'd like to have those necessary functions in a shared lib (so/dll). What do you think about this?

Kind regards
Cornelius


Kind regards
Cornelius


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 5 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