1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-05-31 22:18:03 +02:00
gnupg/scd
Werner Koch 63bda3aad8
scd:openpgp: Implement PIN cache.
* scd/app-openpgp.c (wipe_and_free, wipe_and_free_string): Use them
everywere where we do a wipememory followed by a free.
(pin2hash_if_kdf): Change interface.  The input PIN is not anymore
changed.  Further there are no more assumptions about the length of
the provided buffer.
(cache_pin): Restructure.
(chvno_to_keyref): New.
(pin_from_cache): New.
(verify_a_chv): Add arg CTRL.  Adjust for changed pin2hash_if_kdf.
Chache and retrieve the PIN here.
(verify_chv2): Do not cache the PIN here.
(build_enter_admin_pin_prompt): Add arg 'r_remaining'.
(verify_chv3): Adjust for changed pin2hash_if_kdf.  Implement the PIN
cache.
(do_change_pin): Clear the PIN cache.  Do not change the PIN here.
Lots of adjustments to cope with the chnaged pin2hash_if_kdf.
(do_sign): Do not cache the PIN here.
--

Note that some of the changes are required because we can't rely that
the PIN is always cached in secure memory.  Thus it is better to do an
explicit wipe.

Testing the PIN cache can currently only be done my modifying the
code to do a verification for each operation.  Only some basic testing
has been done.  Clearing the PIN cache is also not fully
implemented.  With the forthcoming changes to app-piv we should be
enter able to test the PIN cache.

Missing stuff:
 - The agent should be able to selectively clear the cache on a per
   slot base.
 - We should replace AESWRAP by OCB.

Signed-off-by: Werner Koch <wk@gnupg.org>
2020-01-09 12:14:05 +01:00
..
apdu.c scd,pcsc: Use HANDLE for context and card. 2019-09-17 19:54:52 +09:00
apdu.h scd,pcsc: Remove the restriction of no-scanning in PC/SC. 2019-09-12 08:48:48 +09:00
app-common.h scd: First changes to implement a PIN cache. 2020-01-07 18:45:33 +01:00
app-dinsig.c scd: First changes to implement a PIN cache. 2020-01-07 18:45:33 +01:00
app-geldkarte.c scd: First changes to implement a PIN cache. 2020-01-07 18:45:33 +01:00
app-help.c scd: Simplify inclusion of app-common.h. 2019-06-21 11:42:59 +02:00
app-nks.c scd: First changes to implement a PIN cache. 2020-01-07 18:45:33 +01:00
app-openpgp.c scd:openpgp: Implement PIN cache. 2020-01-09 12:14:05 +01:00
app-p15.c scd: First changes to implement a PIN cache. 2020-01-07 18:45:33 +01:00
app-piv.c scd: First changes to implement a PIN cache. 2020-01-07 18:45:33 +01:00
app-sc-hsm.c scd: First changes to implement a PIN cache. 2020-01-07 18:45:33 +01:00
app.c scd: First changes to implement a PIN cache. 2020-01-07 18:45:33 +01:00
atr.c Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
atr.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
ccid-driver.c doc: Fixed variable naming. 2019-11-26 11:24:08 +01:00
ccid-driver.h scd,ccid: Add 08e6:34c2 (GEMPC_EZIO). 2019-10-15 09:40:01 +09:00
ChangeLog-2011 Generate the ChangeLog from commit logs. 2011-12-01 11:09:02 +01:00
command.c scd: Use a scdaemon internal key to protect the PIN cache IPC. 2020-01-09 12:00:50 +01:00
iso7816.c scd: Error code map fix for older Yubikey. 2019-07-22 10:14:21 +09:00
iso7816.h scd:piv: Implement import of private keys for Yubikeys. 2019-03-05 15:49:20 +01:00
Makefile.am scd: Add very basic support for PIV cards. 2019-01-20 11:45:57 +01:00
scdaemon-w32info.rc w32: Add icons and version information. 2013-05-07 21:35:48 +02:00
scdaemon.c scd: New debug flag "app". 2019-09-05 13:02:59 +02:00
scdaemon.h scd: First changes to implement a PIN cache. 2020-01-07 18:45:33 +01:00