1// Copyright 2021 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/////////////////////////////////////////////////////////////////////////////// 16syntax = "proto3"; 17 18package google.crypto.tink; 19 20enum SphincsHashType { 21 HASH_TYPE_UNSPECIFIED = 0; 22 HARAKA = 1; 23 SHA256 = 2; 24 SHAKE256 = 3; 25} 26 27enum SphincsVariant { 28 VARIANT_UNSPECIFIED = 0; 29 ROBUST = 1; 30 SIMPLE = 2; 31} 32 33enum SphincsSignatureType { 34 SIG_TYPE_UNSPECIFIED = 0; 35 FAST_SIGNING = 1; 36 SMALL_SIGNATURE = 2; 37} 38 39// Protos for Sphincs Digital Signature Algorithm. 40message SphincsParams { 41 // Required 42 int32 key_size = 1; 43 // Required. 44 SphincsHashType hash_type = 2; 45 // Required. 46 SphincsVariant variant = 3; 47 // Required. 48 SphincsSignatureType sig_length_type = 4; 49} 50 51message SphincsKeyFormat { 52 uint32 version = 1; 53 // Required. 54 SphincsParams params = 2; 55} 56 57// key_type: type.googleapis.com/google.crypto.tink.SphincsPublicKey 58message SphincsPublicKey { 59 // Required. 60 uint32 version = 1; 61 // Required. 62 bytes key_value = 2; 63 // Required 64 SphincsParams params = 3; 65} 66 67// key_type: type.googleapis.com/google.crypto.tink.SphincsPrivateKey 68message SphincsPrivateKey { 69 // Required. 70 uint32 version = 1; 71 // Required. 72 bytes key_value = 2; 73 // The corresponding public key. 74 SphincsPublicKey public_key = 3; 75} 76