Lines Matching +full:key +full:- +full:up
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,
32 * @param val Pointer to store the extracted 8-bit value.
42 *len -= sizeof(uint8_t); in consume_uint8t()
47 * @brief Generates a DSA key pair using OpenSSL EVP API.
49 * This function creates a DSA key pair based on the specified key size and
52 * @param name The name of the key type (e.g., "DSA").
53 * @param keysize The desired key size in bits.
54 * @param params Optional OpenSSL parameters for key generation.
56 * If true, key generation will fail.
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
100 * @param selector A random selector value used to determine the key type.
101 * @param keysize Pointer to a variable where the determined key size
105 * selected key type, or NULL if invalid.
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.
158 * determines the corresponding key types and sizes, and generates two
159 * SLH-DSA key pairs.
165 * @param out1 Pointer to store the first generated key.
166 * @param out2 Pointer to store the second generated key.
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
200 * @param out1 Pointer to store the generated key. Will be NULL if key
203 * other key generation functions).
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
277 * @param in1 Pointer to the first input key to be freed.
278 * @param in2 Pointer to the second input key to be freed.
279 * @param out1 Pointer to the first output key to be freed.
280 * @param out2 Pointer to the second output key to be freed.
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
301 * @param key1 Unused key parameter (placeholder for function signature consistency).
302 * @param key2 Unused key parameter (placeholder for function signature consistency).
303 * @param out1 Pointer to store the generated key (for cleanup purposes).
310 EVP_PKEY *key = NULL; in slh_dsa_sign_verify() local
367 key = (void *)slh_dsa_gen_key(keytype, keylen, NULL, 0); in slh_dsa_sign_verify()
368 OPENSSL_assert(key != NULL); in slh_dsa_sign_verify()
369 *out1 = key; /* for cleanup */ in slh_dsa_sign_verify()
371 ctx = EVP_PKEY_CTX_new_from_pkey(NULL, key, NULL); 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`),
407 * keys are equivalent to the originals. It ensures that key export/import
412 * @param key1 Pointer to the first key (`alice`) to be exported and imported.
413 * @param key2 Pointer to the second key (`bob`) to be exported and imported.
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()
482 * setting up, executing, and cleaning up cryptographic operations, along
492 * @brief Function pointer for setting up the operation.
515 * @brief Function pointer for cleaning up after the operation.
517 * @param in1 First input parameter to be cleaned up.
518 * @param in2 Second input parameter to be cleaned up.
519 * @param out1 First output parameter to be cleaned up.
520 * @param out2 Second output parameter to be cleaned up.
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()