IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1

demo.cms.envelopedData
Class TripleDESEnvelopedDataDemo

java.lang.Object
  extended by demo.cms.envelopedData.EnvelopedDataDemo
      extended by demo.cms.envelopedData.TripleDESEnvelopedDataDemo

public class TripleDESEnvelopedDataDemo
extends EnvelopedDataDemo

Demonstrates the usage of class EnvelopedDataStream and EnvelopedData for encrypting data using the CMS type EnvelopedData with the TripleDES (DES-EDE3) cipher algorithm.
TripleDES is used for both content encryption (according to RFC 3370) and content encryption key wrapping (according to RFC 3217).

This demo creates an EnvelopedData object and subsequently shows several ways that may be used for decrypting the content for some particular recipient.

Keys and certificates are retrieved from the demo KeyStore ("cms.keystore") which has to be located in your current working directory and may be created by running the SetupCMSKeyStore program.

See Also:
EnvelopedDataStream, EnvelopedData, RecipientInfo, KeyTransRecipientInfo, KeyAgreeRecipientInfo,

Note that the usage of TripleDES has been deprecated by S/MIMEv4 (RFC 8551), see {@link AESEnvelopedDataDemo AESEnvelopedDataDemo} for an AES based demo.


Constructor Summary
TripleDESEnvelopedDataDemo()
          Creates an TripleDESEnvelopedDataDemo and setups the demo certificates.
 
Method Summary
static void main(java.lang.String[] argv)
          Main method.
 
Methods inherited from class demo.cms.envelopedData.EnvelopedDataDemo
createEnvelopedData, createEnvelopedDataStream, createRecipients, getEnvelopedData, getEnvelopedData, getEnvelopedData, getEnvelopedDataStream, getEnvelopedDataStream, getEnvelopedDataStream, parseEnvelopedDataWithRecipientCertOrKEKId, parseEnvelopedDataWithRecipientIdentifier, parseEnvelopedDataWithRecipientInfoIndex, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TripleDESEnvelopedDataDemo

public TripleDESEnvelopedDataDemo()
                           throws java.io.IOException,
                                  java.security.NoSuchAlgorithmException
Creates an TripleDESEnvelopedDataDemo and setups the demo certificates.
Keys and certificates are retrieved from the demo KeyStore ("cms.keystore") file which has to be located in your current working directory and may be created by running SetupCMSKeyStore.
TripleDES and TripleDES KeyWrap are used for content encryption and content encryption key wrapping.

Throws:
java.io.IOException - if an file read error occurs
java.security.NoSuchAlgorithmException - if the requested TripleDES or TripleDES KeyWrap algorithms are not supported
Method Detail

main

public static void main(java.lang.String[] argv)
                 throws java.lang.Exception
Main method.

Throws:
java.io.IOException - if an I/O error occurs when reading required keys and certificates from files
java.lang.Exception

IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1

v6.1
(c) 2002 IAIK, (c) 2003 - 2025 SIC