EldoS
Navigation
Web site
Support
Table Of Contents

Encrypt the encryption key

To increase security or to employ public key cryptography, it makes sense to use a randomly generated session key for encryption, and encrypt this session key. This can be also needed if the data must be encrypted/decrypted using public key encryption. If you want to encrypt the encryption key, set EncryptKey property of TElXMLEncryptor class to true. If you encrypt the encryption key, then you need to additionally set the following properties:

  • KeyEncryptionType property of TElXMLEncryptor class. You need to select from xetKeyTransport and xetKeyWrap. With KeyWrap method, the encryption key is encrypted using symmetric algorithm and a shared secret (secret key). With KeyTransport, the encryption key is encrypted using public key algorithm and a public key.
  • If you set KeyEncryptionType to KeyTransport, set the value of KeyTransportMethod property of TElXMLEncryptor class to xktRSA15 or xktRSAOAEP.
  • If you set KeyEncryptionType to KeyWrap, set the value of KeyWrapMethod property of TElXMLEncryptor class.
  • Create an instance of TElXMLKeyInfoData class, initialize it's properties and assign it to KeyEncryptionKeyData property of TElXMLEncryptor class. The value of this property depends on whether you set KeyEncryptionType to KeyTransport or KeyWrap. If you use KeyWrap as a key encryption type, then you create and use an instance of TElXMLKeyInfoSymmetricData class. See the corresponding how-to article about how to initialize and use TElXMLKeyInfoSymmetricData class. If you use KeyTransport as a key encryption type, you need to use TElXMLKeyInfoRSAData, TElXMLKeyInfoX509Data or TElXMLKeyInfoPGPData class. See corresponding how-to article about how to initialize and use those classes.

 
Contact Us | Terms of Use | Trademarks | Privacy Statement
Copyright (c) 1998-2012, EldoS Corporation