javacard.security
Interface ECPublicKey

All Superinterfaces:
ECKey, Key, PublicKey

public interface ECPublicKey
extends PublicKey, ECKey

The ECPublicKey interface is used to verify signatures on signed data using the ECDSA algorithm and to generate shared secrets using the ECDH algorithm. An implementation of ECPublicKey interface must also implement the ECKey interface methods.

When all components of the key (W, A, B, G, R, Field) are set, the key is initialized and ready for use.

The notation used to describe parameters specific to the EC algorithm is based on the naming conventions established in [IEEE P1363].

Version:
1.0
See Also:
ECPrivateKey

Method Summary
 short getW(byte[] buffer, short offset)
          Returns the point of the curve comprising the public key in plain text form.
 void setW(byte[] buffer, short offset, short length)
          Sets the point of the curve comprising the public key.
 
Methods inherited from interface javacard.security.Key
clearKey, getSize, getType, isInitialized
 
Methods inherited from interface javacard.security.ECKey
getA, getB, getField, getG, getK, getR, setA, setB, setFieldF2M, setFieldF2M, setFieldFP, setG, setK, setR
 

Method Detail

setW

public void setW(byte[] buffer,
                 short offset,
                 short length)
          throws CryptoException
Sets the point of the curve comprising the public key. The point should be specified as an octet string as per ANSI X9.62. A specific implementation need not support the compressed form, but must support the uncompressed form of the point. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). Input parameter data is copied into the internal representation.

Note:

Throws:
CryptoException

getW

public short getW(byte[] buffer,
                  short offset)
           throws CryptoException
Returns the point of the curve comprising the public key in plain text form. The point is represented as an octet string in compressed or uncompressed forms as per ANSI X9.62. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte).

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.