From f18a8a20acf3695d8941b2180a7714271ebddd51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Wed, 10 Sep 2014 13:40:51 +0200 Subject: [PATCH] Add newly discussed design decisions for passphrase cache service --- .../keychain/service/PassphraseCacheService.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java index 736d46dc9..0ac1812f3 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java @@ -56,6 +56,15 @@ import java.util.Date; * This service runs in its own process, but is available to all other processes as the main * passphrase cache. Use the static methods addCachedPassphrase and getCachedPassphrase for * convenience. + * + * Design decisions: + * - Cache passphrases based on master key ids, but try to unlock before using the subkey id + * (to be compatible with stripped keys) + * - Cache based on master key id so that there is not need to enter a passphrase twice for sign and + * decrypt (if these are two different subkeys) + * - Assume that all passphrases cached here are valid passphrases + * - Do not handle if a keyring contains subkeys with different passphrases. This is not considered + * supported and has not been seen in other OpenPGP implementations */ public class PassphraseCacheService extends Service {