• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2024 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 SlhDsaHashType {
21  SLH_DSA_HASH_TYPE_UNSPECIFIED = 0;
22  SHA2 = 1;
23  SHAKE = 2;
24}
25
26enum SlhDsaSignatureType {
27  SLH_DSA_SIGNATURE_TYPE_UNSPECIFIED = 0;
28  FAST_SIGNING = 1;
29  SMALL_SIGNATURE = 2;
30}
31
32// Protos for the Stateless Hash-Based Digital Signature Algorithm
33// https://csrc.nist.gov/pubs/fips/205/final
34message SlhDsaParams {
35  // Required
36  int32 key_size = 1;
37  // Required.
38  SlhDsaHashType hash_type = 2;
39  // Required.
40  SlhDsaSignatureType sig_type = 3;
41}
42
43message SlhDsaKeyFormat {
44  uint32 version = 1;
45  // Required.
46  SlhDsaParams params = 2;
47}
48
49// key_type: type.googleapis.com/google.crypto.tink.SlhDsaPublicKey
50message SlhDsaPublicKey {
51  // Required.
52  uint32 version = 1;
53  // Required.
54  bytes key_value = 2;  // Placeholder for ctype.
55  // Required
56  SlhDsaParams params = 3;
57}
58
59// key_type: type.googleapis.com/google.crypto.tink.SlhDsaPrivateKey
60message SlhDsaPrivateKey {
61  // Required.
62  uint32 version = 1;
63  // Required.
64  bytes key_value = 2;  // Placeholder for ctype.
65  // Required. The corresponding public key.
66  SlhDsaPublicKey public_key = 3;
67}
68