Encryption and Decryption with Asymmetric Keys
While symmetric key encryption utilizes a shared secret key, public key cryptography (crypto operations performed with asymmetric keys) typically utilizes a pair of keys: one public, the other private. This allows users to communicate securely without having prior access to a shared secret key. All public keys are published and therefore available to anyone, while all private keys remain with the user. Keys are related mathematically, such that each key allows you to reverse the operations performed with the other key. In other words, you can encrypt with the public key and decrypt with the private key. This method of encryption is extremely slow compared to symmetric ciphers.
How it works
Bob and Alice each generate public/private key pairs and publish their public keys.
Alice looks up Bob's public key, encrypts her message with it, and send Bob her message.
Bob gets Alice's message and decrypts it with his private key.
Bob looks up Alice's public key, encrypts his reply with it, and sends it to Alice.
Alice can then decrypt Bob's message with her private key. In this way, Alice and Bob can continue communicating over a network while preventing potential eavesdroppers from understanding their messages.
Supported algorithms
RSA
Asymmetric algorithms, such as RSA, can be up to an order of magnitude slower than symmetric algorithms. When using RSA keys to encrypt data, the ciphertext is always the size of the key; if your RSA key is 2048 bits (or 256 bytes), then the ciphertext is also 256 bytes. And because PKCS #1 padding is always used with RSA keys, you can encrypt no more than the key size, less eleven. For example, if you use a 2048-bit RSA key, the maximum data size that you can encrypt with that key is 245 bytes.
The speed and size issues make public key cryptography impractical for encrypting data. Therefore, we recommend that you use symmetric key algorithms to encrypt your data.
EC
Elliptic Curve Cryptography is an asymmetric algorithm, which is based on the algebraic structure of elliptic curves over finite fields. The key size supported in CADP for Java depends on the curve ID used.