/**
* @brief yaca_seal_init Initializes an asymmetric encryption context.
*
- * @param[out] ctx Newly created context (must be freed with @see yaca_ctx_free).
- * @param[in] pub_key Public key of the peer that will receive the encrypted data.
- * @param[in] algo Symmetric algorithm that will be used.
- * @param[in] bcm Block chaining mode for the symmetric algorithm.
- * @param[out] sym_key Generated symmetric key that will be used. It is encrypted with peer's public key.
- * @param[out] iv Generated initialization vector that will be used.
+ * @param[out] ctx Newly created context (must be freed with @see yaca_ctx_free).
+ * @param[in] pub_key Public key of the peer that will receive the encrypted data.
+ * @param[in] algo Symmetric algorithm that will be used.
+ * @param[in] bcm Block chaining mode for the symmetric algorithm.
+ * @param[in] sym_key_bits Symmetric key length (in bits) that will be generated.
+ * @param[out] sym_key Generated symmetric key that will be used. It is encrypted with peer's public key.
+ * @param[out] iv Generated initialization vector that will be used.
*
* @return 0 on success, negative on error (@see error.h).
*/
const yaca_key_h pub_key,
yaca_enc_algo_e algo,
yaca_block_cipher_mode_e bcm,
+ yaca_key_bits_e sym_key_bits,
yaca_key_h *sym_key,
yaca_key_h *iv);
size_t rem;
ret = yaca_seal_init(&ctx, key_pub,
- YACA_ENC_AES, YACA_BCM_CBC,
+ YACA_ENC_AES, YACA_BCM_CBC, YACA_KEY_192BIT,
&aes_key, &iv);
if (ret < 0)
goto ex_pk;
const yaca_key_h pub_key,
yaca_enc_algo_e algo,
yaca_block_cipher_mode_e bcm,
+ yaca_key_bits_e sym_key_bits,
yaca_key_h *sym_key,
yaca_key_h *iv)
{