logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

kcapi_akcipher_setkey - set the private key for the cipher handle

Arguments

handle
           [in] cipher handle

       key
           [in] key buffer in DER format

       keylen
           [in] length of key buffer

Author

StephanMueller <smueller@chronox.de>
           Author.

Description

       With this function, the caller sets the key for subsequent cipher operations.

       The key must be in DER format as follows

       SEQUENCE { version INTEGER, n INTEGER ({ rsa_get_n }), e INTEGER ({ rsa_get_e }), d INTEGER ({ rsa_get_d
       }), prime1 INTEGER, prime2 INTEGER, exponent1 INTEGER, exponent2 INTEGER, coefficient INTEGER }

       After the caller provided the key, the caller may securely destroy the key as it is now maintained by the
       kernel.

       return upon success the value of the maximum size for the asymmetric operation is returned (e.g. the
       modulus size); a negative errno-style error code if an error occurred

Name

       kcapi_akcipher_setkey - set the private key for the cipher handle

Synopsis

intkcapi_akcipher_setkey(structkcapi_handle*handle,constuint8_t*key,uint32_tkeylen);

See Also