gnuk/gnuk.git
21 months agoUpdate Chopstx and follow the changes.
NIIBE Yutaka [Thu, 18 Jan 2018 06:14:34 +0000 (15:14 +0900)]
Update Chopstx and follow the changes.

22 months agotests: Fix for card readers.
NIIBE Yutaka [Tue, 9 Jan 2018 00:39:42 +0000 (09:39 +0900)]
tests: Fix for card readers.

22 months agoUpdate Chopstx to 1.7.
NIIBE Yutaka [Tue, 19 Dec 2017 01:24:28 +0000 (10:24 +0900)]
Update Chopstx to 1.7.

23 months agoFix long-standing bug of admin-less mode. GnuPG should be fixed.
NIIBE Yutaka [Sun, 26 Nov 2017 12:20:46 +0000 (21:20 +0900)]
Fix long-standing bug of admin-less mode.  GnuPG should be fixed.

23 months agoVersion 1.2.7. release/1.2.7
NIIBE Yutaka [Sun, 26 Nov 2017 10:38:26 +0000 (19:38 +0900)]
Version 1.2.7.

23 months agoFix regnual.
NIIBE Yutaka [Sun, 26 Nov 2017 10:28:03 +0000 (19:28 +0900)]
Fix regnual.

23 months agoNEWS update.
NIIBE Yutaka [Sat, 25 Nov 2017 06:02:51 +0000 (15:02 +0900)]
NEWS update.

23 months agoUpdate Chopstx to 1.6.
NIIBE Yutaka [Fri, 24 Nov 2017 11:53:40 +0000 (20:53 +0900)]
Update Chopstx to 1.6.

2 years agoUse of eventflag poll change.
NIIBE Yutaka [Fri, 17 Nov 2017 11:10:13 +0000 (20:10 +0900)]
Use of eventflag poll change.

2 years agoLED status loop change.
NIIBE Yutaka [Fri, 17 Nov 2017 08:20:52 +0000 (17:20 +0900)]
LED status loop change.

Using chopstx_poll, it requires more memory on stack.

2 years agoMake sure to turn off LED soon.
NIIBE Yutaka [Fri, 17 Nov 2017 07:22:02 +0000 (16:22 +0900)]
Make sure to turn off LED soon.

2 years agoLess power consumption on suspend.
NIIBE Yutaka [Fri, 17 Nov 2017 06:49:56 +0000 (15:49 +0900)]
Less power consumption on suspend.

2 years agoFix ReGNUal.
NIIBE Yutaka [Fri, 17 Nov 2017 06:47:59 +0000 (15:47 +0900)]
Fix ReGNUal.

2 years agoFix NeuG for CRC module clock setting.
NIIBE Yutaka [Fri, 17 Nov 2017 06:47:22 +0000 (15:47 +0900)]
Fix NeuG for CRC module clock setting.

2 years agoMore change for USB suspend.
NIIBE Yutaka [Fri, 17 Nov 2017 03:29:32 +0000 (12:29 +0900)]
More change for USB suspend.

2 years agoMake sure to turn off LED on suspend.
NIIBE Yutaka [Thu, 16 Nov 2017 04:08:00 +0000 (13:08 +0900)]
Make sure to turn off LED on suspend.

2 years agoUse const pointer for chopstx_poll.
NIIBE Yutaka [Thu, 16 Nov 2017 00:17:33 +0000 (09:17 +0900)]
Use const pointer for chopstx_poll.

2 years agoFix pin-cir.c for use of EXTI.
NIIBE Yutaka [Wed, 15 Nov 2017 23:40:49 +0000 (08:40 +0900)]
Fix pin-cir.c for use of EXTI.

2 years agoLower power consumption on suspend.
NIIBE Yutaka [Wed, 15 Nov 2017 01:59:55 +0000 (10:59 +0900)]
Lower power consumption on suspend.

2 years agoUSB suspend/resume change.
NIIBE Yutaka [Tue, 14 Nov 2017 03:59:18 +0000 (12:59 +0900)]
USB suspend/resume change.

2 years agoPossibly support other hash in future, for KDF.
NIIBE Yutaka [Wed, 8 Nov 2017 01:28:55 +0000 (10:28 +0900)]
Possibly support other hash in future, for KDF.

2 years agoAvoid passphrase-error-lock by old GnuPG.
NIIBE Yutaka [Tue, 7 Nov 2017 04:48:08 +0000 (13:48 +0900)]
Avoid passphrase-error-lock by old GnuPG.

2 years agoUpdate tool information in README.
NIIBE Yutaka [Mon, 6 Nov 2017 06:29:02 +0000 (15:29 +0900)]
Update tool information in README.

2 years agoFix test and tests.
NIIBE Yutaka [Mon, 6 Nov 2017 01:51:11 +0000 (10:51 +0900)]
Fix test and tests.

2 years agoEnable KDF-DO available bit.
NIIBE Yutaka [Thu, 2 Nov 2017 04:53:06 +0000 (13:53 +0900)]
Enable KDF-DO available bit.

2 years agoImplement use of KDF data object.
NIIBE Yutaka [Thu, 2 Nov 2017 01:59:17 +0000 (10:59 +0900)]
Implement use of KDF data object.

