1 // Copyright 2024 The BoringSSL Authors 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 // https://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 #ifndef OPENSSL_HEADER_CRYPTO_FIPSMODULE_SLHDSA_WOTS_H 16 #define OPENSSL_HEADER_CRYPTO_FIPSMODULE_SLHDSA_WOTS_H 17 18 #include "./params.h" 19 20 #if defined(__cplusplus) 21 extern "C" { 22 #endif 23 24 25 // Implements Algorithm 6: wots_pkGen function, page 18 26 void slhdsa_wots_pk_gen(uint8_t pk[BCM_SLHDSA_SHA2_128S_N], 27 const uint8_t sk_seed[BCM_SLHDSA_SHA2_128S_N], 28 const uint8_t pub_seed[BCM_SLHDSA_SHA2_128S_N], 29 uint8_t addr[32]); 30 31 // Implements Algorithm 7: wots_sign function, page 20 32 void slhdsa_wots_sign(uint8_t sig[SLHDSA_SHA2_128S_WOTS_BYTES], 33 const uint8_t msg[BCM_SLHDSA_SHA2_128S_N], 34 const uint8_t sk_seed[BCM_SLHDSA_SHA2_128S_N], 35 const uint8_t pub_seed[BCM_SLHDSA_SHA2_128S_N], 36 uint8_t addr[32]); 37 38 // Implements Algorithm 8: wots_pkFromSig function, page 21 39 void slhdsa_wots_pk_from_sig(uint8_t pk[BCM_SLHDSA_SHA2_128S_N], 40 const uint8_t sig[SLHDSA_SHA2_128S_WOTS_BYTES], 41 const uint8_t msg[BCM_SLHDSA_SHA2_128S_N], 42 const uint8_t pub_seed[BCM_SLHDSA_SHA2_128S_N], 43 uint8_t addr[32]); 44 45 46 #if defined(__cplusplus) 47 } // extern C 48 #endif 49 50 #endif // OPENSSL_HEADER_CRYPTO_FIPSMODULE_SLHDSA_WOTS_H 51