Extracted from libyubikey-1.5/debian/control:
=============================================
libyubikey-dev - Yubikey OTP library development files
Yubikeys are USB tokens that act like keyboards and generate one-time
passwords. The tokens are produced and sold by Yubico
This library is used for decrypting the one-time passwords into their
various components.
This package contains the necessary files for developing using libyubikey.
libyubikey0 - Yubikey OTP handling library runtime
Yubikeys are USB tokens that act like keyboards and generate one-time
passwords. The tokens are produced and sold by Yubico
This library is used for decrypting the one-time passwords into their
various components.
This package contains the runtime library for libyubikey.
Extracted from libyubikey-1.5/debian/changelog:
===============================================
libyubikey (1.5-1) unstable; urgency=low
* New upstream release
- Use a linker script to only expose symbols we want to expose
- Add new APIs to check validity of hex/modhex strings
* Update symbols file to match the versioned objects
* Build in a subdirectory rather than in the source directory.
* Run tests too.
-- Tollef Fog Heen <tfheen@NOSPAM> Sat, 05 Sep 2009 10:05:40 +0200
libyubikey (1.4-1) unstable; urgency=low
* Initial release.
-- Tollef Fog Heen <tfheen@NOSPAM> Wed, 22 Jul 2009 21:33:05 +0200
libyubikey-1.5/debian/copyright:
================================
This package was debianized by Tollef Fog Heen <tfheen@NOSPAM> on
Wed, 22 Jul 2009 21:33:05 +0200.
It was downloaded from http://code.google.com/p/yubico-c/
Upstream Author:
Simon Josefsson <simon@NOSPAM>
Copyright (c) 2006, 2007, 2008, 2009 Yubico AB
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
libyubikey-1.5/README:
======================
#summary Introduction to low-level Yubikey C library
#labels Featured,Phase-Deploy
= Introduction =
This package make up the low-level C software development kit for the
Yubico authentication device, the Yubikey. In particular:
* AUTHORS, COPYING, NEWS, README: meta-information about the project.
* yubikey.h: Prototypes for library.
* ykparse.c, ykmodhex.c, ykhex.c, ykcrc.c, ykaes.c: Library implementation.
* selftest.c: Library self tests.
* ykdebug.c: Command line tool to print debug information about a token.
* modhex.c: Command-line tool for modhex encoding/decoding.
* simple.mk: Simple makefile to build the above parts.
* configure.ac, Makefile.am: Autoconf/Automake files.
== Building from SVN ==
Skip to the next section if you are using an official packaged
version, which is what we recommend.
You may check out the sources using SVN with the following command:
{{{
svn checkout http://yubico-c.googlecode.com/svn/trunk/ yubico-c
}}}
This will create a directory 'yubico-c'. Enter the directory:
{{{
cd yubico-c
}}}
Autoconf, automake and libtool must be installed.
Generate the build system using:
{{{
autoreconf --install
}}}
= Building =
To build using the Autoconf, automake and libtool infrastructure,
which is recommend for more advanced purposes especially for
cross-compilation and shared library support, build it as follows.
{{{
$ ./configure
$ make check install
}}}
Another way to build the package is by running 'make -f simple.mk
check'. It will build each component, and also test it. See below
for sample session. This is useful if you want to target a platform
that doesn't support Autoconf/automake/libtool well.
{{{
jas@mocca:~/src/yubico-c$ make -f simple.mk check
cc -I. -Wall -g -c -o ykparse.o ykparse.c
cc -I. -Wall -g -c -o ykmodhex.o ykmodhex.c
cc -I. -Wall -g -c -o ykhex.o ykhex.c
cc -I. -Wall -g -c -o ykcrc.o ykcrc.c
cc -I. -Wall -g -c -o ykaes.o ykaes.c
cc -I. -Wall -g modhex.c ykparse.o ykmodhex.o ykhex.o ykcrc.o ykaes.o yubikey.h -o modhex
cc -I. -Wall -g ykdebug.c ykparse.o ykmodhex.o ykhex.o ykcrc.o ykaes.o yubikey.h -o ykdebug
cc -I. -Wall -g selftest.c ykparse.o ykmodhex.o ykhex.o ykcrc.o ykaes.o yubikey.h -o selftest
selftest.c: In function ‘main’:
selftest.c:65: warning: pointer targets in passing argument 1 of ‘yubikey_aes_decrypt’ differ in signedness
selftest.c:65: warning: pointer targets in passing argument 2 of ‘yubikey_aes_decrypt’ differ in signedness
./selftest
modhex-encode("test") = ifhgieif
Modhex-1 success
modhex-decode("ifhgieif") = test
Modhex-2 success
hex-encode("test") = 74657374
Hex-1 success
hex-decode("74657374") = test
Hex-2 success
aes-decrypt (data=0123456789abcdef, key=abcdef0123456789)
=> 838a467f34639551755bd32a4a2f15e1
AES-1 success
jas@mocca:~/src/yubico-c$
}}}
= Command-line tools =
Two command line tools, modex and ykdebug, are included.
The "modhex" program converts data between modhex, normal hex, and
binary form.
The "ykdebug" program decrypts and parses one OTP given the OTP and
the AES key corresponding to that Yubikey.
{{{
$ ./modhex test
ifhgieif
$ ./modhex -d ifhgieif
test
$ ./modhex -h b565716f
nghgibhv
$ ./modhex -h -d nghgibhv
b565716f
$ ./ykdebug ecde18dbe76fbd0c33330f1c354871db dteffujedcflcindvdbrblehecuitvjkjevvehjd
warning: overlong token, ignoring prefix: dteffuje
Input:
token: dcflcindvdbrblehecuitvjkjevvehjd
20 4a 07 b2 f2 1c 1a 36 30 e7 df 89 83 ff 36 82
aeskey: urtubjtnuihvntcreeeecvbregfjibtn
ec de 18 db e7 6f bd 0c 33 33 0f 1c 35 48 71 db
Output:
87 92 eb fe 26 cc 13 00 a8 c0 00 10 b4 08 6f 5b
Struct:
uid: 87 92 eb fe 26 cc
counter: 19 (0x0013)
timestamp (low): 49320 (0xc0a8)
timestamp (high): 0 (0x00)
session use: 16 (0x10)
random: 2228 (0x8b4)
crc: 23407 (0x5b6f)
Derived:
cleaned counter: 19 (0x0013)
modhex uid: jikdunvudhrr
triggered by caps lock: no
crc: F0B8
crc check: ok
$ ./ykdebug ecde18dbe76fbd0c33330f1c354871db dteffujehknhfjbrjnlnldnhcujvddbikngjrtgh
warning: overlong token, ignoring prefix: dteffuje
Input:
token: hknhfjbrjnlnldnhcujvddbikngjrtgh
69 b6 48 1c 8b ab a2 b6 0e 8f 22 17 9b 58 cd 56
aeskey: urtubjtnuihvntcreeeecvbregfjibtn
ec de 18 db e7 6f bd 0c 33 33 0f 1c 35 48 71 db
Output:
87 92 eb fe 26 cc 13 00 30 c2 00 11 c8 9f 23 c8
Struct:
uid: 87 92 eb fe 26 cc
counter: 19 (0x0013)
timestamp (low): 49712 (0xc230)
timestamp (high): 0 (0x00)
session use: 17 (0x11)
random: 40904 (0x9fc8)
crc: 51235 (0xc823)
Derived:
cleaned counter: 19 (0x0013)
modhex uid: jikdunvudhrr
triggered by caps lock: no
crc: F0B8
crc check: ok
$
}}}
= Questions? =
Talk to <simon@NOSPAM>.
Name Last modified Size
Parent Directory -
DOT/ 19-Jan-2010 17:43 -
Contents-amd64 19-Jan-2010 17:43 889
Contents-amd64.bz2 19-Jan-2010 17:43 207
Contents-amd64.gz 19-Jan-2010 17:43 182
libyubikey-dev_1.5-1_amd64.deb 20-Dec-2009 23:48 8.3K
libyubikey0_1.5-1_amd64.deb 20-Dec-2009 23:48 7.6K
libyubikey_1.5-1.diff.gz 20-Dec-2009 23:48 2.7K
libyubikey_1.5-1.dsc 20-Dec-2009 23:48 1.0K
libyubikey_1.5-1_amd64.build 20-Dec-2009 23:48 26K
libyubikey_1.5-1_amd64.changes 20-Dec-2009 23:48 2.2K
libyubikey_1.5.orig.tar.gz 05-Sep-2009 06:48 284K
override 20-Dec-2009 23:48 59
Packages 19-Jan-2010 17:43 1.3K
Packages.bz2 19-Jan-2010 17:43 645
Packages.gz 19-Jan-2010 17:43 544
Release 19-Jan-2010 17:43 844
Release.gpg 19-Jan-2010 17:43 189
Sources 19-Jan-2010 17:43 861
Sources.bz2 19-Jan-2010 17:43 572
Sources.gz 19-Jan-2010 17:43 520