gnuk/gnuk.git
2 years agoUpdate .gitignore.
NIIBE Yutaka [Fri, 11 Aug 2017 13:11:49 +0000 (22:11 +0900)]
Update .gitignore.

2 years agoTweak process size of gpg.
NIIBE Yutaka [Fri, 11 Aug 2017 13:00:01 +0000 (22:00 +0900)]
Tweak process size of gpg.

2 years agosrc/config.mk generation.
NIIBE Yutaka [Fri, 11 Aug 2017 12:02:43 +0000 (21:02 +0900)]
src/config.mk generation.

2 years agoMerge branch 'master' of git.gniibe.org:gnuk/gnuk
NIIBE Yutaka [Thu, 3 Aug 2017 23:33:46 +0000 (08:33 +0900)]
Merge branch 'master' of git.gniibe.org:gnuk/gnuk

2 years agoFix factory-reset for admin-less mode.
NIIBE Yutaka [Thu, 3 Aug 2017 12:35:20 +0000 (21:35 +0900)]
Fix factory-reset for admin-less mode.

Reported-by: Stanislas Bach <sbach@0g.re>
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years agoFix factory-reset for admin-less mode.
NIIBE Yutaka [Thu, 3 Aug 2017 12:35:20 +0000 (21:35 +0900)]
Fix factory-reset for admin-less mode.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years agoAllow compile-time override of detected flash size.
Jeremy Drake [Wed, 2 Aug 2017 23:11:34 +0000 (16:11 -0700)]
Allow compile-time override of detected flash size.

On the STM32F103C8, as used in the "blue pill" boards, it has been
determined that, despite these only officially having 64KiB flash, it is
possible to actually use 128KiB of flash.

This commit allows for a preprocessor define
STM32F103_OVERRIDE_FLASH_SIZE which, when set, is used as the size of
flash in KiB instead of reading it from the FLASH_SIZE_REG.

2 years agoErase CERTDO on terminate.
Jeremy Drake [Tue, 1 Aug 2017 23:00:28 +0000 (16:00 -0700)]
Erase CERTDO on terminate.

When both certdo and lifecycle support are enabled, flash_terminate
neglected to erase the certdo pages.  It now does so.

2 years agoFix factory-reset.
NIIBE Yutaka [Tue, 1 Aug 2017 04:26:26 +0000 (13:26 +0900)]
Fix factory-reset.

2 years agoconfigure: sanitize for shellcheck
Anthony Romano [Wed, 19 Jul 2017 04:47:29 +0000 (21:47 -0700)]
configure: sanitize for shellcheck

Signed-off-by: Anthony Romano <anthony.romano@coreos.com>
2 years agodocker: source checking container
Anthony Romano [Wed, 19 Jul 2017 04:44:49 +0000 (21:44 -0700)]
docker: source checking container

Includes shellcheck and scan-build

Signed-off-by: Anthony Romano <anthony.romano@coreos.com>
2 years agoInitialize TMP to avoid confusion by static analysis.
NIIBE Yutaka [Wed, 19 Jul 2017 02:55:20 +0000 (11:55 +0900)]
Initialize TMP to avoid confusion by static analysis.

--

The computation using TMP is keeping it constant-time only, but
it is better not to confuse static analysis.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years agoSupport no git situation.
NIIBE Yutaka [Wed, 19 Jul 2017 02:25:38 +0000 (11:25 +0900)]
Support no git situation.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years agoFix accessing garbage on error path.
NIIBE Yutaka [Wed, 19 Jul 2017 01:48:16 +0000 (10:48 +0900)]
Fix accessing garbage on error path.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Reported-by: Anthony Romano <anthony.romano@coreos.com>
2 years agoGit is assumed for the source with .git.
NIIBE Yutaka [Tue, 18 Jul 2017 05:12:20 +0000 (14:12 +0900)]
Git is assumed for the source with .git.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years agoSupport building with docker.
Anthony Romano [Mon, 17 Jul 2017 04:08:46 +0000 (21:08 -0700)]
Support building with docker.

