operation_config.proto 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. // A single operation config
  20. message OperationConfig {
  21. // What type of encryption algorithm is the key being used in the op for.
  22. optional string algorithm = 1;
  23. // Size of the key being used in this op
  24. optional int32 key_size = 2;
  25. // Log whether the key in this op was generated, imported,
  26. // securely imported, or derived.
  27. optional string origin = 3;
  28. // What auth types does this op require? If none, then no auth required.
  29. optional string user_auth_type = 4;
  30. // If user authentication is required, is the requirement time based? If it
  31. // is not time based then this field will not be used and the key is per
  32. // operation. Per operation keys must be user authenticated on each usage.
  33. optional int32 user_auth_key_timeout = 5;
  34. // Track which padding mode was used for this operation.
  35. optional string padding = 6;
  36. // Keep track of the digest algorithm being used.
  37. optional string digest = 7;
  38. // Check what block mode is being used depending on the mode of encryption
  39. optional string block_mode = 8;
  40. // Did the operation succeed? If it didn't, this represents bugs or
  41. // error cases occurring.
  42. optional bool was_op_successful = 9;
  43. // What purpose is this operation serving? Encrypt, decrypt, sign verify?
  44. optional string purpose = 10;
  45. // Which ec curve was selected if elliptic curve cryptography is in use
  46. optional string ec_curve = 11;
  47. // Standalone or is a file system required
  48. optional string key_blob_usage_reqs = 12;
  49. }
  50. message OperationConfigEvent {
  51. optional OperationConfig op_config = 1;
  52. // counts corresponds to the number of times each op_config in the above array
  53. // was recorded during the collection period.
  54. optional uint32 count = 2;
  55. }
  56. message OperationConfigEvents {
  57. repeated OperationConfigEvent op_config_events = 1;
  58. }