CMS Envelope structure is used for creating encrypted documents. The API provides mainly two functions;
In CMS Envelope, both asymmetric and symmetric encryption are used. The plain data is encrypted with a symmetric key. For each recipient, the symmetric encryption key is asymmetrically encrypted and these encrypted keys are appended to the document. Upon decryption, The recipient first decrypts the encrypted symmetric key by using his own asymmetric private key and then s/he can decrypt the encrypted data and get the plain content. These operations can be performed by using ESYA CMS Envelope API.
Before creating an enveloped data for a plain document, the validity of the recipients' certificates must be checked. This is because some of the recipients may have their private keys stolen and revoked their certificates.
The encryption operation is explained with sample codes.
The decryption operation is explained with sample codes.
Previous: ASiC Signature API | Home | Next: Smartcard |