1// Copyright 2020 Google LLC 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 21option java_package = "com.google.crypto.tink.proto"; 22option java_multiple_files = true; 23option go_package = "github.com/google/tink/go/proto/jwt_hmac_go_proto"; 24 25// See https://datatracker.ietf.org/doc/html/rfc7518#section-3.2 26enum JwtHmacAlgorithm { 27 HS_UNKNOWN = 0; 28 HS256 = 1; // HMAC using SHA-256 29 HS384 = 2; // HMAC using SHA-384 30 HS512 = 3; // HMAC using SHA-512 31} 32 33// key_type: type.googleapis.com/google.crypto.tink.JwtHmacKey 34message JwtHmacKey { 35 uint32 version = 1; 36 JwtHmacAlgorithm algorithm = 2; 37 bytes key_value = 3; 38 39 // Optional, custom kid header value to be used with "RAW" keys. 40 // "TINK" keys with this value set will be rejected. 41 message CustomKid { 42 string value = 1; 43 } 44 CustomKid custom_kid = 4; 45} 46 47message JwtHmacKeyFormat { 48 uint32 version = 1; 49 JwtHmacAlgorithm algorithm = 2; 50 uint32 key_size = 3; 51} 52