aboutsummaryrefslogtreecommitdiff
path: root/dbus/cryptohome
diff options
context:
space:
mode:
authorWill Drewry <wad@chromium.org>2014-05-27 15:59:52 -0500
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-05-29 23:14:27 +0000
commit99db29fd359e9e574cf98ac51869586375bb6ca1 (patch)
tree8e1a4178d281c6ff42db167f6a4e3b3e6ac5f74f /dbus/cryptohome
parent228a40bc354952588fa90d361b1fb0aa2a979a40 (diff)
downloadsystem_api-99db29fd359e9e574cf98ac51869586375bb6ca1.tar.gz
key.proto: add KeyProviderData and renamed CROS_LEGACY
Add KeyProviderData to KeyData such that the provider of a key can store the metadata that it needs at a future time to regenerate the key, such as the salt or a pre-hashing algorithm, and so on. Additionally, KeyType KEY_TYPE_PASSWORD_CROS_LEGACY was renamed to KEY_TYPE_PASSWORD to indicate that a secret is used (as opposed to a asymmetric one). CROS_LEGACY as a name was a misstep because it leaked client information (hashing approach) into the Key type rather than making it a client-specific attribute, e.g., via KeyProviderData or a KeyProviderType attribute. cryptohome only needs to be aware that the key type means a secret will be presented in order to unwrap the data it protects. (As there are no references in Chromium or cryptohome to the original type, the renaming should have no perceivable impact.) TEST=builds BUG=chromium:367847 Change-Id: Iaba2c665add9a30b839da69d354e4d1643c38fd8 Reviewed-on: https://chromium-review.googlesource.com/201730 Reviewed-by: Darren Krahn <dkrahn@chromium.org> Commit-Queue: Will Drewry <wad@chromium.org> Tested-by: Will Drewry <wad@chromium.org>
Diffstat (limited to 'dbus/cryptohome')
-rw-r--r--dbus/cryptohome/key.proto19
-rw-r--r--dbus/cryptohome/rpc.proto2
2 files changed, 18 insertions, 3 deletions
diff --git a/dbus/cryptohome/key.proto b/dbus/cryptohome/key.proto
index 429d126..3f51d6a 100644
--- a/dbus/cryptohome/key.proto
+++ b/dbus/cryptohome/key.proto
@@ -48,10 +48,21 @@ message KeyPrivileges {
optional bool authorized_update = 5 [default=false];
}
+// Public metadata stored on behalf of the KeyProvider.
+message KeyProviderData {
+ message Entry {
+ optional string name = 1;
+ optional int64 number = 2;
+ optional bytes bytes = 3;
+ }
+ repeated Entry entry = 1;
+}
+
message KeyData {
+ // The KeyType should specify the handling needed by Cryptohome
+ // and not a provider KeyType.
enum KeyType {
- // All password wrapping prior to the creation of this enum.
- KEY_TYPE_PASSWORD_CROS_LEGACY = 0;
+ KEY_TYPE_PASSWORD = 0;
}
optional KeyType type = 1;
// All keys must be labeled when persisted to disk, but when KeyData
@@ -63,6 +74,10 @@ message KeyData {
optional int64 revision = 4;
// At present, only support for one authorization mechanism is implemented.
repeated KeyAuthorizationData authorization_data = 5;
+ // Data stored for use by the provider of the key, often for pre-processing
+ // of passwords or custom provider key typing.
+ // This will be size-limited by serialized size (e.g., 4096 bytes).
+ optional KeyProviderData provider_data = 6;
}
// Key is not presently persisted to disk, but it acts as the single authority
diff --git a/dbus/cryptohome/rpc.proto b/dbus/cryptohome/rpc.proto
index 03e62bb..7c28263 100644
--- a/dbus/cryptohome/rpc.proto
+++ b/dbus/cryptohome/rpc.proto
@@ -54,7 +54,7 @@ message AuthorizationRequest {
// |key| must supply at least a |key.secret()|. If no |key.data()| or
// |key.data().label()| is supplied, the |key.secret()| will be tested
// against all compatible |key.data().type()| keys, where
- // KEY_TYPE_PASSWORD_CROS_LEGACY is the default type. If
+ // KEY_TYPE_PASSWORD is the default type. If
// |key.data().label()| is supplied, then the |key.secret()| will only be
// tested against the matching VaultKeyset.
optional Key key = 1;