HP Open Source Security for OpenVMS Volume 2: HP SSL for OpenVMS > CRYPTO Application
Programming Interface (API) Reference## EVP_SealInit
## Synopsis
## DESCRIPTIONThe EVP envelope routines are a high level interface to envelope encryption. They generate a random key and IV (if required) then "envelope" it by using public key encryption. Data can then be encrypted using this key. EVP_SealInit() initializes a cipher context The If the cipher does not require an IV then the EVP_SealUpdate() and EVP_SealFinal() have exactly the same
properties as the EVP_EncryptUpdate() and EVP_EncryptFinal() routines,
as documented on the ## RETURN VALUESEVP_SealInit() returns 0 on error or EVP_SealUpdate() and EVP_SealFinal() return 1 for success and 0 for failure. ## NOTESBecause a random secret key is generated the random number generator must be seeded before calling EVP_SealInit(). The public key must be RSA because it is the only OpenSSL public key algorithm that supports key transport. Envelope encryption is the usual method of using public key encryption on large amounts of data, this is because public key encryption is slow but symmetric encryption is fast. So symmetric encryption is used for bulk encryption and the small random symmetric key used is transferred using public key encryption. It is possible to call EVP_SealInit() twice in the same way
as EVP_EncryptInit(). The first call should have |