mirror of
https://salsa.debian.org/gnuk-team/gnuk/gnuk.git
synced 2024-09-21 03:10:08 +00:00
36 lines
820 B
Plaintext
36 lines
820 B
Plaintext
USB communication
|
|
=================
|
|
|
|
* No command chaining, but extended APDU and extended Lc and Le
|
|
|
|
* dwMaxCCIDMessageLength: 64
|
|
|
|
|
|
OpenPGP card protocol implementation
|
|
====================================
|
|
|
|
I try to follow "no clear password(s)" policy.
|
|
After key import, keystrings are also removed.
|
|
But because of this, we only support single key for this version.
|
|
|
|
|
|
How a private key is stored
|
|
===========================
|
|
|
|
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
|