javacard.security
Interface RSAPublicKey

All Superinterfaces:
Key, PublicKey

public interface RSAPublicKey
extends PublicKey

The RSAPublicKey is used to verify signatures on signed data using the RSA algorithm. It may also used by the javacardx.crypto.Cipher class to encrypt/decrypt messages.

When both the modulus and exponent of the key are set, the key is initialized and ready for use.

See Also:
RSAPrivateKey

Method Summary
 short getExponent(byte[] buffer, short offset)
          Returns the public exponent value of the key in plain text.
 short getModulus(byte[] buffer, short offset)
          Returns the modulus value of the key in plain text.
 void setExponent(byte[] buffer, short offset, short length)
          Sets the public exponent value of the key.
 void setModulus(byte[] buffer, short offset, short length)
          Sets the modulus value of the key.
 
Methods inherited from interface javacard.security.Key
clearKey, getSize, getType, isInitialized
 

Method Detail

getModulus

public short getModulus(byte[] buffer,
                        short offset)
Returns the modulus value of the key in plain text. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte).


setExponent

public void setExponent(byte[] buffer,
                        short offset,
                        short length)
                 throws CryptoException
Sets the public exponent value of the key. The plaintext data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). Input exponent data is copied into the internal representation.

Note:

Throws:
CryptoException

getExponent

public short getExponent(byte[] buffer,
                         short offset)
Returns the public exponent value of the key in plain text. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte).


setModulus

public void setModulus(byte[] buffer,
                       short offset,
                       short length)
                throws CryptoException
Sets the modulus value of the key. The plaintext data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). Input modulus data is copied into the internal representation.

Note:

Throws:
CryptoException


Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.