com.dstc.security.cms
Interface EnvelopedData


public interface EnvelopedData

An interface to data "enveloped" (that is, encrypted) according to the CMS specification.

CMS EnvelopedData is data protected by encryption. It contains primarily the data to be protected encrypted by a content encryption key together with the content encryption key encrypted for one or more recipients. The key for encrypting the content encryption key (ie. the key encrypting key) may be a public key capable of encryption (such as RSA) or be a symmetric key which is agreed upon with a key agreement method (such as Diffie-Hellman) or out-of-bands means.

In JCSI, an instance of the EnvelopedData interface is returned upon succesful decryption with the CMSCipher class of data enveloped according to CMS. An EnvelopedData instance is always associated with a DecryptionResult instance representing the result of a successful decryption. The decrypted data itself and its type can be retrieved from this same DecrytpionResult instance.

EnvelopedData is defined in RFC2630 by the ASN.1 structure

     EnvelopedData ::= SEQUENCE {
        version CMSVersion,
        originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
        recipientInfos RecipientInfos,
        encryptedContentInfo EncryptedContentInfo,
        unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL}

     RecipientInfos ::= SET OF RecipientInfo

     UnprotectedAttributes ::= SET SIZE (1..MAX) OF Attribute
 

See Also:
CMSCipher, DecryptionResult, RecipientInfo, KeyTransRecipientInfo, KeyAgreeRecipientInfo, OriginatorInfo

Method Summary
 OriginatorInfo getOriginatorInfo()
          Returns the OriginatorInfo for this EnvelopedData.
 RecipientInfo[] getRecipientInfos()
          Returns all the RecipientInfos (one per recipient) for this EnvelopedData
 

Method Detail

getOriginatorInfo

public OriginatorInfo getOriginatorInfo()
Returns the OriginatorInfo for this EnvelopedData. This is only used if the key agreement method requires it.

getRecipientInfos

public RecipientInfo[] getRecipientInfos()
Returns all the RecipientInfos (one per recipient) for this EnvelopedData