1 /* Copyright (c) 2024, Google LLC 2 * 3 * Permission to use, copy, modify, and/or distribute this software for any 4 * purpose with or without fee is hereby granted, provided that the above 5 * copyright notice and this permission notice appear in all copies. 6 * 7 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 10 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 12 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 13 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ 14 15 #ifndef OPENSSL_HEADER_CRYPTO_SLHDSA_WOTS_H 16 #define OPENSSL_HEADER_CRYPTO_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[SLHDSA_SHA2_128S_N], 27 const uint8_t sk_seed[SLHDSA_SHA2_128S_N], 28 const uint8_t pub_seed[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[SLHDSA_SHA2_128S_N], 34 const uint8_t sk_seed[SLHDSA_SHA2_128S_N], 35 const uint8_t pub_seed[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[SLHDSA_SHA2_128S_N], 40 const uint8_t sig[SLHDSA_SHA2_128S_WOTS_BYTES], 41 const uint8_t msg[SLHDSA_SHA2_128S_N], 42 const uint8_t pub_seed[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_SLHDSA_WOTS_H 51