• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

build-aux/H05-Mar-2015-15,30811,864

m4/H05-Mar-2015-8,9688,081

tests/H05-Mar-2015-1,2881,041

AUTHORSH A D11-May-2012254 96

COPYINGH A D11-May-20121.3 KiB2722

ChangeLogH A D05-Mar-201518.6 KiB790417

INSTALLH A D05-Mar-201515.4 KiB371289

Makefile.amH A D21-Jan-20153.5 KiB11159

Makefile.inH A D05-Mar-201540.4 KiB1,1871,037

NEWSH A D05-Mar-20152.3 KiB6348

READMEH A D26-Nov-20144.4 KiB157127

THANKSH A D11-May-2012271 97

aclocal.m4H A D05-Mar-201543.2 KiB1,2191,109

configureH A D05-Mar-2015422.2 KiB14,58712,204

configure.acH A D21-Jan-20153.6 KiB10389

libyubikey.mapH A D11-Jun-20141.8 KiB5752

modhex.1H A D05-Mar-20152.2 KiB10378

modhex.cH A D26-Nov-20144.3 KiB182123

simple.mkH A D11-May-20121.8 KiB4811

ykaes.cH A D26-Nov-20149.8 KiB300207

ykcrc.cH A D26-Nov-20141.8 KiB5519

ykgenerate.1H A D05-Mar-20152.2 KiB8762

ykgenerate.cH A D26-Nov-20144.3 KiB14491

ykhex.cH A D26-Nov-20143.1 KiB13081

ykparse.1H A D05-Mar-20151.9 KiB6540

ykparse.cH A D26-Nov-20144.4 KiB15296

yktoken.cH A D26-Nov-20142 KiB5317

yubikey.hH A D26-Nov-20144.6 KiB13750

README

1YubiKey C Library: libyubikey
2=============================
3
4This package make up the low-level C software development kit for the
5Yubico https://www.yubico.com[YubiKey] authentication device.
6
7Building
8--------
9
10After downloading and unpacking the package tarball, you build it as
11follows.
12
13  ./configure
14  make check
15  sudo make install
16
17Another way to build the package is with a hand written short
18makefile, invoke using 'make -f simple.mk check'.  This is usually not
19recommended, and you will have to read simple.mk for further
20information.
21
22Building from version controlled sources
23----------------------------------------
24
25Warning!  This is only for developers and if you don't understand what
26you are doing, you should download the release files instead.
27
28You may check out the sources using Git with the following command:
29
30  git clone git://github.com/Yubico/yubico-c.git
31
32This will create a directory 'yubico-c'.  Enter the directory:
33
34  cd yubico-c
35
36Recent versions of autoconf, automake and libtool must be installed,
37if you want to use the normal ./configure based approach.  AsciiDoc's
38a2x tool is also required for building the man pages.  (See simple.mk
39if you want a slimmed down non-autoconf build approach.)
40
41Generate the build system:
42
43  autoreconf --install
44
45Then refer to the user sections above regarding building.
46
47Command-line tools
48------------------
49
50The 'modhex' program converts data between modhex, normal hex, and
51binary form.
52
53The 'ykparse' program decrypts and parses one OTP given the OTP and
54the AES key corresponding to that YubiKey.
55
56The 'ykgenerate' program constructs and encrypts one OTP given AES key
57and internal data values.
58
59Example usage:
60
61[source, sh]
62-------
63  $ ./modhex test
64  ifhgieif
65  $ ./modhex -d ifhgieif; echo
66  test
67  $ ./modhex -h b565716f
68  nghgibhv
69  $ ./modhex -h -d nghgibhv
70  b565716f
71  $ ./ykparse ecde18dbe76fbd0c33330f1c354871db dteffujedcflcindvdbrblehecuitvjkjevvehjd
72  warning: overlong token, ignoring prefix: dteffuje
73  Input:
74    token: dcflcindvdbrblehecuitvjkjevvehjd
75            20 4a 07 b2 f2 1c 1a 36 30 e7 df 89 83 ff 36 82
76    aeskey: ecde18dbe76fbd0c33330f1c354871db
77            ec de 18 db e7 6f bd 0c 33 33 0f 1c 35 48 71 db
78  Output:
79            87 92 eb fe 26 cc 13 00 a8 c0 00 10 b4 08 6f 5b
80
81  Struct:
82    uid: 87 92 eb fe 26 cc
83    counter: 19 (0x0013)
84    timestamp (low): 49320 (0xc0a8)
85    timestamp (high): 0 (0x00)
86    session use: 16 (0x10)
87    random: 2228 (0x8b4)
88    crc: 23407 (0x5b6f)
89
90  Derived:
91    cleaned counter: 19 (0x0013)
92    modhex uid: jikdunvudhrr
93    triggered by caps lock: no
94    crc: F0B8
95    crc check: ok
96  $ ./ykparse ecde18dbe76fbd0c33330f1c354871db dteffujehknhfjbrjnlnldnhcujvddbikngjrtgh
97  warning: overlong token, ignoring prefix: dteffuje
98  Input:
99    token: hknhfjbrjnlnldnhcujvddbikngjrtgh
100            69 b6 48 1c 8b ab a2 b6 0e 8f 22 17 9b 58 cd 56
101    aeskey: ecde18dbe76fbd0c33330f1c354871db
102            ec de 18 db e7 6f bd 0c 33 33 0f 1c 35 48 71 db
103  Output:
104            87 92 eb fe 26 cc 13 00 30 c2 00 11 c8 9f 23 c8
105
106  Struct:
107    uid: 87 92 eb fe 26 cc
108    counter: 19 (0x0013)
109    timestamp (low): 49712 (0xc230)
110    timestamp (high): 0 (0x00)
111    session use: 17 (0x11)
112    random: 40904 (0x9fc8)
113    crc: 51235 (0xc823)
114
115  Derived:
116    cleaned counter: 19 (0x0013)
117    modhex uid: jikdunvudhrr
118    triggered by caps lock: no
119    crc: F0B8
120    crc check: ok
121  $ ./ykgenerate ecde18dbe76fbd0c33330f1c354871db 8792ebfe26cc 0013 c0a8 00 10
122  hcfktknicvbcnhbkvigcfhgddhhhrknc
123  $ ./ykparse ecde18dbe76fbd0c33330f1c354871db `./ykgenerate ecde18dbe76fbd0c33330f1c354871db 8792ebfe26cc 0013 c0a8 00 10`
124  Input:
125    token: lihggvrgffbjnrehcgnkvknjkvubeekr
126            a7 65 5f c5 44 18 bc 36 05 b9 f9 b8 9f e1 33 9c
127    aeskey: ecde18dbe76fbd0c33330f1c354871db
128            ec de 18 db e7 6f bd 0c 33 33 0f 1c 35 48 71 db
129  Output:
130            87 92 eb fe 26 cc 13 00 a8 c0 00 10 95 44 ec e9
131
132  Struct:
133    uid: 87 92 eb fe 26 cc
134    counter: 19 (0x0013)
135    timestamp (low): 49320 (0xc0a8)
136    timestamp (high): 0 (0x00)
137    session use: 16 (0x10)
138    random: 17557 (0x4495)
139    crc: 59884 (0xe9ec)
140
141  Derived:
142    cleaned counter: 19 (0x0013)
143    modhex uid: jikdunvudhrr
144    triggered by caps lock: no
145    crc: F0B8
146    crc check: ok
147  $
148-------
149
150License
151-------
152
153The project is licensed under a BSD license.  See the file COPYING for
154exact wording.  For any copyright year range specified as YYYY-ZZZZ in
155this package note that the range specifies every single year in that
156closed interval.
157