Signed-off-by: Anthony Romano <anthony.romano@coreos.com>
2 years agocall fatal if mem_head size is corrupted.
Anthony Romano [Mon, 17 Jul 2017 03:50:11 +0000 (20:50 -0700)]
call fatal if mem_head size is corrupted.

Signed-off-by: Anthony Romano <anthony.romano@coreos.com>
2 years agoavoid null dereference when openpgp algo goes from !rsa2k to rsa2k.
Anthony Romano [Mon, 17 Jul 2017 02:42:57 +0000 (19:42 -0700)]
avoid null dereference when openpgp algo goes from !rsa2k to rsa2k.

Detected with scan-build.

Signed-off-by: Anthony Romano <anthony.romano@coreos.com>
2 years agoremove unused calculations from mod_reduce.
Anthony Romano [Mon, 17 Jul 2017 02:40:49 +0000 (19:40 -0700)]
remove unused calculations from mod_reduce.

Detected with scan-build.

Signed-off-by: Anthony Romano <anthony.romano@coreos.com>
2 years agocall-rsa: free modulus buffers on error paths.
Anthony Romano [Mon, 17 Jul 2017 02:36:34 +0000 (19:36 -0700)]
call-rsa: free modulus buffers on error paths.

* MPI_CHK jumps to cleanup on ret != 0, so p_q_modulus is never freed if
  rsa_gen_key fails (detected via scan-build).
* modulus_calc never freed its modulus buffer on error.

Signed-off-by: Anthony Romano <anthony.romano@coreos.com>
2 years agoUpdate Chopstx.
NIIBE Yutaka [Tue, 18 Jul 2017 03:58:23 +0000 (12:58 +0900)]
Update Chopstx.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years agoVersion 1.2.4. release/1.2.4
NIIBE Yutaka [Fri, 12 May 2017 08:22:20 +0000 (17:22 +0900)]
Version 1.2.4.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years agousbip list -r 127.0.0.1 now works.
NIIBE Yutaka [Fri, 12 May 2017 05:13:53 +0000 (14:13 +0900)]
usbip list -r 127.0.0.1 now works.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years agoAdd usb-emu.c.
NIIBE Yutaka [Tue, 2 May 2017 06:05:15 +0000 (15:05 +0900)]
Add usb-emu.c.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years agoFix old documentation (note) for firmware update.
NIIBE Yutaka [Mon, 1 May 2017 05:58:15 +0000 (14:58 +0900)]
Fix old documentation (note) for firmware update.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years agoPortability change.
NIIBE Yutaka [Fri, 28 Apr 2017 07:13:18 +0000 (16:13 +0900)]
Portability change.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years agoNew: src/mcu-stm32f103.c.
NIIBE Yutaka [Fri, 28 Apr 2017 06:49:38 +0000 (15:49 +0900)]
New: src/mcu-stm32f103.c.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years agoFix long standing buf of digital signature counter.
NIIBE Yutaka [Fri, 28 Apr 2017 05:54:15 +0000 (14:54 +0900)]
Fix long standing buf of digital signature counter.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years agoMove data objects at the end of flash.
NIIBE Yutaka [Thu, 27 Apr 2017 06:23:25 +0000 (15:23 +0900)]
Move data objects at the end of flash.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years ago[SECURITY] Flash memory usage change.
NIIBE Yutaka [Thu, 27 Apr 2017 05:36:32 +0000 (14:36 +0900)]
[SECURITY] Flash memory usage change.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years agoemulation: USB device emulation by USBIP protocol.
NIIBE Yutaka [Tue, 18 Apr 2017 06:45:25 +0000 (15:45 +0900)]
emulation: USB device emulation by USBIP protocol.

2 years agoVersion 1.2.3. release/1.2.3
NIIBE Yutaka [Thu, 2 Feb 2017 07:33:30 +0000 (16:33 +0900)]
Version 1.2.3.

2 years agoIncrease CCID thread stack size by 0x20 for newer GCC.
NIIBE Yutaka [Thu, 2 Feb 2017 05:11:11 +0000 (14:11 +0900)]
Increase CCID thread stack size by 0x20 for newer GCC.

2 years agoUpdate Chopstx to 1.3.
NIIBE Yutaka [Thu, 2 Feb 2017 04:07:35 +0000 (13:07 +0900)]
Update Chopstx to 1.3.

