>  /**
> + * Asymmetric crypto key exchange operation type
> + */
> +enum rte_crypto_asym_ke_type {
> +     RTE_CRYPTO_ASYM_KE_PRIVATE_KEY_GENERATE,

Is it better to shorten it to 
RTE_CRYPTO_ASYM_KE_PRIV_KEY_GENERATE
RTE_CRYPTO_ASYM_KE_PUB_KEY_GENERATE

> +     /**< Private Key generation operation */
> +     RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE,
> +     /**< Public Key generation operation */
> +     RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE
> +     /**< Shared Secret compute operation */
> +};
> +
> +/**
>   * Padding types for RSA signature.
>   */
>  enum rte_crypto_rsa_padding_type {
> @@ -238,7 +248,7 @@ struct rte_crypto_modinv_xform {
>   *
>   */
>  struct rte_crypto_dh_xform {
> -     enum rte_crypto_asym_op_type type;
> +     enum rte_crypto_asym_ke_type type;
>       /**< Setup xform for key generate or shared secret compute */
>       rte_crypto_uint p;
>       /**< Prime modulus data */
> @@ -375,26 +385,27 @@ struct rte_crypto_rsa_op_param {
>  struct rte_crypto_dh_op_param {
>       rte_crypto_uint pub_key;
>       /**<
> -      * Output generated public key when xform type is
> -      * DH PUB_KEY_GENERATION.
> -      * Input peer public key when xform type is DH
> -      * SHARED_SECRET_COMPUTATION
> +      * Output - generated public key, when xform type is

It is not xform type, Right?
It should be key exchange type.
Check at other places also.

> +      * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE.
>        *
> +      * Input - peer's public key, when xform type is
> +      * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE.
>        */
> 
>       rte_crypto_uint priv_key;
>       /**<
> -      * Output generated private key if xform type is
> -      * DH PRIVATE_KEY_GENERATION
> -      * Input when xform type is DH SHARED_SECRET_COMPUTATION.
> +      * Output - generated private key, when xform type is
> +      * RTE_CRYPTO_ASYM_KE_PRIVATE_KEY_GENERATE.
>        *
> +      * Input - private key, when xform type is one of:
> +      * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE,
> +      * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE.
>        */
> 
>       rte_crypto_uint shared_secret;
>       /**<
> -      * Output with calculated shared secret
> -      * when dh xform set up with op type =
> SHARED_SECRET_COMPUTATION.
> -      *
> +      * Output - calculated shared secret when xform type is
> +      * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE.
>        */
>  };
> 

Reply via email to