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 21option java_package = "com.google.crypto.tink.proto"; 22option java_multiple_files = true; 23option go_package = "github.com/google/tink/go/proto/jwt_ecdsa_go_proto"; 24 25// See https://datatracker.ietf.org/doc/html/rfc7518#section-3.4 26enum JwtEcdsaAlgorithm { 27 ES_UNKNOWN = 0; 28 ES256 = 1; // ECDSA using P-256 and SHA-256 29 ES384 = 2; // ECDSA using P-384 and SHA-384 30 ES512 = 3; // ECDSA using P-521 and SHA-512 31} 32 33// key_type: type.googleapis.com/google.crypto.tink.JwtEcdsaPublicKey 34message JwtEcdsaPublicKey { 35 uint32 version = 1; 36 JwtEcdsaAlgorithm algorithm = 2; 37 // Affine coordinates of the public key in big-endian representation. The 38 // public key is a point (x, y) on the curve defined by algorithm. 39 bytes x = 3; 40 bytes y = 4; 41 42 // Optional, custom kid header value to be used with "RAW" keys. 43 // "TINK" keys with this value set will be rejected. 44 message CustomKid { 45 string value = 1; 46 } 47 CustomKid custom_kid = 5; 48} 49 50// key_type: type.googleapis.com/google.crypto.tink.JwtEcdsaPrivateKey 51message JwtEcdsaPrivateKey { 52 uint32 version = 1; 53 JwtEcdsaPublicKey public_key = 2; 54 // Unsigned big integer in bigendian representation. 55 bytes key_value = 3; 56} 57 58message JwtEcdsaKeyFormat { 59 uint32 version = 1; 60 JwtEcdsaAlgorithm algorithm = 2; 61} 62