gnuk/README

201 lines
3.9 KiB
Plaintext
Raw Normal View History

2010-09-05 09:10:54 +00:00
Gnuk - software for GPG USB Token
2010-08-30 11:02:22 +00:00
2010-09-05 09:10:54 +00:00
Version 0.0 2010-09-05
2010-08-30 11:02:22 +00:00
Niibe Yutaka
What's Gnuk
===========
2010-09-05 09:10:54 +00:00
Gnuk is software implementation of a USB token for GNU privacy guard.
Gnuk supports OpenPGP card protocol version 2, and it runs on STM32
processor.
2010-08-30 11:02:22 +00:00
Release notes
=============
2010-09-05 09:10:54 +00:00
This is initial release of Gnuk, and it is experimental yet.
It is not yet daily use.
Supported and tested features are:
* Personalization of the card
* Changing Login name, URL, Name, Sex, Language, etc.
* Password handling (PW1, RC, PW3)
* Single key import
* PSO: Digital Signature
2010-08-30 11:02:22 +00:00
2010-09-05 09:10:54 +00:00
It is known not-working:
2010-08-30 11:02:22 +00:00
2010-09-05 09:10:54 +00:00
* Multiple key import
2010-08-30 11:02:22 +00:00
2010-09-05 09:10:54 +00:00
* PSO: Decipher
Targets
=======
2010-08-30 11:02:22 +00:00
We use Olimex STM32-H103 board.
2010-09-05 09:10:54 +00:00
I think that it runs on Olimex STM32-P103, STBee, or STBee mini too.
Besides, we are porting it to STM32 Primer 2.
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
(GPLv3+).
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.
* ChibiOS_2.0.2/ -- ChibiOS/RT 2.0.2
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/
We use PolarSSL for RSA computation.
2010-08-30 11:02:22 +00:00
* STM32_USB-FS-Device_Driver/ -- a part of USB-FS-Device_Lib
* Virtual_COM_Port/ -- a part of USB-FS-Device_Lib
2010-09-05 09:10:54 +00:00
STM32F10x USB Full Speed Device Library (USB-FS-Device_Lib)
is a STM32F10x library for USB functionality.
2010-08-10 03:11:02 +00:00
2010-09-05 09:10:54 +00:00
I took Libraries/STM32_USB-FS-Device_Driver and a part of
Project/ in STM32_USB-FS-Device_Lib distribution.
See http://www.st.com for detail.
2010-08-18 05:21:58 +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
See http://github.com/esden/summon-arm-toolchain/ for preparation of
GNU Toolchain for 'arm-none-eabi' target.
$ cd gnuk-VERSION/src
2010-09-05 09:10:54 +00:00
Edit the Makefile. Comment out the line:
----------------
ENABLE_DEBUG=1
----------------
if you don't want to debug Gnuk.
Type:
2010-08-30 11:02:22 +00:00
$ make
Then, we will have "gnuk.elf".
How to run
==========
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-09-05 09:10:54 +00:00
If you compiled with ENABLE_DEBUG=1, Gnuk has two interfaces
(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.
For libccid, we need following change:
--- /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>
------------------
Then, try following to see Gnuk runs:
$ gpg --card-status
For more, see doc/HOWTO_GNUK.
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
Development history
===================
Initially, the development was started with a copy of the files in
ChibiOS_2.0.2/demos/ARMCM3-STM32F103-GCC/*, Makefile, linker script,
and header files (chconf.h, halconf.h, and mcuconf.h).
Since this is the initial release, some garbages may still remain.
2010-08-30 11:02:22 +00:00
--