xref: /aosp_15_r20/external/tink/proto/aes_ctr_hmac_streaming.proto (revision e7b1675dde1b92d52ec075b0a92829627f2c52a5)
1// Copyright 2017 Google Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15////////////////////////////////////////////////////////////////////////////////
16
17syntax = "proto3";
18
19package google.crypto.tink;
20
21import "proto/common.proto";
22import "proto/hmac.proto";
23
24option java_package = "com.google.crypto.tink.proto";
25option java_multiple_files = true;
26option go_package = "github.com/google/tink/go/proto/aes_ctr_hmac_streaming_go_proto";
27
28message AesCtrHmacStreamingParams {
29  uint32 ciphertext_segment_size = 1;
30  uint32 derived_key_size = 2;  // size of AES-CTR keys derived for each segment
31  HashType hkdf_hash_type = 3;  // hash function for key derivation via HKDF
32  HmacParams hmac_params = 4;   // params for authentication tags
33}
34
35message AesCtrHmacStreamingKeyFormat {
36  uint32 version = 3;
37  AesCtrHmacStreamingParams params = 1;
38  uint32 key_size = 2;  // size of the main key (aka. "ikm", input key material)
39}
40
41// key_type: type.googleapis.com/google.crypto.tink.AesCtrHmacStreamingKey
42message AesCtrHmacStreamingKey {
43  uint32 version = 1;
44  AesCtrHmacStreamingParams params = 2;
45  bytes key_value = 3;  // the main key, aka. "ikm", input key material
46}
47