FSIJ USB Token for GnuPG
Niibe Yutaka <gniibe@fsij.org>
2009-10-21 Japan Linux Symposium
FSIJ USB Token for GnuPG Niibe Yutaka <gniibe@fsij.org> - - PowerPoint PPT Presentation
FSIJ USB Token for GnuPG Niibe Yutaka <gniibe@fsij.org> 2009-10-21 Japan Linux Symposium Contents Who am I? GNU Privacy Guard FSIJ USB Token PCB design V-USB (AVR-USB) CCID/ICCD Protocol OpenPGP Protocol RSA
2009-10-21 Japan Linux Symposium
– PCB design – V-USB (AVR-USB) – CCID/ICCD Protocol – OpenPGP Protocol – RSA (or ECC Encryption)
Japan (2000-)
(2001-2004)
Development & Promotion
– Linux-M32R.ORG – CODEblog.ORG – Google SoC – U-20 Programing
Contest in Japan
– GPLv3 Committee
GNU Project (1989-) Linux Kernel (1993-) Debian Project (2005-)
National Institute of AIST: Employee Free Software Initiative of Japan: Chairman
Free Software Development under METI
Encryption Technology
– Export regulations were there – Free Software implementation
– Digital Signature – Encryption/Decryption
– Implemented by Basic Card
– Version 1.1 – Newer protocol: Version 2.0
– 1024-bit RSA – Three keys for Encryption, Sign, Auth – Access control by PIN – Key generation on the card – RSA computation on the card
– On the disk of our PC – Encrypted by passphrase
– OpenPGP card
– Card reader is not common device
device should be Free Software
– Development of smart card is hard – Smart card industry is not friendly to Free So
ftware development
in Japan
– Possibility to build OpenPGP card compatible – Possibility to build BasicCard like card
Card (Juki-net card)
– Stop by some reason
– USB device for GNU Privacy Guard – Store private key on USB device
– I2C, Serial I/O, LED control, etc.
evelopment for Free Software
– NEVER SECURE than Smart card
– It is for development environment – It is good to develop/test new things
– But it is normal micro controller device – NEVER SECURE than Smart card
– USB chip: AVR (ATmega328) with AVR-USB – PCB design
– USB Protocol stack: AVR-USB – CCID/ICCD Protocol – ISO 7816 Protocol, Format – OpenPGP card protocol – RSA encryption routine
– Download program through USB
– AVR-USB is ready – ICCD: mostly done – OpenPGP protocol: partially done – RSA: mostly done, integration remains
– Most of target code is hard coded for a
given private key
– About 5 sec.
– 30KB or so (OK for Atmega328, but not for
168)
Eagle now
KiCad
PCB/gEDA
OpenPGP card protocol CCID/ICCD protocol USB protocol ISO 7816 protocol RSA computation
entry
libccid_Info .plist
$ gpg - - card- status A ppl i cati on I D . . . : D 276000124010101F517000000010000 V ersi on . . . . . . . . . . : 1. 1 M anuf acturer . . . . . : unknow n Seri al num ber . . . . : 00000001 N am e of cardhol der: N I I B E Yutaka Language pref s . . . : j a Sex . . . . . . . . . . . . . . : m al e U R L of publ i c key : http: / / w w w . f si j . org/ Logi n data . . . . . . . : gni i be Si gnature PI N . . . . : not f orced M
l engths . : 0 0 0 PI N retry counter : 1 1 1 Si gnature counter : 0 Si gnature key . . . . : A B 4B 9F94 6555 EEB 7 FFE8 5261 B D 6A 9B CD 852F 7074 Encrypti on key. . . . : 7A B 2 1745 EB D 4 1D 3F 8C2C A 0F1 D 9A 9 C2F6 3A 01 5444 A uthenti cati on key: [none] G eneral key i nf o. . : pub 1024R / 852F7074 2008- 10- 27 N i i be Yutaka (Chopsti x) < gni i be@ f si j . org> sec 1024R / 3A 015444 created: 2008- 10- 27 expi res: never ssb 1024R / 852F7074 created: 2008- 10- 27 expi res: never
Only support signing
– Private key are at compile time option – 512-bit and CRT – Runs about 5 sec for signing (at 20MHz)
– Tom St Denis&Greg Rose: BigNum Math – Tom St Denis: LibTomCrypt Developer Manual – Alfred J. Menezes, et al.: Handbook of Applied Cry
ptography
– Tom St Denis: TomsFastMath 0.10
– Comba multiplication & sqr – Montgomery reduction – BigNum exptmod – Chinese Remainder Theorem
Start U 200: 0ad6 R ESET O n 0 U 020: 0b02 00 a4 00 0c 02 3f 00 - sel ect R O O T M F 00 a4 02 0c 02 2f 02 - sel ect 0x2f 02 EF U 000: 0947 00 b0 00 00 f e - R ead bi nary 00 b0 00 06 f e - R ead bi nary 00 a4 04 00 06 d2 76 00 01 24 01 - sel ect D F by nam e 00 ca 00 4f 00 - G et D ata 00 ca 00 c4 00 - G et D ata 00 ca 00 6e 00 - G et D ata 00 c0 00 00 3e - G ET R esponse 00 c0 00 00 1e - G ET R esponse U 000: 0947 00 ca 00 5e 00 - G et D ata 00 ca 00 65 00 - G et D ata 00 c0 00 00 10 - G ET R esponse 00 ca 5f 50 00 - G et D ata 00 ca 00 6e 00 - G et D ata
een released (on Feb)
and release to public
– Renesas SuperH (SH-2)? – Atmel AVR32 (with USB controller)?
by Free Software ... is fun