xref: /aosp_15_r20/external/tink/cc/experimental/pqcrypto/signature/sphincs_key_template.h (revision e7b1675dde1b92d52ec075b0a92829627f2c52a5)
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 ///////////////////////////////////////////////////////////////////////////////
16 
17 #ifndef TINK_EXPERIMENTAL_PQCRYPTO_SIGNATURE_SPHINCS_KEY_TEMPLATE_H_
18 #define TINK_EXPERIMENTAL_PQCRYPTO_SIGNATURE_SPHINCS_KEY_TEMPLATE_H_
19 
20 #include "proto/tink.pb.h"
21 
22 namespace crypto {
23 namespace tink {
24 
25 // Pre-generated KeyTemplates for Sphincs key type.
26 
27 // Returns a KeyTemplate that generates new instances of
28 // SphincsPrivateKey with the following parameters:
29 //   - HASH: HARAKA
30 //   - VARIANT: ROBUST
31 //   - SIGNING TYPE: FAST SIGNING
32 //   - PRIVATE KEY SIZE: 64
33 const google::crypto::tink::KeyTemplate&
34 Sphincs_Haraka_128_F_Robust_KeyTemplate();
35 
36 // Returns a KeyTemplate that generates new instances of
37 // SphincsPrivateKey with the following parameters:
38 //   - HASH: HARAKA
39 //   - VARIANT: SIMPLE
40 //   - SIGNING TYPE: FAST SIGNING
41 //   - PRIVATE KEY SIZE: 64
42 const google::crypto::tink::KeyTemplate&
43 Sphincs_Haraka_128_F_Simple_KeyTemplate();
44 
45 // Returns a KeyTemplate that generates new instances of
46 // SphincsPrivateKey with the following parameters:
47 //   - HASH: HARAKA
48 //   - VARIANT: ROBUST
49 //   - SIGNING TYPE: SMALL SIGNATURE
50 //   - PRIVATE KEY SIZE: 64
51 const google::crypto::tink::KeyTemplate&
52 Sphincs_Haraka_128_S_Robust_KeyTemplate();
53 
54 // Returns a KeyTemplate that generates new instances of
55 // SphincsPrivateKey with the following parameters:
56 //   - HASH: HARAKA
57 //   - VARIANT: SIMPLE
58 //   - SIGNING TYPE: SMALL SIGNATURE
59 //   - PRIVATE KEY SIZE: 64
60 const google::crypto::tink::KeyTemplate&
61 Sphincs_Haraka_128_S_Simple_KeyTemplate();
62 
63 // Returns a KeyTemplate that generates new instances of
64 // SphincsPrivateKey with the following parameters:
65 //   - HASH: HARAKA
66 //   - VARIANT: ROBUST
67 //   - SIGNING TYPE: FAST SIGNING
68 //   - PRIVATE KEY SIZE: 96
69 const google::crypto::tink::KeyTemplate&
70 Sphincs_Haraka_192_F_Robust_KeyTemplate();
71 
72 // Returns a KeyTemplate that generates new instances of
73 // SphincsPrivateKey with the following parameters:
74 //   - HASH: HARAKA
75 //   - VARIANT: SIMPLE
76 //   - SIGNING TYPE: FAST SIGNING
77 //   - PRIVATE KEY SIZE: 96
78 const google::crypto::tink::KeyTemplate&
79 Sphincs_Haraka_192_F_Simple_KeyTemplate();
80 
81 // Returns a KeyTemplate that generates new instances of
82 // SphincsPrivateKey with the following parameters:
83 //   - HASH: HARAKA
84 //   - VARIANT: ROBUST
85 //   - SIGNING TYPE: SMALL SIGNATURE
86 //   - PRIVATE KEY SIZE: 96
87 const google::crypto::tink::KeyTemplate&
88 Sphincs_Haraka_192_S_Robust_KeyTemplate();
89 
90 // Returns a KeyTemplate that generates new instances of
91 // SphincsPrivateKey with the following parameters:
92 //   - HASH: HARAKA
93 //   - VARIANT: SIMPLE
94 //   - SIGNING TYPE: SMALL SIGNATURE
95 //   - PRIVATE KEY SIZE: 96
96 const google::crypto::tink::KeyTemplate&
97 Sphincs_Haraka_192_S_Simple_KeyTemplate();
98 
99 // Returns a KeyTemplate that generates new instances of
100 // SphincsPrivateKey with the following parameters:
101 //   - HASH: HARAKA
102 //   - VARIANT: ROBUST
103 //   - SIGNING TYPE: FAST SIGNING
104 //   - PRIVATE KEY SIZE: 128
105 const google::crypto::tink::KeyTemplate&
106 Sphincs_Haraka_256_F_Robust_KeyTemplate();
107 
108 // Returns a KeyTemplate that generates new instances of
109 // SphincsPrivateKey with the following parameters:
110 //   - HASH: HARAKA
111 //   - VARIANT: SIMPLE
112 //   - SIGNING TYPE: FAST SIGNING
113 //   - PRIVATE KEY SIZE: 128
114 const google::crypto::tink::KeyTemplate&
115 Sphincs_Haraka_256_F_Simple_KeyTemplate();
116 
117 // Returns a KeyTemplate that generates new instances of
118 // SphincsPrivateKey with the following parameters:
119 //   - HASH: HARAKA
120 //   - VARIANT: ROBUST
121 //   - SIGNING TYPE: SMALL SIGNATURE
122 //   - PRIVATE KEY SIZE: 128
123 const google::crypto::tink::KeyTemplate&
124 Sphincs_Haraka_256_S_Robust_KeyTemplate();
125 
126 // Returns a KeyTemplate that generates new instances of
127 // SphincsPrivateKey with the following parameters:
128 //   - HASH: HARAKA
129 //   - VARIANT: SIMPLE
130 //   - SIGNING TYPE: SMALL SIGNATURE
131 //   - PRIVATE KEY SIZE: 128
132 const google::crypto::tink::KeyTemplate&
133 Sphincs_Haraka_256_S_Simple_KeyTemplate();
134 
135 // Returns a KeyTemplate that generates new instances of
136 // SphincsPrivateKey with the following parameters:
137 //   - HASH: SHA256
138 //   - VARIANT: ROBUST
139 //   - SIGNING TYPE: FAST SIGNING
140 //   - PRIVATE KEY SIZE: 64
141 const google::crypto::tink::KeyTemplate&
142 Sphincs_Sha256_128_F_Robust_KeyTemplate();
143 
144 // Returns a KeyTemplate that generates new instances of
145 // SphincsPrivateKey with the following parameters:
146 //   - HASH: SHA256
147 //   - VARIANT: SIMPLE
148 //   - SIGNING TYPE: FAST SIGNING
149 //   - PRIVATE KEY SIZE: 64
150 const google::crypto::tink::KeyTemplate&
151 Sphincs_Sha256_128_F_Simple_KeyTemplate();
152 
153 // Returns a KeyTemplate that generates new instances of
154 // SphincsPrivateKey with the following parameters:
155 //   - HASH: SHA256
156 //   - VARIANT: ROBUST
157 //   - SIGNING TYPE: SMALL SIGNATURE
158 //   - PRIVATE KEY SIZE: 64
159 const google::crypto::tink::KeyTemplate&
160 Sphincs_Sha256_128_S_Robust_KeyTemplate();
161 
162 // Returns a KeyTemplate that generates new instances of
163 // SphincsPrivateKey with the following parameters:
164 //   - HASH: SHA256
165 //   - VARIANT: SIMPLE
166 //   - SIGNING TYPE: SMALL SIGNATURE
167 //   - PRIVATE KEY SIZE: 64
168 const google::crypto::tink::KeyTemplate&
169 Sphincs_Sha256_128_S_Simple_KeyTemplate();
170 
171 // Returns a KeyTemplate that generates new instances of
172 // SphincsPrivateKey with the following parameters:
173 //   - HASH: SHA256
174 //   - VARIANT: ROBUST
175 //   - SIGNING TYPE: FAST SIGNING
176 //   - PRIVATE KEY SIZE: 96
177 const google::crypto::tink::KeyTemplate&
178 Sphincs_Sha256_192_F_Robust_KeyTemplate();
179 
180 // Returns a KeyTemplate that generates new instances of
181 // SphincsPrivateKey with the following parameters:
182 //   - HASH: SHA256
183 //   - VARIANT: SIMPLE
184 //   - SIGNING TYPE: FAST SIGNING
185 //   - PRIVATE KEY SIZE: 96
186 const google::crypto::tink::KeyTemplate&
187 Sphincs_Sha256_192_F_Simple_KeyTemplate();
188 
189 // Returns a KeyTemplate that generates new instances of
190 // SphincsPrivateKey with the following parameters:
191 //   - HASH: SHA256
192 //   - VARIANT: ROBUST
193 //   - SIGNING TYPE: SMALL SIGNATURE
194 //   - PRIVATE KEY SIZE: 96
195 const google::crypto::tink::KeyTemplate&
196 Sphincs_Sha256_192_S_Robust_KeyTemplate();
197 
198 // Returns a KeyTemplate that generates new instances of
199 // SphincsPrivateKey with the following parameters:
200 //   - HASH: SHA256
201 //   - VARIANT: SIMPLE
202 //   - SIGNING TYPE: SMALL SIGNATURE
203 //   - PRIVATE KEY SIZE: 96
204 const google::crypto::tink::KeyTemplate&
205 Sphincs_Sha256_192_S_Simple_KeyTemplate();
206 
207 // Returns a KeyTemplate that generates new instances of
208 // SphincsPrivateKey with the following parameters:
209 //   - HASH: SHA256
210 //   - VARIANT: ROBUST
211 //   - SIGNING TYPE: FAST SIGNING
212 //   - PRIVATE KEY SIZE: 128
213 const google::crypto::tink::KeyTemplate&
214 Sphincs_Sha256_256_F_Robust_KeyTemplate();
215 
216 // Returns a KeyTemplate that generates new instances of
217 // SphincsPrivateKey with the following parameters:
218 //   - HASH: SHA256
219 //   - VARIANT: SIMPLE
220 //   - SIGNING TYPE: FAST SIGNING
221 //   - PRIVATE KEY SIZE: 128
222 const google::crypto::tink::KeyTemplate&
223 Sphincs_Sha256_256_F_Simple_KeyTemplate();
224 
225 // Returns a KeyTemplate that generates new instances of
226 // SphincsPrivateKey with the following parameters:
227 //   - HASH: SHA256
228 //   - VARIANT: ROBUST
229 //   - SIGNING TYPE: SMALL SIGNATURE
230 //   - PRIVATE KEY SIZE: 128
231 const google::crypto::tink::KeyTemplate&
232 Sphincs_Sha256_256_S_Robust_KeyTemplate();
233 
234 // Returns a KeyTemplate that generates new instances of
235 // SphincsPrivateKey with the following parameters:
236 //   - HASH: SHA256
237 //   - VARIANT: SIMPLE
238 //   - SIGNING TYPE: SMALL SIGNATURE
239 //   - PRIVATE KEY SIZE: 128
240 const google::crypto::tink::KeyTemplate&
241 Sphincs_Sha256_256_S_Simple_KeyTemplate();
242 
243 // Returns a KeyTemplate that generates new instances of
244 // SphincsPrivateKey with the following parameters:
245 //   - HASH: SHAKE256
246 //   - VARIANT: ROBUST
247 //   - SIGNING TYPE: FAST SIGNING
248 //   - PRIVATE KEY SIZE: 64
249 const google::crypto::tink::KeyTemplate&
250 Sphincs_Shake256_128_F_Robust_KeyTemplate();
251 
252 // Returns a KeyTemplate that generates new instances of
253 // SphincsPrivateKey with the following parameters:
254 //   - HASH: SHAKE256
255 //   - VARIANT: SIMPLE
256 //   - SIGNING TYPE: FAST SIGNING
257 //   - PRIVATE KEY SIZE: 64
258 const google::crypto::tink::KeyTemplate&
259 Sphincs_Shake256_128_F_Simple_KeyTemplate();
260 
261 // Returns a KeyTemplate that generates new instances of
262 // SphincsPrivateKey with the following parameters:
263 //   - HASH: SHAKE256
264 //   - VARIANT: ROBUST
265 //   - SIGNING TYPE: SMALL SIGNATURE
266 //   - PRIVATE KEY SIZE: 64
267 const google::crypto::tink::KeyTemplate&
268 Sphincs_Shake256_128_S_Robust_KeyTemplate();
269 
270 // Returns a KeyTemplate that generates new instances of
271 // SphincsPrivateKey with the following parameters:
272 //   - HASH: SHAKE256
273 //   - VARIANT: SIMPLE
274 //   - SIGNING TYPE: SMALL SIGNATURE
275 //   - PRIVATE KEY SIZE: 64
276 const google::crypto::tink::KeyTemplate&
277 Sphincs_Shake256_128_S_Simple_KeyTemplate();
278 
279 // Returns a KeyTemplate that generates new instances of
280 // SphincsPrivateKey with the following parameters:
281 //   - HASH: SHAKE256
282 //   - VARIANT: ROBUST
283 //   - SIGNING TYPE: FAST SIGNING
284 //   - PRIVATE KEY SIZE: 96
285 const google::crypto::tink::KeyTemplate&
286 Sphincs_Shake256_192_F_Robust_KeyTemplate();
287 
288 // Returns a KeyTemplate that generates new instances of
289 // SphincsPrivateKey with the following parameters:
290 //   - HASH: SHAKE256
291 //   - VARIANT: SIMPLE
292 //   - SIGNING TYPE: FAST SIGNING
293 //   - PRIVATE KEY SIZE: 96
294 const google::crypto::tink::KeyTemplate&
295 Sphincs_Shake256_192_F_Simple_KeyTemplate();
296 
297 // Returns a KeyTemplate that generates new instances of
298 // SphincsPrivateKey with the following parameters:
299 //   - HASH: SHAKE256
300 //   - VARIANT: ROBUST
301 //   - SIGNING TYPE: SMALL SIGNATURE
302 //   - PRIVATE KEY SIZE: 96
303 const google::crypto::tink::KeyTemplate&
304 Sphincs_Shake256_192_S_Robust_KeyTemplate();
305 
306 // Returns a KeyTemplate that generates new instances of
307 // SphincsPrivateKey with the following parameters:
308 //   - HASH: SHAKE256
309 //   - VARIANT: SIMPLE
310 //   - SIGNING TYPE: SMALL SIGNATURE
311 //   - PRIVATE KEY SIZE: 96
312 const google::crypto::tink::KeyTemplate&
313 Sphincs_Shake256_192_S_Simple_KeyTemplate();
314 
315 // Returns a KeyTemplate that generates new instances of
316 // SphincsPrivateKey with the following parameters:
317 //   - HASH: SHAKE256
318 //   - VARIANT: ROBUST
319 //   - SIGNING TYPE: FAST SIGNING
320 //   - PRIVATE KEY SIZE: 128
321 const google::crypto::tink::KeyTemplate&
322 Sphincs_Shake256_256_F_Robust_KeyTemplate();
323 
324 // Returns a KeyTemplate that generates new instances of
325 // SphincsPrivateKey with the following parameters:
326 //   - HASH: SHAKE256
327 //   - VARIANT: SIMPLE
328 //   - SIGNING TYPE: FAST SIGNING
329 //   - PRIVATE KEY SIZE: 128
330 const google::crypto::tink::KeyTemplate&
331 Sphincs_Shake256_256_F_Simple_KeyTemplate();
332 
333 // Returns a KeyTemplate that generates new instances of
334 // SphincsPrivateKey with the following parameters:
335 //   - HASH: SHAKE256
336 //   - VARIANT: ROBUST
337 //   - SIGNING TYPE: SMALL SIGNATURE
338 //   - PRIVATE KEY SIZE: 128
339 const google::crypto::tink::KeyTemplate&
340 Sphincs_Shake256_256_S_Robust_KeyTemplate();
341 
342 // Returns a KeyTemplate that generates new instances of
343 // SphincsPrivateKey with the following parameters:
344 //   - HASH: SHAKE256
345 //   - VARIANT: SIMPLE
346 //   - SIGNING TYPE: SMALL SIGNATURE
347 //   - PRIVATE KEY SIZE: 128
348 const google::crypto::tink::KeyTemplate&
349 Sphincs_Shake256_256_S_Simple_KeyTemplate();
350 
351 }  // namespace tink
352 }  // namespace crypto
353 
354 #endif  // TINK_EXPERIMENTAL_PQCRYPTO_SIGNATURE_SPHINCS_KEY_TEMPLATE_H_
355