xref: /aosp_15_r20/external/tink/proto/aes_gcm_hkdf_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
17// Definitions for streaming encryption using AES-GCM
18// with HKDF as key derivation function.
19syntax = "proto3";
20
21package google.crypto.tink;
22
23import "proto/common.proto";
24
25option java_package = "com.google.crypto.tink.proto";
26option java_multiple_files = true;
27option go_package = "github.com/google/tink/go/proto/aes_gcm_hkdf_streaming_go_proto";
28
29message AesGcmHkdfStreamingParams {
30  uint32 ciphertext_segment_size = 1;
31  uint32 derived_key_size = 2;  // size of AES-GCM keys derived for each segment
32  HashType hkdf_hash_type = 3;
33}
34
35message AesGcmHkdfStreamingKeyFormat {
36  uint32 version = 3;
37  AesGcmHkdfStreamingParams 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.AesGcmHkdfStreamingKey
42message AesGcmHkdfStreamingKey {
43  uint32 version = 1;
44  AesGcmHkdfStreamingParams params = 2;
45  bytes key_value = 3;
46}
47