git.gniibe.org/gnuk/gnuk.git
4 weeks agoFix README about -no-vidpid file name. master
NIIBE Yutaka [Thu, 23 Aug 2018 05:30:07 +0000 (14:30 +0900)]
Fix README about -no-vidpid file name.

4 weeks agoFix for GCC 7.
NIIBE Yutaka [Mon, 20 Aug 2018 07:07:07 +0000 (16:07 +0900)]
Fix for GCC 7.

2 months agoAdd ChangeLog entry.
NIIBE Yutaka [Fri, 13 Jul 2018 07:28:29 +0000 (16:28 +0900)]
Add ChangeLog entry.

2 months agoFix typo
Szczepan Zalega [Wed, 4 Jul 2018 12:16:37 +0000 (14:16 +0200)]
Fix typo

Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
2 months agoCatch exception, when no KDF data is found
Szczepan Zalega [Wed, 4 Jul 2018 12:14:07 +0000 (14:14 +0200)]
Catch exception, when no KDF data is found

While updating from GNUK 1.2.6, upgrade_by_passwd.py script shows
exception about not found referenced data:
  File "./upgrade_by_passwd.py", line 55, in main
    kdf_data = gnuk.cmd_get_data(0x00, 0xf9).tostring()
  File "/home/sz/work/nitrokey-start-firmware/tool/gnuk_token.py", line 320, in cmd_get_data
    raise ValueError("%02x%02x" % (sw[0], sw[1]))
ValueError: 6a88

While it is checked, whether the KDF DO is empty, there is no
exception catch for not found object. This patch adds it.
Tested update paths 1.2.6 -> 1.2.10, 1.2.6 -> 1.2.6, 1.2.10 -> 1.2.10, 1.2.10 -> 1.2.6.

Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
4 months agoVersion 1.2.10. release/1.2.10
NIIBE Yutaka [Thu, 10 May 2018 04:54:21 +0000 (13:54 +0900)]
Version 1.2.10.

4 months agoVersion 1.2.10.
NIIBE Yutaka [Thu, 10 May 2018 04:48:17 +0000 (13:48 +0900)]
Version 1.2.10.

4 months agognuk.elf is the target with VID:PID. New target gnuk-no-vidpid.elf.
NIIBE Yutaka [Thu, 10 May 2018 03:09:19 +0000 (12:09 +0900)]
gnuk.elf is the target with VID:PID.  New target gnuk-no-vidpid.elf.

4 months agoUpdate Chopstx to 1.9.
NIIBE Yutaka [Thu, 10 May 2018 03:04:37 +0000 (12:04 +0900)]
Update Chopstx to 1.9.

4 months agoMore usb_device_reset fix.
NIIBE Yutaka [Thu, 26 Apr 2018 12:23:44 +0000 (21:23 +0900)]
More usb_device_reset fix.

4 months agoFix USB initialization.
NIIBE Yutaka [Thu, 26 Apr 2018 12:08:30 +0000 (21:08 +0900)]
Fix USB initialization.