2 years agoImplement rw_kdf.
NIIBE Yutaka [Thu, 2 Nov 2017 00:28:43 +0000 (09:28 +0900)]
Implement rw_kdf.

2 years agoStart adding KDF-DO of OpenPGPcard v3.
NIIBE Yutaka [Wed, 1 Nov 2017 07:52:58 +0000 (16:52 +0900)]
Start adding KDF-DO of OpenPGPcard v3.

2 years agoBug fix for keygeneration.
NIIBE Yutaka [Tue, 31 Oct 2017 08:10:03 +0000 (17:10 +0900)]
Bug fix for keygeneration.

2 years agoFix gpg_do_keygen.
NIIBE Yutaka [Mon, 30 Oct 2017 06:01:17 +0000 (15:01 +0900)]
Fix gpg_do_keygen.

2 years agofix documentation typo
Daniel Kahn Gillmor [Thu, 12 Oct 2017 16:06:32 +0000 (12:06 -0400)]
fix documentation typo

2 years agoDon't change PPS for other readers.
NIIBE Yutaka [Tue, 24 Oct 2017 11:39:51 +0000 (20:39 +0900)]
Don't change PPS for other readers.

2 years agolinker script: fix keystore_pool size
Aurelien Jarno [Wed, 18 Oct 2017 21:40:16 +0000 (23:40 +0200)]
linker script: fix keystore_pool size

Gnuk supports RSA keys up to 4096 bits. This require 1024 bytes of
storage (p and q are 256 bytes, n is 512 bytes). The linker script
should therefore reserve 1024 bytes per key instead of 512.

In practice it's not an issue at all as all supported MCU have a page
size bigger than 1024 bytes and Gnuk use one page per key.

2 years agoUpdate ChangeLog, README, AUTHORS, and THANKS.
NIIBE Yutaka [Tue, 17 Oct 2017 06:26:46 +0000 (15:26 +0900)]
Update ChangeLog, README, AUTHORS, and THANKS.

2 years agopolarssl: use a bigger sliding window when possible
Aurelien Jarno [Thu, 12 Oct 2017 20:02:25 +0000 (22:02 +0200)]
polarssl: use a bigger sliding window when possible

2 years agomalloc: rename MEMORY_ into HEAP_
Aurelien Jarno [Thu, 12 Oct 2017 20:02:24 +0000 (22:02 +0200)]
malloc: rename MEMORY_ into HEAP_

That way MEMORY_SIZE can be exported in a later patch.

2 years agopolarssl: add ARM DSP optimized mpi_montsqr
Aurelien Jarno [Thu, 12 Oct 2017 20:02:23 +0000 (22:02 +0200)]
polarssl: add ARM DSP optimized mpi_montsqr

2 years agopolarssl: replace BIGNUM_C_IMPLEMENTATION check
Aurelien Jarno [Thu, 12 Oct 2017 20:02:22 +0000 (22:02 +0200)]
polarssl: replace BIGNUM_C_IMPLEMENTATION check

Replace the BIGNUM_C_IMPLEMENTATION check by a check on POLARSSL_HAVE_ASM
and __arm__. This way it's possible to use this code on non arm, but
also to run the GNU/Linux emulation on an arm machine, which is useful
for debugging and profiling.

2 years agopolarssl: add ARM DSP optimized MULADDC code
Aurelien Jarno [Thu, 12 Oct 2017 20:02:21 +0000 (22:02 +0200)]
polarssl: add ARM DSP optimized MULADDC code

The Cortex M4, M7 MCUs and the Cortex A CPUs support the ARM DSP
instructions, and especially the umaal instruction which greatly
speed up MULADDC code.

2 years agopolarssl: rename MULADDC_HUIT into MULADDC_HUIT_DEAD
Aurelien Jarno [Thu, 12 Oct 2017 20:02:20 +0000 (22:02 +0200)]
polarssl: rename MULADDC_HUIT into MULADDC_HUIT_DEAD

As the comment above said, it's dead code. Renaming it make sure it's
not used by mistake, for example when testing/debugging code.

2 years agopolarssl: fix build without POLARSSL_HAVE_ASM
Aurelien Jarno [Thu, 12 Oct 2017 20:02:19 +0000 (22:02 +0200)]
polarssl: fix build without POLARSSL_HAVE_ASM

This fixes building polarssl for architectures without assembly code or
when POLARSSL_HAVE_ASM is not defined.

This has been done in upstream commit a755ca1bbe, but somehow the
generic version has been missed in gnuk's version.

2 years 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>
2 years agoFix test/*.
NIIBE Yutaka [Wed, 11 Oct 2017 07:06:15 +0000 (16:06 +0900)]
Fix test/*.

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

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

2 years 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.

2 years 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.

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

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

2 years 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.

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

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

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

2 years 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.

2 years 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.

2 years 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.

2 years 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.

2 years 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.

2 years 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.

2 years 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.

2 years 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.

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

2 years 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.

2 years 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.

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

2 years 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.

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

2 years 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.

2 years 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.

2 years 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.

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

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

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

2 years 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.

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

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

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

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

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

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

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

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

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