gnuk/gnuk.git
22 months agoVersion 1.2.6. release/1.2.6
NIIBE Yutaka [Wed, 11 Oct 2017 07:10:16 +0000 (16:10 +0900)]
Version 1.2.6.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
22 months agoFix test/*.
NIIBE Yutaka [Wed, 11 Oct 2017 07:06:15 +0000 (16:06 +0900)]
Fix test/*.

22 months agoFix configure.
NIIBE Yutaka [Wed, 11 Oct 2017 02:24:12 +0000 (11:24 +0900)]
Fix configure.

22 months agoNo --vidpid for GNU/Linux.
NIIBE Yutaka [Tue, 10 Oct 2017 12:06:42 +0000 (21:06 +0900)]
No --vidpid for GNU/Linux.

22 months agoSupport --debug option for GNU/Linux emulation.
NIIBE Yutaka [Tue, 10 Oct 2017 05:36:34 +0000 (14:36 +0900)]
Support --debug option for GNU/Linux emulation.

22 months agoSTM8S Discovery kit is supported again.
NIIBE Yutaka [Fri, 6 Oct 2017 08:19:55 +0000 (17:19 +0900)]
STM8S Discovery kit is supported again.

22 months agoFix for 64KB STM32F103.
NIIBE Yutaka [Fri, 6 Oct 2017 08:04:45 +0000 (17:04 +0900)]
Fix for 64KB STM32F103.

22 months agoFix linker script.
NIIBE Yutaka [Fri, 6 Oct 2017 08:00:00 +0000 (17:00 +0900)]
Fix linker script.

22 months agoFor emulation, support --vidpid at runtime.
NIIBE Yutaka [Fri, 6 Oct 2017 01:20:54 +0000 (10:20 +0900)]
For emulation, support --vidpid at runtime.

22 months agoFix stack size for ARM.
NIIBE Yutaka [Thu, 5 Oct 2017 08:07:06 +0000 (17:07 +0900)]
Fix stack size for ARM.

22 months agoRSA in a single step.
NIIBE Yutaka [Thu, 5 Oct 2017 08:06:50 +0000 (17:06 +0900)]
RSA in a single step.

22 months agoEmulation tool added.
NIIBE Yutaka [Thu, 5 Oct 2017 04:53:48 +0000 (13:53 +0900)]
Emulation tool added.

22 months agoFix bignum for 64-bit machine.
NIIBE Yutaka [Thu, 5 Oct 2017 04:45:24 +0000 (13:45 +0900)]
Fix bignum for 64-bit machine.

22 months agoSerial string for GNU/Linux emulation.
NIIBE Yutaka [Wed, 4 Oct 2017 09:54:16 +0000 (18:54 +0900)]
Serial string for GNU/Linux emulation.

22 months agoFix bignum for 64-bit machine.
NIIBE Yutaka [Wed, 4 Oct 2017 08:08:42 +0000 (17:08 +0900)]
Fix bignum for 64-bit machine.

22 months agoFix gnuk_malloc for 64-bit.
NIIBE Yutaka [Wed, 4 Oct 2017 03:38:37 +0000 (12:38 +0900)]
Fix gnuk_malloc for 64-bit.

22 months agoTweak the size of stack of openpgp-card thread.
NIIBE Yutaka [Wed, 4 Oct 2017 01:45:39 +0000 (10:45 +0900)]
Tweak the size of stack of openpgp-card thread.

22 months agoRSA key generation in two steps.
NIIBE Yutaka [Wed, 4 Oct 2017 00:44:19 +0000 (09:44 +0900)]
RSA key generation in two steps.

22 months agoDon't use malloc if not needed.
NIIBE Yutaka [Tue, 3 Oct 2017 07:12:41 +0000 (16:12 +0900)]
Don't use malloc if not needed.

22 months agoDon't provide stdlib.h, but provide gnuk-malloc.h.
NIIBE Yutaka [Tue, 3 Oct 2017 07:04:43 +0000 (16:04 +0900)]
Don't provide stdlib.h, but provide gnuk-malloc.h.

22 months agogenerate flash.data.
NIIBE Yutaka [Tue, 3 Oct 2017 04:50:51 +0000 (13:50 +0900)]
generate flash.data.

22 months agoFix non-use of stdlib.h.
NIIBE Yutaka [Tue, 3 Oct 2017 04:27:12 +0000 (13:27 +0900)]
Fix non-use of stdlib.h.

22 months agoflash memory handling change to support GNU/Linux.
NIIBE Yutaka [Tue, 3 Oct 2017 02:50:48 +0000 (11:50 +0900)]
flash memory handling change to support GNU/Linux.

22 months agoNot for GNU/Linux.
NIIBE Yutaka [Mon, 2 Oct 2017 07:45:08 +0000 (16:45 +0900)]
Not for GNU/Linux.

22 months agoFLASH_UPGRADE_SUPPORT is not relevant to GNU/Linux.
NIIBE Yutaka [Mon, 2 Oct 2017 07:24:56 +0000 (16:24 +0900)]
FLASH_UPGRADE_SUPPORT is not relevant to GNU/Linux.

22 months agoFix for main.c.
NIIBE Yutaka [Mon, 2 Oct 2017 06:41:58 +0000 (15:41 +0900)]
Fix for main.c.

22 months agoMore USB fix for GNU/Linux.
NIIBE Yutaka [Mon, 2 Oct 2017 06:29:45 +0000 (15:29 +0900)]
More USB fix for GNU/Linux.

22 months agompi_montsqr fix for GNU/Linux.
NIIBE Yutaka [Mon, 2 Oct 2017 06:27:27 +0000 (15:27 +0900)]
mpi_montsqr fix for GNU/Linux.

22 months agoFix flash.c for GNU/Linux emulation.
NIIBE Yutaka [Sat, 30 Sep 2017 12:03:17 +0000 (21:03 +0900)]
Fix flash.c for GNU/Linux emulation.

22 months agoSmall USB clean up.
NIIBE Yutaka [Sat, 30 Sep 2017 11:51:21 +0000 (20:51 +0900)]
Small USB clean up.

22 months agoRevert part of simplification.
NIIBE Yutaka [Sat, 30 Sep 2017 11:20:36 +0000 (20:20 +0900)]
Revert part of simplification.

22 months agoMore fix for USB.
NIIBE Yutaka [Fri, 29 Sep 2017 12:06:15 +0000 (21:06 +0900)]
More fix for USB.

22 months agoFix USB code for USBIP on GNU/Linux.
NIIBE Yutaka [Fri, 29 Sep 2017 10:23:39 +0000 (19:23 +0900)]
Fix USB code for USBIP on GNU/Linux.

22 months agoFix for FLASH_UPGRADE_SUPPORT.
NIIBE Yutaka [Fri, 29 Sep 2017 07:58:59 +0000 (16:58 +0900)]
Fix for FLASH_UPGRADE_SUPPORT.

22 months agoFix for 64-bit machine (emulation).
NIIBE Yutaka [Fri, 29 Sep 2017 05:15:48 +0000 (14:15 +0900)]
Fix for 64-bit machine (emulation).

22 months agoStack definition change.
NIIBE Yutaka [Fri, 29 Sep 2017 04:18:49 +0000 (13:18 +0900)]
Stack definition change.

22 months agoMore for GNU/Linux emulation.
NIIBE Yutaka [Thu, 28 Sep 2017 07:44:54 +0000 (16:44 +0900)]
More for GNU/Linux emulation.

22 months agoMore fixes.
NIIBE Yutaka [Thu, 28 Sep 2017 06:36:59 +0000 (15:36 +0900)]
More fixes.

22 months agoFix for GNU/Linux.
NIIBE Yutaka [Thu, 28 Sep 2017 06:25:06 +0000 (15:25 +0900)]
Fix for GNU/Linux.

22 months agoRename flash functions.
NIIBE Yutaka [Thu, 28 Sep 2017 06:10:20 +0000 (15:10 +0900)]
Rename flash functions.

22 months agostdlib fixes.
NIIBE Yutaka [Thu, 28 Sep 2017 06:09:21 +0000 (15:09 +0900)]
stdlib fixes.

22 months agoGNU/Linux emulation is done by Chopstx.
NIIBE Yutaka [Thu, 28 Sep 2017 02:04:28 +0000 (11:04 +0900)]
GNU/Linux emulation is done by Chopstx.

2 years agoVersion 1.2.5. release/1.2.5
NIIBE Yutaka [Fri, 11 Aug 2017 13:12:09 +0000 (22:12 +0900)]
Version 1.2.5.

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.

2 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)

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

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

2 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

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

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

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

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

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

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

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