key_config.proto 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright (C) 2018 The Android Open Source Project
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. syntax = "proto2";
  17. package keystore;
  18. option optimize_for = LITE_RUNTIME;
  19. message KeyConfig {
  20. // What type of encryption algorithm is this key being generated/imported for
  21. // e.g. AES, RSA, etc
  22. optional string algorithm = 1;
  23. // Size of the key being generated/imported
  24. optional int32 key_size = 2;
  25. // Log whether the key was generated, imported, securely imported, or derived.
  26. optional string origin = 3;
  27. // What auth types does this key require? If none, then no auth required.
  28. optional string user_auth_type = 4;
  29. // If user authentication is required, is the requirement time based? If it
  30. // is not time based then this field will not be used and the key is per
  31. // operation. Per operation keys must be user authenticated on each usage.
  32. optional int32 user_auth_key_timeout = 5;
  33. // Track which padding modes this key supports.
  34. repeated string padding = 6;
  35. // Track which digests this key supports
  36. repeated string digest = 7;
  37. // Check what block mode is being used depending on the mode of encryption
  38. repeated string block_mode = 8;
  39. // Was the key generated/imported successfully?
  40. optional bool was_creation_successful = 9;
  41. // What purposes can this key be used for?
  42. repeated string purpose = 10;
  43. // Which ec curve was selected if elliptic curve cryptography is in use
  44. optional string ec_curve = 11;
  45. // Standalone or is a file system required
  46. optional string key_blob_usage_reqs = 12;
  47. }