2 years agoUpdate README
NIIBE Yutaka [Wed, 1 Feb 2017 08:16:54 +0000 (17:16 +0900)]
Update README

2 years agoRegnual update tool: do not allow other than binary formats (upgrade_by_passwd)
Szczepan Zalega [Mon, 2 Jan 2017 17:44:47 +0000 (18:44 +0100)]
Regnual update tool: do not allow other than binary formats (upgrade_by_passwd)

Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
2 years agotool: Improve tool/*.py.
NIIBE Yutaka [Wed, 1 Feb 2017 03:34:35 +0000 (12:34 +0900)]
tool: Improve tool/*.py.

--

Szczepan Zalega's idea of using the file GNUK_USB_DEVICE_ID would
good, but not merged yet.  Because it makes difficult to distribute
the scripts.  We need to consider installing tools and the file
like GNUK_USB_DEVICE_ID altogether.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2 years agofix NIST P-256 / secp256k1 key generation.
NIIBE Yutaka [Fri, 21 Oct 2016 06:30:07 +0000 (15:30 +0900)]
fix NIST P-256 / secp256k1 key generation.

2 years agoVersion 1.2.2 release/1.2.2
NIIBE Yutaka [Sat, 15 Oct 2016 11:18:20 +0000 (20:18 +0900)]
Version 1.2.2

2 years agofix scripts
NIIBE Yutaka [Sat, 15 Oct 2016 11:14:18 +0000 (20:14 +0900)]
fix scripts

2 years agoFix flash initialization
NIIBE Yutaka [Sat, 15 Oct 2016 10:29:23 +0000 (19:29 +0900)]
Fix flash initialization

2 years agoAdd tests/ accessing DO 6E
NIIBE Yutaka [Sat, 15 Oct 2016 10:28:57 +0000 (19:28 +0900)]
Add tests/ accessing DO 6E

2 years agofix stack usage of CCID
NIIBE Yutaka [Sat, 15 Oct 2016 09:37:22 +0000 (18:37 +0900)]
fix stack usage of CCID

2 years agotests/ update for signature counter
NIIBE Yutaka [Sat, 15 Oct 2016 09:35:21 +0000 (18:35 +0900)]
tests/ update for signature counter

2 years agoAdd pubkey tests
NIIBE Yutaka [Sat, 15 Oct 2016 07:55:22 +0000 (16:55 +0900)]
Add pubkey tests

2 years agosupport factory_reset.
NIIBE Yutaka [Thu, 13 Oct 2016 23:45:01 +0000 (08:45 +0900)]
support factory_reset.

3 years agoadd factory reset support (not-full yet)
NIIBE Yutaka [Thu, 13 Oct 2016 06:06:19 +0000 (15:06 +0900)]
add factory reset support (not-full yet)

3 years agorename status-code.h
NIIBE Yutaka [Thu, 13 Oct 2016 02:03:50 +0000 (11:03 +0900)]
rename status-code.h

3 years agoUpdate to Chopstx 1.2
NIIBE Yutaka [Thu, 13 Oct 2016 01:35:22 +0000 (10:35 +0900)]
Update to Chopstx 1.2

3 years agoFix difference between original OpenPGP card
NIIBE Yutaka [Thu, 13 Oct 2016 01:33:02 +0000 (10:33 +0900)]
Fix difference between original OpenPGP card

3 years agotests/ update
NIIBE Yutaka [Thu, 13 Oct 2016 01:04:27 +0000 (10:04 +0900)]
tests/ update

3 years agofix tests/
NIIBE Yutaka [Wed, 12 Oct 2016 10:42:22 +0000 (19:42 +0900)]
fix tests/

3 years agofix test/
NIIBE Yutaka [Wed, 12 Oct 2016 06:32:51 +0000 (15:32 +0900)]
fix test/

3 years agofix test/
NIIBE Yutaka [Wed, 12 Oct 2016 05:56:57 +0000 (14:56 +0900)]
fix test/

3 years agomore tests (incomplete)
NIIBE Yutaka [Wed, 12 Oct 2016 01:22:57 +0000 (10:22 +0900)]
more tests (incomplete)

3 years agoTPDU reader works now
NIIBE Yutaka [Fri, 7 Oct 2016 07:39:20 +0000 (16:39 +0900)]
TPDU reader works now

3 years agoimplement TPDU card reader
NIIBE Yutaka [Wed, 5 Oct 2016 11:00:22 +0000 (20:00 +0900)]
implement TPDU card reader

3 years agoNew test suite for OpenPGP card
NIIBE Yutaka [Fri, 30 Sep 2016 07:38:27 +0000 (16:38 +0900)]
New test suite for OpenPGP card

3 years agominor fix for configure
NIIBE Yutaka [Fri, 30 Sep 2016 07:20:19 +0000 (16:20 +0900)]
minor fix for configure

3 years agoAdd Gnuk logo of PNG
NIIBE Yutaka [Fri, 2 Sep 2016 02:01:55 +0000 (11:01 +0900)]
Add Gnuk logo of PNG

3 years agoFix test setup
NIIBE Yutaka [Wed, 24 Aug 2016 01:39:27 +0000 (10:39 +0900)]
Fix test setup

3 years agoUpgrade tool/hub_ctrl.py
NIIBE Yutaka [Wed, 3 Aug 2016 12:19:34 +0000 (21:19 +0900)]
Upgrade tool/hub_ctrl.py

3 years agoVersion 1.2.1 release/1.2.1
NIIBE Yutaka [Mon, 11 Jul 2016 04:16:25 +0000 (13:16 +0900)]
Version 1.2.1

3 years agoCleanup openpgp_thread.
NIIBE Yutaka [Sat, 9 Jul 2016 04:06:30 +0000 (13:06 +0900)]
Cleanup openpgp_thread.

3 years agoUpdate document
NIIBE Yutaka [Fri, 8 Jul 2016 03:55:09 +0000 (12:55 +0900)]
Update document

3 years agoFix for PIN DND
NIIBE Yutaka [Thu, 7 Jul 2016 02:53:49 +0000 (11:53 +0900)]
Fix for PIN DND

3 years agopin CIR fixes
NIIBE Yutaka [Wed, 6 Jul 2016 02:32:14 +0000 (11:32 +0900)]
pin CIR fixes

3 years agodoc fix
NIIBE Yutaka [Tue, 5 Jul 2016 02:28:07 +0000 (11:28 +0900)]
doc fix

3 years agoUpdate chopstx to 1.1
NIIBE Yutaka [Fri, 1 Jul 2016 04:09:42 +0000 (13:09 +0900)]
Update chopstx to 1.1

3 years agodoc update
NIIBE Yutaka [Tue, 21 Jun 2016 05:44:51 +0000 (14:44 +0900)]
doc update

3 years agoUpdate to Chopstx 1.0
Niibe Yutaka [Fri, 17 Jun 2016 05:54:52 +0000 (14:54 +0900)]
Update to Chopstx 1.0

3 years agotweak thread size
Niibe Yutaka [Wed, 15 Jun 2016 06:14:03 +0000 (15:14 +0900)]
tweak thread size

3 years agoupdate chopstx
Niibe Yutaka [Tue, 14 Jun 2016 07:48:31 +0000 (16:48 +0900)]
update chopstx

3 years agoUpdate Chopstx, follow the change of USB API
Niibe Yutaka [Tue, 14 Jun 2016 05:29:17 +0000 (14:29 +0900)]
Update Chopstx, follow the change of USB API

3 years agoFix regnual for new Chopstx
NIIBE Yutaka [Thu, 2 Jun 2016 02:03:59 +0000 (11:03 +0900)]
Fix regnual for new Chopstx

3 years agoFix USB usage in tool/
NIIBE Yutaka [Wed, 1 Jun 2016 00:49:28 +0000 (09:49 +0900)]
Fix USB usage in tool/

3 years agoAdd ccid_notify_slot_change for the interrupt transfer
NIIBE Yutaka [Tue, 31 May 2016 22:52:56 +0000 (07:52 +0900)]
Add ccid_notify_slot_change for the interrupt transfer

3 years agoRemove sys, adc and usb (use Chopstx's)
NIIBE Yutaka [Tue, 31 May 2016 12:18:08 +0000 (21:18 +0900)]
Remove sys, adc and usb (use Chopstx's)

3 years agoUSB handling improvement
NIIBE Yutaka [Tue, 31 May 2016 11:29:31 +0000 (20:29 +0900)]
USB handling improvement

3 years agoICC->CCID
NIIBE Yutaka [Tue, 31 May 2016 10:51:07 +0000 (19:51 +0900)]
ICC->CCID

3 years agoUpdate to Chopstx 0.12
NIIBE Yutaka [Tue, 31 May 2016 09:16:51 +0000 (18:16 +0900)]
Update to Chopstx 0.12

3 years agoFix LED blinking protocol.
NIIBE Yutaka [Fri, 20 May 2016 10:36:03 +0000 (19:36 +0900)]
Fix LED blinking protocol.

3 years agoVersion 1.2.0 release/1.2.0
NIIBE Yutaka [Fri, 20 May 2016 03:03:26 +0000 (12:03 +0900)]
Version 1.2.0

3 years agoFix reGNUal upgrade
NIIBE Yutaka [Thu, 19 May 2016 08:34:38 +0000 (17:34 +0900)]
Fix reGNUal upgrade

3 years agomv usb-icc.c usb-ccid.c
NIIBE Yutaka [Thu, 19 May 2016 07:58:52 +0000 (16:58 +0900)]
mv usb-icc.c usb-ccid.c

3 years agoUpdate Chopstx to 0.11
NIIBE Yutaka [Thu, 19 May 2016 05:04:31 +0000 (14:04 +0900)]
Update Chopstx to 0.11

3 years agoFollow the change of eventflag change, fixining long-standing bug of LED
NIIBE Yutaka [Thu, 19 May 2016 02:50:13 +0000 (11:50 +0900)]
Follow the change of eventflag change, fixining long-standing bug of LED

3 years agoLED blink change
NIIBE Yutaka [Wed, 18 May 2016 12:57:34 +0000 (21:57 +0900)]
LED blink change

3 years agointegrate ccid and usb threads
NIIBE Yutaka [Wed, 18 May 2016 12:34:14 +0000 (21:34 +0900)]
integrate ccid and usb threads

3 years agoFollow Chopstx change
NIIBE Yutaka [Wed, 18 May 2016 10:42:58 +0000 (19:42 +0900)]
Follow Chopstx change

3 years agoUpdate reGNUal wrt sys 3.0
NIIBE Yutaka [Wed, 18 May 2016 04:32:00 +0000 (13:32 +0900)]
Update reGNUal wrt sys 3.0

3 years agoFix reGNUal
NIIBE Yutaka [Mon, 16 May 2016 13:43:51 +0000 (22:43 +0900)]
Fix reGNUal

3 years agoupdate from Chopstx
NIIBE Yutaka [Mon, 16 May 2016 13:37:02 +0000 (22:37 +0900)]
update from Chopstx

3 years agoneug follow update of chopstx
NIIBE Yutaka [Fri, 13 May 2016 13:31:09 +0000 (22:31 +0900)]
neug follow update of chopstx

3 years agousb call back moved to usb_ctrl.c
NIIBE Yutaka [Fri, 13 May 2016 13:30:47 +0000 (22:30 +0900)]
usb call back moved to usb_ctrl.c

3 years agoUpdate chopstx
NIIBE Yutaka [Thu, 12 May 2016 12:57:53 +0000 (21:57 +0900)]
Update chopstx

3 years agoFix USB stack a bit
NIIBE Yutaka [Tue, 8 Mar 2016 02:58:43 +0000 (11:58 +0900)]
Fix USB stack a bit

3 years agoSupport VERIFY reset feature
NIIBE Yutaka [Tue, 9 Feb 2016 05:15:41 +0000 (14:15 +0900)]
Support VERIFY reset feature

3 years agoBignum fixes
NIIBE Yutaka [Tue, 9 Feb 2016 05:13:13 +0000 (14:13 +0900)]
Bignum fixes

3 years agochange of S2K
NIIBE Yutaka [Tue, 9 Feb 2016 05:01:07 +0000 (14:01 +0900)]
change of S2K