Lines Matching +full:max +full:- +full:msg +full:- +full:size

12  * Test slh-dsa operation.
25 * @brief Consumes an 8-bit unsigned integer from a buffer.
27 * This function extracts an 8-bit unsigned integer from the provided buffer,
31 * @param len Pointer to the size of the remaining buffer; updated after consumption.
32 * @param val Pointer to store the extracted 8-bit value.
42 *len -= sizeof(uint8_t); in consume_uint8t()
49 * This function creates a DSA key pair based on the specified key size and
53 * @param keysize The desired key size in bits.
93 * @brief Selects a key type and determines the key size.
95 * This function maps a selector value to a specific SLH-DSA algorithm
97 * algorithm name and assigns an appropriate key size based on the
101 * @param keysize Pointer to a variable where the determined key size
114 * There are 12 SLH-DSA algs with registered NIDS at the moment in select_keytype()
125 * man7/EVP_PKEY-SLH-DSA.pod in select_keytype()
147 fprintf(stderr, "Selecting invalid key size\n"); in select_keytype()
155 * @brief Generates two SLH-DSA key pairs based on consumed selector values.
159 * SLH-DSA key pairs.
188 * @brief Generates an SLH-DSA key pair with custom parameters.
191 * determines the corresponding key type and size, and generates an
192 * SLH-DSA key pair using randomly generated public and private key
211 uint8_t pubbuf[PARAM_BUF_SZ]; /* expressly bigger than max key size * 3 */ in slh_dsa_gen_key_with_params()
212 uint8_t prvbuf[PARAM_BUF_SZ]; /* expressly bigger than max key size * 3 */ in slh_dsa_gen_key_with_params()
213 uint8_t sdbuf[PARAM_BUF_SZ]; /* expressly bigger than max key size * 3 */ in slh_dsa_gen_key_with_params()
234 buflen = ((*buf)[0] & 0x2) ? buflen - 1 : buflen + 1; in slh_dsa_gen_key_with_params()
249 buflen = (*buf[0] & 0x1) ? buflen - 1 : buflen + 1; in slh_dsa_gen_key_with_params()
272 * @brief Frees allocated SLH-DSA key structures.
274 * This function releases memory allocated for SLH-DSA key pairs
291 * @brief Performs SLH-DSA signing and verification on a given message.
293 * This function generates an SLH-DSA key, signs a message, and verifies
315 unsigned char *msg = NULL; in slh_dsa_sign_verify() local
338 * Remainder of the buffer is the msg to sign in slh_dsa_sign_verify()
340 msg = (unsigned char *)*buf; in slh_dsa_sign_verify()
351 msg, msg_len); in slh_dsa_sign_verify()
387 OPENSSL_assert(EVP_PKEY_sign(ctx, NULL, &sig_len, msg, msg_len)); in slh_dsa_sign_verify()
391 OPENSSL_assert(EVP_PKEY_sign(ctx, sig, &sig_len, msg, msg_len)); in slh_dsa_sign_verify()
394 OPENSSL_assert(EVP_PKEY_verify(ctx, sig, sig_len, msg, msg_len)); in slh_dsa_sign_verify()
403 * @brief Exports and imports SLH-DSA key pairs, verifying equivalence.
405 * This function extracts key data from two given SLH-DSA keys (`alice` and `bob`),
442 * -1 if the key types are differnt in slh_dsa_export_import()
443 * -2 if the operation is not supported in slh_dsa_export_import()
468 * we might get a simple non-equivalence or a type mismatch here in slh_dsa_export_import()
471 OPENSSL_assert(rc == 0 || rc == -1); in slh_dsa_export_import()
495 * @param len Pointer to the remaining buffer size; may be updated.
505 * @param len Pointer to the remaining buffer size; may be updated.
527 "Generate SLH-DSA keys",
532 "Generate SLH-DSA keys with params",
537 "SLH-DSA Export/Import",
542 "SLH-DSA sign and verify",
564 * @return 0 on successful execution, -1 if the input is too short.
578 return -1; in FuzzerTestOneInput()
585 return -1; in FuzzerTestOneInput()
588 * Adjust for operational array size in FuzzerTestOneInput()