gnuk/README

670 lines
19 KiB
Plaintext
Raw Normal View History

2011-05-13 02:59:05 +00:00
Gnuk - software for GnuPG USB Token
2010-08-30 11:02:22 +00:00
2012-06-06 00:05:24 +00:00
Version 0.19
2012-06-06
2012-05-15 01:16:25 +00:00
Niibe Yutaka
2010-09-05 16:55:29 +00:00
Free Software Initiative of Japan
2010-08-30 11:02:22 +00:00
2010-09-09 08:50:34 +00:00
What's Gnuk?
============
2010-08-30 11:02:22 +00:00
2010-11-02 03:37:13 +00:00
Gnuk is software implementation of a USB token for GNU Privacy Guard.
2011-12-13 05:25:07 +00:00
Gnuk supports OpenPGP card protocol version 2, and it runs on
STM32F103 processor.
2010-08-30 11:02:22 +00:00
2010-09-09 08:50:34 +00:00
I wish that Gnuk will be a developer's soother who uses GnuPG. I have
been nervous of storing secret key(s) on usual secondary storage.
2012-05-15 01:16:25 +00:00
There is a solution with OpenPGP card, but it is not the choice for me
to bring a card reader all the time. With Gnuk, this issue will be
2010-09-09 08:50:34 +00:00
solved by a USB token which is small enough.
2010-09-10 07:41:00 +00:00
Please look at the graphics of "gnuk.svg" for the software name. My
2011-06-14 23:52:02 +00:00
son used to be with his NUK(R), always, everywhere. I am with a USB
Token by "Gnuk", always, everywhere.
2011-05-11 02:50:00 +00:00
FAQ
===
2011-05-13 02:59:05 +00:00
Q0: How Gnuk USB Token is superior than other solutions (OpenPGP
2011-10-07 02:01:21 +00:00
card 2.0, GPF Crypto Stick, etc.) ?
2011-05-13 02:59:05 +00:00
http://www.g10code.de/p-card.html
http://www.privacyfoundation.de/crypto_stick/
2012-05-15 01:16:25 +00:00
A0: IMRHO, not quite, since there is no ready-to-use out-of-box Gnuk
product yet. (It is welcome for me that some vendor will
manufacture Gnuk USB Token. Even I can help design of hardware,
if needed.)
Good points for Gnuk are:
2011-05-13 02:59:05 +00:00
* If you have skill of electronics and like DIY, you can build
Gnuk Token cheaper (see Q8-A8).
* You can study Gnuk to modify and to enhance. For example, you
can implement your own authentication method with some sensor
such as acceleration sensor.
* It is "of Free Software"; Gnuk is distributed under GPLv3+,
2012-05-15 01:16:25 +00:00
"by Free Software"; Gnuk development requires only Free Software
(GNU Toolchain, Python, etc.),
2011-05-13 02:59:05 +00:00
"for Free Software"; Gnuk supports GnuPG.
2011-06-14 23:52:02 +00:00
Q1: What kind of key algorithm is supported?
2011-05-11 02:50:00 +00:00
A1: Gnuk only supports 2048-bit RSA.
Q2: How long does it take for digital signing?
2011-06-14 23:52:02 +00:00
A2: It takes a second and a half or so.
2011-05-11 02:50:00 +00:00
Q3: What's your recommendation for target board?
A3: Orthodox choice is Olimex STM32-H103.
If you have skill of electronics and like DIY, STM32 part of STM8S
Discovery Kit might be the best choice.
2011-10-07 02:01:21 +00:00
Currently FST-01 (Flying Stone Tiny 01) is under development,
it will be the best choice, hopefully.
2011-05-11 02:50:00 +00:00
Q4: What's version of GnuPG are you using?
2011-05-13 02:59:05 +00:00
A4: In Debian GNU/Linux system, I use gnupg 1.4.11-3 and gnupg-agent
2.0.14-2 (in sid). With older versions, you can only sign with SHA1.
See: http://www.fsij.org/gnuk/gnupg2-fixes-needed
2011-05-11 02:50:00 +00:00
Q5: What's version of pcscd and libccid are you using?
A5: In Debian GNU/Linux system, I use pcscd 1.5.5-4 and libccid 1.3.11-2,
which is in squeeze. Note that you need to edit /etc/libccid_Info.plist
when using libccid (< 1.4.1).
Q6: What kinds of hardware is required for development?
2011-05-13 02:59:05 +00:00
A6: You need a target board plus a JTAG debugger. If you just want to
2011-05-11 02:50:00 +00:00
test Gnuk for target boards with DfuSe, JTAG debugger is not
the requirement. Note that for real use, you need JTAG debugger
to enable flash ROM protection.
2010-09-10 01:52:07 +00:00
2011-05-13 02:59:05 +00:00
Q7: How much does it cost?
A7: Olimex STM32-H103 plus ARM-USB-TINY-H cost 70 Euro or so.
Q8: How much does it cost for DIY version?
A8: STM8S Discovery Kit costs 750 JPY (< $10 USD) only. You can build
your own JTAG debugger using FTDI2232 module (1450 JPY), see:
http://www.fsij.org/gnuk/jtag_dongle_ftdi2232
Q9: I got an error like "gpg: selecting openpgp failed: ec=6.108", what's up?
A9: GnuPG's SCDaemon has problems for handling insertion/removal of
card/reader (problems are fixed in trunk). When your newly
inserted token is not found by GnuPG, try killing scdaemon and let
it to be invoked again. I do:
$ killall -9 scdaemon
and confirm scdaemon doesn't exist, then,
$ gpg-connect-agent learn /bye
2012-05-15 01:16:25 +00:00
Qa: With GNOME 2, I can't use Gnuk Token for SSH. How can we use it for SSH?
2011-11-24 06:40:38 +00:00
Aa: You need to deactivate seahorse-agent and gnome-keyring, but use
gpg-agant for the role of ssh-agent. For gnome-keyring please do:
2011-12-13 05:25:07 +00:00
$ gconftool-2 --type bool --set /apps/gnome-keyring/daemon-components/ssh false
2011-11-24 06:40:38 +00:00
Qb: With GNOME 3, I can't use Gnuk Token at all. Why?
Ab: That's because gnome-keyring-daemon interferes GnuPG. Type:
2011-12-13 05:25:07 +00:00
$ gnome-session-properties
2011-11-24 06:40:38 +00:00
2011-12-13 05:25:07 +00:00
and at the tab of "Startup Programs", disable check buttons for
"GPG Password Agent" and "SSH Key Agent".
2011-11-24 06:40:38 +00:00
2012-02-02 05:09:38 +00:00
Qc: Do you know a good SWD debugger to connect FST-01 or something?
2012-06-06 00:05:24 +00:00
Ac: STLink v2 is cheap one. See http://code.google.com/p/arm-utilities/
for a control program.
2011-11-24 06:40:38 +00:00
2010-08-30 11:02:22 +00:00
Release notes
=============
2012-06-06 00:05:24 +00:00
This is twentieth release of Gnuk. In this release, firmware upgrade
feature is added. While it is daily use, some features (including
firmware upgrade) are still considered experimental.
2011-05-13 02:59:05 +00:00
2010-09-05 17:30:38 +00:00
Tested features are:
2010-09-05 09:10:54 +00:00
* Personalization of the card
* Changing Login name, URL, Name, Sex, Language, etc.
* Password handling (PW1, RC, PW3)
2010-11-05 09:25:47 +00:00
* Key import for three types:
* key for digital signing
* key for decryption
* key for authentication
2010-09-05 09:10:54 +00:00
* PSO: Digital Signature
2010-09-09 08:50:34 +00:00
* PSO: Decipher
2010-10-20 01:20:45 +00:00
* INTERNAL AUTHENTICATE
2011-05-13 02:59:05 +00:00
* Changing value of password status bytes (0x00C4): forcesig
2011-01-07 07:18:47 +00:00
* Verify with pin pad
2011-01-19 06:44:37 +00:00
* Modify with pin pad
2012-02-02 05:09:38 +00:00
* Card holder certificate
2012-05-15 01:16:25 +00:00
* Removal of keys (Overriding key import is not supported,
but you can remove all keys to import again).
2012-06-07 01:48:25 +00:00
* Key generation on device side
2011-01-19 06:44:37 +00:00
2010-09-09 08:50:34 +00:00
It is known not-working well:
2010-08-30 11:02:22 +00:00
2010-10-14 08:08:09 +00:00
* For some version of kernel and libccid, --enable-debug can't
2012-05-15 01:16:25 +00:00
work well. Please make sure to disable DEBUG option if it
doesn't work well.
2010-11-04 01:33:20 +00:00
2011-05-11 02:50:00 +00:00
2010-09-05 09:10:54 +00:00
Targets
=======
2010-08-30 11:02:22 +00:00
2011-11-14 05:34:51 +00:00
We use Olimex STM32-H103 board and Flying Stone Tiny 01 (FST-01). We
also use STM32 part of STM8S Discovery Kit.
2010-11-30 01:04:30 +00:00
2011-01-28 15:00:47 +00:00
With DfuSe support, CQ STARM, STBee, and STBee Mini are also our
targets. But those targets with DfuSe are basically not for normal
use but for experiments, because it would be impossible for DfuSe to
disable read from flash. For real use, please consider killing DfuSe
2012-06-06 00:05:24 +00:00
and enabling read protection using JTAG debugger.
2010-08-30 11:02:22 +00:00
2011-01-28 15:00:47 +00:00
I think that it could run on Olimex STM32-P103, or other boards with
STM32F103. Besides, we are porting it to STM32 Primer 2.
2010-08-30 11:02:22 +00:00
2011-01-14 06:47:15 +00:00
For PIN-pad support, I connect a consumer IR receive module to STBee
2011-01-19 06:44:37 +00:00
Mini and STM8S Discovery Kit, and use controller for TV. PIN
verification is supported by this configuration. Yes, it is not
secure at all, since it is very easy to monitor IR output of the
2011-01-28 15:00:47 +00:00
controllers. It is just an experiment. Note that hardware needed for
this experiment is only a consumer IR receive module which is as cheap
as 50 JPY.
2011-01-14 06:47:15 +00:00
2011-01-28 15:00:47 +00:00
Another PIN-pad support is connecting rotary encoder, push switch and
2011-01-19 06:44:37 +00:00
7-segment LED display. Both of PIN verification and PIN modification
are supported for this circuit extension.
2012-06-06 00:05:24 +00:00
Also, there is "DnDpinentry" support. This is using usual file
2011-12-13 05:25:07 +00:00
manager for pinentry. User does "drag and drop" folders and it will
be pin entry. This feature doesn't require any additional hardware.
See doc/settings-for-DnDpinentry for your desktop configuration.
2012-06-06 00:05:24 +00:00
However, this will be removed in future version, as it found it's
not that useful.
2011-12-13 05:25:07 +00:00
2012-06-06 00:05:24 +00:00
Note that you need pinpad support for GnuPG to use PIN-pad enabled
Gnuk. The pinpad support for GnuPG is currently in the master branch
of GnuPG git repository at git.gnupg.org, and it's under evaluation.
When it will be considered stable, it will be put onto stable branch.
2011-12-14 03:50:54 +00:00
2010-08-30 11:02:22 +00:00
2010-08-10 03:11:02 +00:00
Souce code
==========
2010-08-30 11:02:22 +00:00
Gnuk source code is under src/ directory.
License
=======
It is distributed under GNU General Public Licence version 3 or later
2010-09-13 02:47:21 +00:00
(GPLv3+). Please see src/COPYING.
Please note that it is distributed with external source code too.
Please read relevant licenses for external source code, too.
The author(s) of Gnuk expect users of Gnuk will be able to access the
2011-01-28 15:00:47 +00:00
source code of Gnuk, so that users can study the code and can modify
if needed. This doesn't mean person who has a USB Token by Gnuk
2012-06-06 00:05:24 +00:00
should be able to access everything on the Token, regardless of its
2011-10-06 08:02:37 +00:00
protections. Private keys, and other information should be protected
properly.
2010-08-30 11:02:22 +00:00
2010-08-10 03:11:02 +00:00
2010-08-30 11:02:22 +00:00
External source code
====================
2010-08-10 03:11:02 +00:00
2010-08-30 11:02:22 +00:00
Gnuk is distributed with external source code.
2010-11-30 04:54:43 +00:00
* ChibiOS_2.0.8/ -- ChibiOS/RT 2.0.8
2010-09-05 09:10:54 +00:00
Taken from http://chibios.sourceforge.net/
Note that CRLF is converted to LF in this repository.
We use ChibiOS/RT as the kernel for Gnuk.
2010-08-10 03:11:02 +00:00
2010-08-30 11:02:22 +00:00
* polarssl-0.14.0/ -- PolarSSL 0.14.0
2010-09-05 09:10:54 +00:00
Taken from http://polarssl.org/
2010-09-13 02:47:21 +00:00
We use PolarSSL for RSA computation, AES encryption/decryption
and SHA-1 computation.
2010-08-30 11:02:22 +00:00
2011-06-14 23:52:02 +00:00
The file include/polarssl/bn_mul.h is heavily modified for ARM
Cortex-M3.
2012-06-07 01:39:48 +00:00
The files include/polarssl/rsa.h, library/rsa.c,
include/polarssl/bignum.h, and library/bignum.c are modified so that
f_rng function returns unsigned char.
The file library/rsa.c is modified so that it only computes things
needed for Gnuk.
2012-05-30 09:50:22 +00:00
The file library/aes.c is modified so that some constants can
go to .sys section.
2010-08-18 05:21:58 +00:00
USB vendor ID and product ID (USB device ID)
============================================
2012-05-14 02:57:34 +00:00
When you have a vender ID and assign a product ID for Gnuk, edit the
file GNUK_USB_DEVICE_ID and add an entry for yours. In this case,
please contact Niibe, so that it is listed to the file in the official
2012-05-17 03:45:51 +00:00
release of the source code.
2012-05-14 02:57:34 +00:00
When you are modifing Gnuk and installing the binary to device, you
should replace "FSIJ" in the string gnukStringSerial (usb_desc.c) to
yours, so that the device will say it's modified version by device
serial number.
FSIJ allows you to use USB device ID of FSIJ (234b:0000) for devices
with Gnuk under one of following conditions:
2012-05-14 02:57:34 +00:00
* For everyone for experimental purpose:
- You must not distribute a binary with FSIJ's USB device ID, but
must use the binary by yourself only for your experiment. Note
that "Distributing binary" includes distributing a device which
holds the binary.
* For general individuals:
2012-05-14 02:57:34 +00:00
- You must use your Gnuk device with a card serial number which is
*not* by FSIJ. Easy one would be a card serial number generated
by chip unique ID.
* For individuals with explicit permission from FSIJ.
- You should have an assigned card serial number by FSIJ,
please use that number for your device.
(There a file 'GNUK_SERIAL_NUMBER' in the official release.)
2012-05-17 03:45:51 +00:00
FSIJ could give companies or business entities "second source
manufacturer" license to use USB device ID of FSIJ for devices with
unmodified version of Gnuk, provided they support Free Software and
respect users' freedom for computing. Please ask FSIJ for the
license.
Otherwise, companies which want to distribute Gnuk devices, please use
2012-05-17 03:45:51 +00:00
your own USB vendor ID and product ID. Note that please replace
"FSIJ" in the string gnukStringSerial (usb_desc.c) to yours, when you
modify Gnuk.
2010-09-09 16:25:44 +00:00
Host Requirements
=================
2012-02-02 05:09:38 +00:00
For GNU/Linux, libccid version >= 1.3.11 is recommended.
2010-09-09 16:25:44 +00:00
2010-09-13 02:47:21 +00:00
I think that it should not be requirment but the kernel version of my use is:
Linux version 2.6.32-5-686 (Debian 2.6.32-18) (ben@decadent.org.uk) (gcc version 4.3.5 (Debian 4.3.5-2) ) #1 SMP Sat Jul 24 02:27:10 UTC 2010
Linux 2.6.30 is known *NOT* working well with DEBUG option.
Linux 2.6.24 is known working well with DEBUG option.
2010-09-09 16:25:44 +00:00
2010-08-30 11:02:22 +00:00
How to compile
==============
2010-09-05 09:10:54 +00:00
You need GNU toolchain and newlib for 'arm-none-eabi' target.
2010-08-30 11:02:22 +00:00
2011-11-01 06:58:48 +00:00
See http://github.com/esden/summon-arm-toolchain/ (which includes fix
of binutils-2.21.1) for preparation of GNU Toolchain for
'arm-none-eabi' target.
# Note that we need to link correct C library (for string functions).
# For this purpose, Makefile.in contains following line:
#
# MCFLAGS= -mcpu=$(MCU) -mfix-cortex-m3-ldrd
#
# This should not be needed (as -mcpu=cortex-m3 means
# -mfix-cortex-m3-ldrd), but in practice it is needed for
# the configuration of patch-gcc-config-arm-t-arm-elf.diff in
# summon-arm-toolchain.
#
# In ChibiOS_2.0.8/os/ports/GCC/ARM/rules.mk, it specifies
# -mno-thumb-interwork option. This means that you should not
# link C library which contains ARM (not Thumb) code.
2010-08-30 11:02:22 +00:00
2010-10-14 08:08:09 +00:00
Change directory to `src':
2010-08-30 11:02:22 +00:00
$ cd gnuk-VERSION/src
2010-09-05 09:10:54 +00:00
2010-10-14 08:08:09 +00:00
Then, run `configure':
2010-09-05 09:10:54 +00:00
2012-05-14 02:57:34 +00:00
$ ./configure --vidpid=<VID:PID>
Here, you need to specify USB vendor ID and product ID. For FSIJ's,
2012-05-15 01:16:25 +00:00
it's: --vidpid=234b:0000 . Please read section 'USB vendor ID and
product ID' above.
2010-09-05 09:10:54 +00:00
Type:
2010-08-30 11:02:22 +00:00
$ make
Then, we will have "gnuk.elf".
2011-02-10 04:57:23 +00:00
How to install
==============
2010-08-30 11:02:22 +00:00
2010-11-02 03:37:13 +00:00
Olimex STM32-H103 board
-----------------------
2010-08-30 11:02:22 +00:00
If you are using Olimex JTAG-Tiny, type following to invoke OpenOCD:
$ openocd -f interface/olimex-jtag-tiny.cfg -f board/olimex_stm32_h103.cfg
Then, with another terminal, type following to write "gnuk.elf" to Flash ROM:
$ telnet localhost 4444
> reset halt
> flash write_image erase gnuk.elf
> reset
> exit
$
2010-11-02 03:37:13 +00:00
2011-11-14 05:34:51 +00:00
Flying Stone Tiny 01
--------------------
If you are using Flying Stone Tiny 01, you need a SWD writer. I am
using revision 946 of Simon Qian's Versaloon.
svn checkout -r 946 http://vsprog.googlecode.com/svn/trunk/
For OpenOCD, we need unofficial patch.
See the article of Versaloon Forum:
http://www.versaloon.com/bbs/viewtopic.php?p=16179
Type following to invoke OpenOCD:
$ openocd -f interface/vsllink.cfg -c "transport select swd" -c "swd_mode 2" -f target/stm32f1x.cfg
Then, with another terminal, type following to write "gnuk.elf" to Flash ROM:
$ telnet localhost 4444
> reset halt
> flash write_image erase gnuk.elf
> reset
> exit
$
2011-01-28 15:00:47 +00:00
STM8S Discovery Kit
-------------------
If you are using FTDI-2232D module and the connection is standard, type:
$ openocd -f interface/openocd-usb.cfg -f target/stm32.cfg
2011-02-10 04:57:23 +00:00
Initially, the flash ROM of the chip is protected. you need to do:
$ telnet localhost 4444
> reset halt
> stm32x unlock 0
> reset
> shutdown
$
and re-connect the board. Note that power-off / power-on sequence is
required to reset flash ROM.
Then, invoke OpenOCD again and telnet to connect OpenCD and write
image as above example of Olimex STM32-H103.
2011-01-28 15:00:47 +00:00
2010-11-02 03:37:13 +00:00
CQ STARM
--------
Put jumper for J6 to enable DfuSe. Connecting the board, and type:
# cd ../tool
# ./dfuse.py ../src/gnuk.hex
Then, remove the jumper and reset the board.
2011-01-28 15:00:47 +00:00
STBee and STBee Mini
--------------------
2010-11-02 03:37:13 +00:00
Reset the board with "USER" switch pushed. Type following to write
to flash:
# cd ../tool
# ./dfuse.py ../src/gnuk.hex
Then, reset the board.
2011-02-10 04:57:23 +00:00
How to protect flash ROM
========================
Invoke your OpenOCD and type:
$ telnet localhost 4444
> reset halt
> stm32x lock 0
> reset
> shutdown
After power-off / power-on sequence, the contents of flash ROM cannot
be accessible from JTAG debugger.
Note that it would be still possible for some implementation of DfuSe
to access the contents. If you want to protect, killing DfuSe and
accessing by JTAG debugger is recommended.
How to configure
================
2011-05-11 07:48:08 +00:00
You need python and pyscard (python-pyscard package in Debian) or
PyUSB (python-usb package in Debian).
2011-02-10 04:57:23 +00:00
2011-10-06 08:02:37 +00:00
(1) [pyscard] Stop scdaemon
2011-05-11 07:48:08 +00:00
[PyUSB] Stop the pcsc daemon.
If scdaemon is running, please kill it, or you will get "Smartcard
Exception" by "Sharing violation".
$ killall -9 scdaemon
In case of PyUSB tool, you need to stop pcscd.
2011-02-10 04:57:23 +00:00
# /etc/init.d/pcscd stop
2011-05-11 07:48:08 +00:00
2011-10-06 08:02:37 +00:00
(2) [Optional] Write fixed serial number
2011-02-10 04:57:23 +00:00
If you use fixed serial number in the file 'GNUK_SERIAL_NUMBER', you can do:
2011-05-12 02:04:14 +00:00
$ EMAIL=<YOUR-EMAIL-ADDRESS> ../tool/gnuk_put_binary.py -s ../GNUK_SERIAL_NUMBER
2011-02-24 06:54:40 +00:00
Writing serial number
...
2011-02-10 04:57:23 +00:00
2011-10-06 08:02:37 +00:00
(3) [Optional] Write card holder certificate
2011-02-10 04:57:23 +00:00
If you have card holder certificate binary file, you can do:
2011-05-13 02:59:05 +00:00
$ ../tool/gnuk_put_binary.py ../../<YOUR-CERTIFICATE>.bin
2011-02-24 06:54:40 +00:00
../../<YOUR-CERTIFICATE>.bin: <LENGTH-OF-YOUR-CERTIFICATE>
Updating card holder certificate
...
2011-02-10 04:57:23 +00:00
How to run
==========
2010-11-02 03:37:13 +00:00
Debug enabled
-------------
2010-10-14 08:08:09 +00:00
If you compiled with --enable-debug option, Gnuk has two interfaces
2010-09-05 09:10:54 +00:00
(one is CCID/ICCD device and another is virtual COM port). Open
virtual COM port by:
$ cu -l /dev/ttyACM0
and you will see debug output of Gnuk.
2010-11-02 03:37:13 +00:00
Libccid fix needed
------------------
2011-01-07 07:18:47 +00:00
For libccid (< 1.4.1), we need following change:
2010-09-05 09:10:54 +00:00
--- /etc/libccid_Info.plist.dpkg-dist 2009-07-29 06:50:20.000000000 +0900
+++ /etc/libccid_Info.plist 2010-09-05 09:09:49.000000000 +0900
@@ -104,6 +104,7 @@
<key>ifdVendorID</key>
<array>
+ <string>0x234B</string>
<string>0x08E6</string>
<string>0x08E6</string>
<string>0x08E6</string>
@@ -237,6 +238,7 @@
<key>ifdProductID</key>
<array>
+ <string>0x0000</string>
<string>0x2202</string>
<string>0x3437</string>
<string>0x3438</string>
@@ -370,6 +372,7 @@
<key>ifdFriendlyName</key>
<array>
+ <string>FSIJ USB Token</string>
<string>Gemplus Gem e-Seal Pro</string>
<string>Gemplus GemPC Twin</string>
<string>Gemplus GemPC Key</string>
------------------
2011-01-07 07:18:47 +00:00
This entry has been added into libccid 1.4.1 already ([r5425]).
2010-11-02 03:37:13 +00:00
Testing Gnuk
------------
Try following to see Gnuk runs:
2010-09-05 09:10:54 +00:00
$ gpg --card-status
2011-05-13 02:59:05 +00:00
Personalize the Token and import keys
-------------------------------------
You can personalize the token, putting your information like: Name,
Login name, Sex, Languages, URL, etc., and password. To do so, GnuPG
command is:
$ gpg --card-edit
Note that the factory setting of user password is "123456" and admin
password is "12345678" as the specification.
2012-06-07 01:48:25 +00:00
It is recommended to create your keys on your computer, and import
them to Gnuk Token. After you create your keys (they must be 2048-bit
RSA), you can import them.
Gnuk supports key generation, but this feature is young and should be
considered experimental.
2011-05-13 02:59:05 +00:00
For detail, please see doc/DEMO and doc/DEMO-2.
Note that it make sense to preserve your keys on your computer so that
you can import the keys (again) to (possibly another) Gnuk Token. In
this case, you can use GnuPG's option to specify the home directory by
--homedir.
2012-06-07 01:48:25 +00:00
After creating keys on your computer by:
2011-05-13 02:59:05 +00:00
$ gpg --gen-key
...
Copy directory which contains your secret keys to new directory named
<gpgdir-with-your-secret-keys>:
$ cp -pa $HOME/.gnupg <gpgdir-with-your-secret-keys>
Then, import keys by:
$ gpg --edit-key <YOUR-KEYID>
While your $HOME/.gnupg now doesn't have your secret keys after
import, <gpgdir-with-your-secret-keys> still has them. You can again
import them by:
$ gpg --homedir=<gpgdir-with-your-secret-keys> --edit-key <YOUR-KEYID>
Note that you *should not* save changes this time to preserve keys
on your computer. The session goes like this:
gpg> quit
Save changes? (y/N) n
Quit without saving? (y/N) y
2010-09-05 09:10:54 +00:00
2010-08-30 11:02:22 +00:00
How to debug
============
2010-08-18 05:21:58 +00:00
2010-08-30 11:02:22 +00:00
We can use GDB.
2010-08-18 05:21:58 +00:00
2010-08-30 11:02:22 +00:00
$ arm-none-eabi-gdb gnuk.elf
2010-08-18 05:21:58 +00:00
2010-09-05 09:10:54 +00:00
Inside GDB, we can connect OpenOCD by:
(gdb) target remote localhost:3333
2010-09-10 07:41:00 +00:00
You can see the output of PCSCD:
2010-09-09 08:50:34 +00:00
# /etc/init.d/pcscd stop
# LIBCCID_ifdLogLevel=7 /usr/sbin/pcscd --debug --foreground
You can observe the traffic of USB using "usbmon". See the file:
linux/Documentation/usb/usbmon.txt
2012-06-06 00:05:24 +00:00
Firmware update
===============
See doc/firmware-update.
2010-09-10 07:41:00 +00:00
Read-only Git Repository
========================
2011-05-13 02:59:05 +00:00
You can browse at http://www.gniibe.org/gitweb?p=gnuk.git;a=summary
2011-05-11 07:48:08 +00:00
2010-09-10 07:41:00 +00:00
You can get it by:
2011-05-11 07:48:08 +00:00
$ git clone git://www.gniibe.org/gnuk.git/
or
2010-09-10 07:41:00 +00:00
$ git clone http://www.gniibe.org/git/gnuk.git/
2011-05-11 07:48:08 +00:00
2010-09-10 07:41:00 +00:00
Information on the Web
======================
2011-05-13 02:59:05 +00:00
Please visit: http://www.fsij.org/gnuk/
2010-09-10 07:41:00 +00:00
Your Contributions
==================
2010-09-12 07:12:17 +00:00
FSIJ welcomes your contributions. Please assign your copyright
2010-09-13 02:47:21 +00:00
to FSIJ (if possible).
2010-09-10 07:41:00 +00:00
2010-09-05 09:10:54 +00:00
2010-09-13 02:47:21 +00:00
Foot note
==========
* NUK(R) is a registered trademark owend by MAPA GmbH, Germany.
2010-08-30 11:02:22 +00:00
--