card serial number change

This commit is contained in:
NIIBE Yutaka
2015-09-04 17:03:52 +09:00
parent 482742394d
commit c9f88bb9f1
4 changed files with 28 additions and 4 deletions

View File

@@ -1,3 +1,10 @@
2015-09-04 Niibe Yutaka <gniibe@fsij.org>
* src/openpgp-do.c (do_openpgpcard_aid): Use upper bytes of unique
ID of MCU; same as USB serial number.
* src/configure (help): Add NITROKEY_START.
2015-08-26 Mateusz Zalega <mateusz@nitrokey.com> 2015-08-26 Mateusz Zalega <mateusz@nitrokey.com>
* GNUK_USB_DEVICE_ID: Add Nitrokey Start. * GNUK_USB_DEVICE_ID: Add Nitrokey Start.

13
NEWS
View File

@@ -1,5 +1,18 @@
Gnuk NEWS - User visible changes Gnuk NEWS - User visible changes
* Major changes in Gnuk 1.1.8
Released 2015-09-??, by NIIBE Yutaka
** Upgrade of Chopstx
We use Chopstx 0.09, which supports Nitroky-Start.
** Card serial number
The way to determine a serial number of Gnuk Token for card has been
changed. It uses the 96-bit unique bits of MCU, but the portion for
use is changed.
* Major changes in Gnuk 1.1.7 * Major changes in Gnuk 1.1.7
Released 2015-08-05, by NIIBE Yutaka Released 2015-08-05, by NIIBE Yutaka

1
src/configure vendored
View File

@@ -107,6 +107,7 @@ Configuration:
STBEE STBEE
STBEE_MINI STBEE_MINI
MAPLE_MINI MAPLE_MINI
NITROKEY_START
CQ_STARM CQ_STARM
FST_01_00 (unreleased version with 8MHz XTAL) FST_01_00 (unreleased version with 8MHz XTAL)
--enable-debug debug with virtual COM port [no] --enable-debug debug with virtual COM port [no]

View File

@@ -631,16 +631,19 @@ do_openpgpcard_aid (uint16_t tag, int with_tag)
if (vid == 0xffff || vid == 0x0000) if (vid == 0xffff || vid == 0x0000)
{ {
const uint8_t *u = unique_device_id (); const uint8_t *u = unique_device_id () + 8;
memcpy (res_p, openpgpcard_aid, 8); memcpy (res_p, openpgpcard_aid, 8);
res_p += 8; res_p += 8;
/* vid == 0xfffe: serial number is random byte */ /* vid == 0xfffe: serial number is four random bytes */
*res_p++ = 0xff; *res_p++ = 0xff;
*res_p++ = 0xfe; *res_p++ = 0xfe;
memcpy (res_p, u, 4);
res_p += 4; *res_p++ = u[3];
*res_p++ = u[2];
*res_p++ = u[1];
*res_p++ = u[0];
} }
else else
{ {