Home | History | Annotate | Download | only in keystore
      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 
     17 syntax = "proto2";
     18 
     19 package keystore;
     20 
     21 option optimize_for = LITE_RUNTIME;
     22 
     23 message OperationConfig {
     24   // What type of encryption algorithm is the key being used in the op for.
     25   optional string algorithm = 1;
     26 
     27   // Size of the key being used in this op
     28   optional int32 key_size = 2;
     29 
     30   // Log whether the key in this op was generated, imported,
     31   // securely imported, or derived.
     32   optional string origin = 3;
     33 
     34   // What auth types does this op require? If none, then no auth required.
     35   optional string user_auth_type = 4;
     36 
     37   // If user authentication is required, is the requirement time based? If it
     38   // is not time based then this field will not be used and the key is per
     39   // operation. Per operation keys must be user authenticated on each usage.
     40   optional int32 user_auth_key_timeout = 5;
     41 
     42   // Track which padding mode was used for this operation.
     43   optional string padding = 6;
     44 
     45   // Keep track of the digest algorithm being used.
     46   optional string digest = 7;
     47 
     48   // Check what block mode is being used depending on the mode of encryption
     49   optional string block_mode = 8;
     50 
     51   // Did the operation succeed? If it didn't, this represents bugs or
     52   // error cases occurring.
     53   optional bool was_op_successful = 9;
     54 
     55   // What purpose is this operation serving? Encrypt, decrypt, sign verify?
     56   optional string purpose = 10;
     57 
     58   // Which ec curve was selected if elliptic curve cryptography is in use
     59   optional string ec_curve = 11;
     60 
     61   // Standalone or is a file system required
     62   optional string key_blob_usage_reqs = 12;
     63 }
     64