gnuk/doc/NOTES

47 lines
1.4 KiB
Plaintext
Raw Normal View History

2010-09-03 15:42:36 +00:00
USB communication
=================
2010-12-08 05:10:30 +00:00
* No command chaining, but extended APDU and extended Lc and Le.
I think that this keep the code simple.
2010-09-05 16:55:29 +00:00
2011-01-28 08:38:52 +00:00
* Once in the past (version <= 0.4), the value of
dwMaxCCIDMessageLength was 64 and we supported ICC block chaining,
so that we could not handle multple Bulk transactions.
2010-12-08 05:10:30 +00:00
* Now, the value of dwMaxCCIDMessageLength is 320, that's the size
of header of ICC block plus size of maximum APDU (by 64
2011-01-28 08:38:52 +00:00
granularity). Still, some ccid implementation (ccid 1.3.11, for
example) sends ICC block using chaining unfortunately, so we keep
the code of ICC block chaining.
2010-09-03 15:42:36 +00:00
OpenPGP card protocol implementation
====================================
2010-12-08 05:10:30 +00:00
I try to follow "no clear password(s)" policy, even if it is on
protected flash memory. Futher, keystrings for user and reset code
are removed after key imports. Because of this, replacing keys
are not possible without password information. Thus, replacing
existing keys are not supported.
2010-09-03 15:42:36 +00:00
2010-09-05 16:55:29 +00:00
How a private key is stored
===========================
2010-09-03 15:42:36 +00:00
KEYPTR
----> [ P ][ Q ][ N ]
<---encrypted----><--- plain ---->
key_addr 4-byte
additional_data_encrypted 16-byte
dek_encrypted_by_keystring_pw1 16-byte
dek_encrypted_by_keystring_rc 16-byte
dek_encrypted_by_keystring_pw3 16-byte
... decrypted to
[ P ][ Q ]
check 4-byte
random 4-byte
magic[] 8-byte