Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.squawk.security
Class ECPublicKey

    java.lang.Object
      com.sun.squawk.security.ECPublicKey

    public final class ECPublicKey

extends Object

Field Summary
`protected int` | `bitsize` Key size in bits, e.g.
`protected int` | `bytesize`
`protected ECCurveFp` | `curve` Flag indicating if the key has been initialized.
`protected FFA` | `ffa`
`boolean` | `initOk`
`protected ECPoint` | `keyData`

Constructor Summary
`ECPublicKey()`

Method Summary
`void` | `clearKey()`
`ECCurveFp` | `getCurve()`
`ECPoint` | `getKeyData()`
`int` | `getSize()`
`int` | `getW(byte[] buffer, int offset)` Returns the point of the curve comprising the public key in plain text form.
`void` | `setW(byte[] buffer, int offset, int length)` Sets the point of the curve comprising the public key.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### keyData

    protected ECPoint keyData

### bitsize

    protected int bitsize

  Key size in bits, e.g. for RSA, this is modulus size.

### bytesize

    protected int bytesize

### curve

    protected ECCurveFp curve

  Flag indicating if the key has been initialized.

### ffa

    protected FFA ffa

### initOk

    public boolean initOk

Constructor Detail

### ECPublicKey

    public ECPublicKey()

Method Detail

### setW

    public void setW(byte[] buffer,
                     int offset,
                     int 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.

  Parameters:
    `buffer` - the input buffer
    `offset` - the offset into the input buffer at which the point specification begins
    `length` - the byte length of the point specificiation
  Throws:
    `javacard.security.CryptoException` - with the following reason code:
    - `CryptoException.ILLEGAL_VALUE` if the input parameter data format is incorrect, or if the input parameter data is inconsistent with the elliptic curve.
    `CryptoException`

### getW

    public int getW(byte[] buffer,
                    int 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).

  Parameters:
    `buffer` - the output buffer
    `offset` - the offset into the output buffer at which the point specification data is to begin
  Returns:
    the byte length of the point specificiation
  Throws:
    `javacard.security.CryptoException` - with the following reason code:
    - `CryptoException.UNINITIALIZED_KEY` if the point of the curve comprising the public key has not been successfully initialized since the time the initialized state of the key was set to false.
    `CryptoException`
  See Also:
    `javacard.security.Key`

### getSize

    public int getSize()

### getKeyData

    public ECPoint getKeyData()

### clearKey

    public void clearKey()

### getCurve

    public ECCurveFp getCurve()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"