SHOW Signed

net.rim.device.api.crypto
Class ECIESDecryptor

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--net.rim.device.api.crypto.CryptoInputStream
              |
              +--net.rim.device.api.crypto.DecryptorInputStream
                    |
                    +--net.rim.device.api.crypto.StreamDecryptor
                          |
                          +--net.rim.device.api.crypto.ECIESDecryptor

public final class ECIESDecryptor
extends StreamDecryptor

ECIESDecryptor is a class used to decrypt messages encoded with the Elliptic Curve Integrated Encryption Scheme ( ECIES ). It is described in ANSI X9.63.

Elliptic Curve cryptography is defined in various standards including P1363 and ANSI X9.62.

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:613-254-9258

Email: sales@certicom.com

Website: http://www.certicom.com/rim

Since:
JDE 3.6.0
See Also:
ECIESEncryptor

Fields inherited from class net.rim.device.api.crypto.CryptoInputStream
_inputStream
 
Constructor Summary
 Category: Signed Category: Certicom ECIESDecryptor(InputStream input, ECPrivateKey recipientPrivateKey)
          Creates an ECIESDecryptor class.
 Category: Signed Category: Certicom ECIESDecryptor(InputStream input, ECPrivateKey recipientPrivateKey, String macAlgorithm, int macKeyLength, byte[] additionalMACInfo, int macLength, byte[] additionalKDFInfo, Digest kdfDigest, boolean useCofactor)
          Creates an ECIESDecryptor class.
 
Method Summary
 Category: Signed Category: Certicom protected  void decrypt(byte[] data, int dataOffset, int dataLength)
          Decrypts data according to the specific implementation of the chosen stream cipher.
 Category: Signed Category: Certicom  String getAlgorithm()
          Returns the name of this algorithm, namely "ECIES/" + macAlgorithm.
 Category: Signed Category: Certicom  boolean verify()
           
 
Methods inherited from class net.rim.device.api.crypto.StreamDecryptor
read
 
Methods inherited from class net.rim.device.api.crypto.CryptoInputStream
available, close, getInputStream, markSupported, read, read
 
Methods inherited from class java.io.InputStream
mark, reset, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ECIESDecryptor

public ECIESDecryptor(InputStream input,
                      ECPrivateKey recipientPrivateKey)
               throws CryptoTokenException,
                      CryptoUnsupportedOperationException,
                      InvalidKeyException,
                      InvalidCryptoSystemException,
                      IOException,
                      NoSuchAlgorithmException
Creates an ECIESDecryptor class. The MAC algorithm used is HMAC with SHA1 and a 20 byte key. The "additional" shared values are not included. Also, the cofactor is used in the shared secret calculation and SHA1 is used as the kdf digest.

Parameters:
input - The input stream to read from
recipientPrivateKey - The private key of the person this message was for
Throws:
CryptoTokenException - Thrown if a crypto token error occurs.
CryptoUnsupportedOperationException - Thrown if the attempted operation is not supported.
InvalidKeyException - Thrown if there is a problem with the ephemeral key read from the stream.
InvalidCryptoSystemException - Thrown if the crypto system has a problem with it.
IOException - Thrown if there is a problem writing to the output stream
NoSuchAlgorithmException - Thrown if the mac algorithm is not supported
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:613-254-9258

Email: sales@certicom.com

Website: http://www.certicom.com/rim


ECIESDecryptor

public ECIESDecryptor(InputStream input,
                      ECPrivateKey recipientPrivateKey,
                      String macAlgorithm,
                      int macKeyLength,
                      byte[] additionalMACInfo,
                      int macLength,
                      byte[] additionalKDFInfo,
                      Digest kdfDigest,
                      boolean useCofactor)
               throws CryptoTokenException,
                      CryptoUnsupportedOperationException,
                      InvalidKeyException,
                      InvalidCryptoSystemException,
                      IOException,
                      NoSuchAlgorithmException
Creates an ECIESDecryptor class.

Parameters:
input - The input stream to read from
recipientPrivateKey - The private key of the person this message was for
macAlgorithm - The MAC algorithm to use. If null, then "HMAC/SHA1" is used.
macKeyLength - The length of the MAC key to use.
additionalMACInfo - Additional mac information to provided to the MAC.
additionalKDFInfo - Additional shared information to provide to the KDF
kdfDigest - Specifies the digest to use in the KDF. If null, then SHA1 is used.
useCofactor - If this true, a the elliptic curve's cofactor is used in the calculations. If false, the cofactor is not used. Note, setting this value to TRUE is the most common usage.
Throws:
CryptoTokenException - Thrown if a crypto token error occurs.
CryptoUnsupportedOperationException - Thrown if the attempted operation is not supported.
InvalidKeyException - Thrown if there is a problem with the ephemeral key read from the stream.
InvalidCryptoSystemException - Thrown if the crypto system has a problem with it.
IOException - Thrown if there is a problem writing to the output stream
NoSuchAlgorithmException - Thrown if the mac algorithm is not supported
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:613-254-9258

Email: sales@certicom.com

Website: http://www.certicom.com/rim

Method Detail

getAlgorithm

public String getAlgorithm()
Returns the name of this algorithm, namely "ECIES/" + macAlgorithm.
Overrides:
getAlgorithm in class CryptoInputStream
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:613-254-9258

Email: sales@certicom.com

Website: http://www.certicom.com/rim


decrypt

protected void decrypt(byte[] data,
                       int dataOffset,
                       int dataLength)
                throws CryptoTokenException
Description copied from class: StreamDecryptor
Decrypts data according to the specific implementation of the chosen stream cipher. The data should be decrypted in place.

Overrides:
decrypt in class StreamDecryptor
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:613-254-9258

Email: sales@certicom.com

Website: http://www.certicom.com/rim


verify

public boolean verify()
               throws CryptoTokenException
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:613-254-9258

Email: sales@certicom.com

Website: http://www.certicom.com/rim



Copyright 1999-2004 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.