IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1

demo.smime.ecc
Class SimpleSMimeV4EcDemo

java.lang.Object
  extended by demo.smime.ecc.SMimeV4EccDemo
      extended by demo.smime.ecc.SimpleSMimeV4EcDemo
Direct Known Subclasses:
SimpleSMimeV4EdDemo

public class SimpleSMimeV4EcDemo
extends SMimeV4EccDemo

This class demonstrates the usage of the IAIK S/MIME implementation. It shows how to create signed and/or (authenticated) encrypted S/MIMEv4 messages using EC keys and how to parse them and verify the signatures and decrypt the content, respectively.

This demo uses one set of cryptographic algorithms. A demo that uses several combinations of algorithms is shown in SMimeV4EccDemo.

Additionally to iaik_cms.jar you also must have iaik_jce_(full).jar (IAIK-JCE, https://sic.tech/products/core-crypto-toolkits/jca-jce/), and iaik_eccelarate.jar (IAIK-ECCelerateTM, https://sic.tech/products/core-crypto-toolkits/eccelerate/) in your classpath.

To run this demo the following packages are required:


Constructor Summary
SimpleSMimeV4EcDemo()
          Default constructor.
 
Method Summary
protected  iaik.asn1.structures.AlgorithmID getDigestAlgorithm()
          Gets the digest algorithm used for signing.
protected  iaik.x509.X509Certificate[] getRecipientCerts()
          Gets the recipient certificates.
protected  iaik.asn1.structures.AlgorithmID getSignatureAlgorithm()
          Gets the signature algorithm.
protected  iaik.utils.KeyAndCertificate getSignerKeyAndCert()
          Gets signing key and certificate.
static void main(java.lang.String[] argv)
          The main method.
 void start()
          Starts the demo.
 
Methods inherited from class demo.smime.ecc.SMimeV4EccDemo
createEncryptedMessage, createMessage, createSignedAndEncryptedMessage, createSignedMessage, startEncryptionDemo, startSigningAndEncryptionDemo, startSigningDemo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSMimeV4EcDemo

public SimpleSMimeV4EcDemo()
Default constructor.

Method Detail

start

public void start()
           throws java.lang.Exception
Starts the demo.

Overrides:
start in class SMimeV4EccDemo
Throws:
java.lang.Exception - if an error occurs

getSignerKeyAndCert

protected iaik.utils.KeyAndCertificate getSignerKeyAndCert()
Gets signing key and certificate.

Returns:
signing key and certificate

getDigestAlgorithm

protected iaik.asn1.structures.AlgorithmID getDigestAlgorithm()
Gets the digest algorithm used for signing.

Returns:
the digest algorithm

getSignatureAlgorithm

protected iaik.asn1.structures.AlgorithmID getSignatureAlgorithm()
Gets the signature algorithm.

Returns:
the signature algorithm

getRecipientCerts

protected iaik.x509.X509Certificate[] getRecipientCerts()
Gets the recipient certificates.

Returns:
the certificates of the recipients

main

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

Throws:
java.lang.Exception

IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1

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