SymmetricEncryption
ptolemy.actor.lib.security.SymmetricEncryption

Encrypt an unsigned byte array using a symmetric algorithm. <p>In cryptography, a symmetric algorithm is an algorithm that uses the same key for encryption and decryption. An asymmetric algorithm uses two different keys: a public key and a private key. Sun's documentation says that asymmetric algorithms are usually much slower than symmetric algorithms. The initial default set of algorithms that comes with the Sun JDK does not include an asymmetric encryption algorithm, though other algorithms may be installed by the system administrator. <p>This actor reads an unsigned byte array at the <i>input</i> port, encrypts the data using the data from the <i>key</i> port and then writes the unsigned byte array results to the <i>output</i> port. <p>The <i>key</i> should be the same for both the SymmetricDecryption actor and this actor. The <i>key</i> should not be visible to users as the security of the encrypted message relies on the secrecy of this key. <p>The <i>algorithm</i> parameter determines which algorithm is used. The algorithm specified must be symmetric. The mode and padding can also be specified in the <i>mode</i> and <i>padding</i> parameters. In case a provider specific instance of an algorithm is needed the provider may also be specified in the <i>provider</i> parameter. <p>Note that for simplicity, this actor does not support the notion of algorithm parameters, so the algorithm must not require that algorithm parameters be transmitted separately from the key. If the user selects an algorithm that uses algorithm parameters, then an exception will likely be thrown. <p>This actor relies on the Java Cryptography Architecture (JCA) and Java Cryptography Extension (JCE). See the <a href="../../../../ptolemy/actor/lib/security/CryptographyActor.xml">ptolemy.actor.lib.security.CryptographyActor</a> documentation for resources about the JCE.

Author(s): Christopher Hylands Brooks, Contributor: Rakesh Reddy
Version:$Id: SymmetricEncryption.doc.html,v 1.1 2006/02/22 18:42:26 mangal Exp $
Pt.Proposed Rating:Green (cxh)
Pt.Accepted Rating:Yellow (cxh)


key
The key to be used by this actor to encrypt the data. The type is an KeyToken containing a java.security.Key. Usually the output of the <a href="../../../../ptolemy/actor/lib/security/SecretKey.xml">ptolemy.actor.lib.security.SecretKey</a> actor is connected to this port