After USB RESET, all endpoints registers are being reset.  So,
there is no need to let each endpoint stall (it's disabled).
Actually, it's wrong to call usb_lld_stall_rx or usb_lld_stall_tx
before usb_lld_setup_endpoint, because other fields of endpoint
register are not specified after RESET.

4 months agoSupport GD32F103.
NIIBE Yutaka [Thu, 26 Apr 2018 08:33:48 +0000 (17:33 +0900)]
Support GD32F103.

5 months agoVersion 1.2.9. release/1.2.9
NIIBE Yutaka [Thu, 5 Apr 2018 05:00:50 +0000 (14:00 +0900)]
Version 1.2.9.

5 months agoMore tests for admin-less mode.
NIIBE Yutaka [Thu, 5 Apr 2018 04:06:13 +0000 (13:06 +0900)]
More tests for admin-less mode.

5 months agoFix admin-less mode -> admin-full mode change.
NIIBE Yutaka [Thu, 5 Apr 2018 03:13:45 +0000 (12:13 +0900)]
Fix admin-less mode -> admin-full mode change.

5 months agoUpdate ChangeLog.
NIIBE Yutaka [Wed, 4 Apr 2018 10:33:56 +0000 (19:33 +0900)]
Update ChangeLog.

5 months agoUpdate copyright year.
NIIBE Yutaka [Wed, 4 Apr 2018 10:29:35 +0000 (19:29 +0900)]
Update copyright year.

5 months agoMore check for length of PW1.
NIIBE Yutaka [Wed, 4 Apr 2018 10:28:42 +0000 (19:28 +0900)]
More check for length of PW1.

5 months agoFix removal of resetting code.
NIIBE Yutaka [Wed, 4 Apr 2018 09:59:28 +0000 (18:59 +0900)]
Fix removal of resetting code.

5 months agoMore tests (3).
NIIBE Yutaka [Wed, 4 Apr 2018 08:42:14 +0000 (17:42 +0900)]
More tests (3).

5 months agoMore tests (2).
NIIBE Yutaka [Wed, 4 Apr 2018 07:34:51 +0000 (16:34 +0900)]
More tests (2).

5 months agoMore tests.
NIIBE Yutaka [Wed, 4 Apr 2018 07:34:07 +0000 (16:34 +0900)]
More tests.

5 months agoMore test suite improvement. Add experimental KDF DO tests.
NIIBE Yutaka [Wed, 4 Apr 2018 06:44:34 +0000 (15:44 +0900)]
More test suite improvement.  Add experimental KDF DO tests.

5 months agoTest suite improvement.
NIIBE Yutaka [Wed, 4 Apr 2018 06:09:30 +0000 (15:09 +0900)]
Test suite improvement.

5 months agoAdd a test case to reset PW3.
NIIBE Yutaka [Wed, 4 Apr 2018 01:51:32 +0000 (10:51 +0900)]
Add a test case to reset PW3.

5 months agoRename tests.
NIIBE Yutaka [Tue, 3 Apr 2018 23:48:40 +0000 (08:48 +0900)]
Rename tests.

5 months agoClear all keystrings when KDF DO is written.
NIIBE Yutaka [Tue, 3 Apr 2018 11:24:28 +0000 (20:24 +0900)]
Clear all keystrings when KDF DO is written.

5 months agoFix tool/.
NIIBE Yutaka [Tue, 3 Apr 2018 06:12:58 +0000 (15:12 +0900)]
Fix tool/.

5 months agoSupport authentication with KDF Data Object.
NIIBE Yutaka [Mon, 2 Apr 2018 02:13:55 +0000 (11:13 +0900)]
Support authentication with KDF Data Object.

5 months agoFix kdf_calc.py.
NIIBE Yutaka [Mon, 2 Apr 2018 01:44:17 +0000 (10:44 +0900)]
Fix kdf_calc.py.

5 months agoAdd kdf_calc.py.
NIIBE Yutaka [Sat, 31 Mar 2018 01:28:54 +0000 (10:28 +0900)]
Add kdf_calc.py.

5 months agoFix previous commit.
NIIBE Yutaka [Fri, 30 Mar 2018 08:46:52 +0000 (17:46 +0900)]
Fix previous commit.

5 months agoSupport single-salt KDF for admin-less mode.
NIIBE Yutaka [Fri, 30 Mar 2018 01:36:11 +0000 (10:36 +0900)]
Support single-salt KDF for admin-less mode.

6 months agoKDF format validation should be done before removing data object.
NIIBE Yutaka [Thu, 22 Mar 2018 07:03:56 +0000 (16:03 +0900)]
KDF format validation should be done before removing data object.

6 months agofactory-reset should erase all upgrade public keys.
NIIBE Yutaka [Tue, 13 Mar 2018 05:05:18 +0000 (14:05 +0900)]
factory-reset should erase all upgrade public keys.

7 months agoFix KDF DO handling.
NIIBE Yutaka [Mon, 12 Feb 2018 22:26:29 +0000 (07:26 +0900)]
Fix KDF DO handling.

7 months agoFix .gitignore. release/1.2.8
NIIBE Yutaka [Tue, 23 Jan 2018 04:47:46 +0000 (13:47 +0900)]
Fix .gitignore.

7 months agoFix README.
NIIBE Yutaka [Tue, 23 Jan 2018 04:26:41 +0000 (13:26 +0900)]
Fix README.

7 months agoVersion 1.2.8.
NIIBE Yutaka [Tue, 23 Jan 2018 01:13:13 +0000 (10:13 +0900)]
Version 1.2.8.

7 months agoFix the procedure to put VID:PID. Apply the procedure to regnual.
NIIBE Yutaka [Tue, 23 Jan 2018 01:11:35 +0000 (10:11 +0900)]
Fix the procedure to put VID:PID.  Apply the procedure to regnual.

7 months agoUpdate documentation.
NIIBE Yutaka [Tue, 23 Jan 2018 00:31:03 +0000 (09:31 +0900)]
Update documentation.

7 months agoCheck passphrase length when changing.
NIIBE Yutaka [Mon, 22 Jan 2018 02:55:10 +0000 (11:55 +0900)]
Check passphrase length when changing.

7 months agoRemove keystring with BY_ADMIN when it's becomming admin-less mode.
NIIBE Yutaka [Mon, 22 Jan 2018 02:02:02 +0000 (11:02 +0900)]
Remove keystring with BY_ADMIN when it's becomming admin-less mode.

8 months agoVIDPID substitution at the last stage of build.
NIIBE Yutaka [Fri, 19 Jan 2018 13:36:01 +0000 (22:36 +0900)]
VIDPID substitution at the last stage of build.

8 months agoAdd binary-edit.sh.
NIIBE Yutaka [Fri, 19 Jan 2018 13:22:29 +0000 (22:22 +0900)]
Add binary-edit.sh.

8 months agoUpdate Chopstx to 1.8.
NIIBE Yutaka [Fri, 19 Jan 2018 13:15:21 +0000 (22:15 +0900)]
Update Chopstx to 1.8.

8 months agoUpdate neug.c.
NIIBE Yutaka [Thu, 18 Jan 2018 10:42:40 +0000 (19:42 +0900)]
Update neug.c.

8 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.

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

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

9 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.

9 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.

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

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

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

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

10 months 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.

10 months 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.

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

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

10 months 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.

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

10 months 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.

10 months 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.

10 months 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.

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

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

10 months 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.

10 months 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.

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

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

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

10 months 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.

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

10 months 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.

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

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

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

10 months 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.

11 months 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.

11 months 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.

11 months 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

11 months 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.

11 months 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

11 months 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.

11 months 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.

11 months 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.

11 months 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.

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

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

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

11 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.

11 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.

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

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

11 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.

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

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

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