IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1

demo.cms.authenticatedData
Class HMACwith3DESAuthenticatedDataDemo

java.lang.Object
  extended by demo.cms.authenticatedData.AuthenticatedDataDemo
      extended by demo.cms.authenticatedData.HMACwith3DESAuthenticatedDataDemo

public class HMACwith3DESAuthenticatedDataDemo
extends AuthenticatedDataDemo

Demonstrates the usage of class AuthenticatedDataStream and AuthenticatedData for recipient-specific protecting the integrity of a message using the CMS type AuthenticatedData with the HMACwith3DESwrap algorithm for wrapping the HMAC key.

Attention: This demo uses Static-Static Diffie-Hellman as key management technique for providing origin authentication. The mac key is wrapped by using the HMACwith3DESwrap algorithm as specified by RFC 3537.

This demo requires that you have iaik_esdh.jar (or iaik_jce_full.jar) in your classpath. You can download it from https://sic.tech/products/core-crypto-toolkits/jca-jce/.

See Also:
AuthenticatedDataStream, AuthenticatedData

Constructor Summary
HMACwith3DESAuthenticatedDataDemo()
          Creates an HMACwith3DESAuthenticatedDataDemo and setups the demo certificates.
 
Method Summary
static void main(java.lang.String[] argv)
          Main method.
 
Methods inherited from class demo.cms.authenticatedData.AuthenticatedDataDemo
createAuthenticatedData, createAuthenticatedDataStream, createRecipients, getAuthenticatedData, getAuthenticatedData, getAuthenticatedData, getAuthenticatedDataStream, getAuthenticatedDataStream, getAuthenticatedDataStream, parseAuthenticatedDataWithRecipientCertOrKEKId, parseAuthenticatedDataWithRecipientIdentifier, parseAuthenticatedDataWithRecipientInfoIndex, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HMACwith3DESAuthenticatedDataDemo

public HMACwith3DESAuthenticatedDataDemo()
                                  throws java.io.IOException,
                                         java.security.NoSuchAlgorithmException
Creates an HMACwith3DESAuthenticatedDataDemo 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.
HMACwith3DESwrap is used as key wrap algorithm.

Throws:
java.io.IOException - if an file read error occurs
java.security.NoSuchAlgorithmException - if no implementation for the requested key wrap algorithm is available
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