|
SunSPOT host API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.squawk.security.signing.ECPrivateKey
public final class ECPrivateKey
The ECPrivateKey
interface is used to generate signatures on
data using the ECDSA (Elliptic Curve Digital Signature Algorithm) and to
generate shared secrets using the ECDH (Elliptic Curve Diffie-Hellman)
algorithm. An implementation of ECPrivateKey
interface must
also implement the ECKey
interface methods.
When the component of the key (S) is 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].
ECPublicKey
,
KeyBuilder
,
Signature
,
KeyAgreement
Field Summary | |
---|---|
protected int |
bitsize
Key size in bits |
protected int |
bytesize
|
protected com.sun.squawk.security.ecc.ECCurveFp |
curve
|
protected com.sun.squawk.security.ecc.FFA |
ffa
|
protected boolean |
initOk
Flag indicating if the key has been initialized. |
protected int[] |
keyData
|
protected int |
keyLength
|
Constructor Summary | |
---|---|
ECPrivateKey()
|
Method Summary | |
---|---|
void |
clearKey()
Clears the key |
com.sun.squawk.security.ecc.ECCurveFp |
getCurve()
|
int[] |
getKeyData()
|
int |
getS(byte[] buffer,
int offset)
Returns the point of the curve comprising the public key in plain text form. |
int |
getSize()
|
boolean |
isInitialized()
|
void |
setS(byte[] buffer,
int offset,
int length)
Sets the value of the secret key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int bitsize
protected int bytesize
protected boolean initOk
protected com.sun.squawk.security.ecc.ECCurveFp curve
protected com.sun.squawk.security.ecc.FFA ffa
protected int[] keyData
protected int keyLength
Constructor Detail |
---|
public ECPrivateKey()
Method Detail |
---|
public void setS(byte[] buffer, int offset, int length) throws CryptoException
buffer
- the input bufferoffset
- the offset into the input buffer at which the secret
value is to beginlength
- the byte length of the secret value
javacard.security.CryptoException
- with the following reason code:
CryptoException.ILLEGAL_VALUE
if
the input key data is inconsistent with the elliptic
curve.CryptoException
public int getS(byte[] buffer, int offset) throws CryptoException
buffer
- the output bufferoffset
- the offset into the output buffer at which the point
specification data is to begin
com.sun.squawk.security.signing.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
public void clearKey()
public boolean isInitialized()
public com.sun.squawk.security.ecc.ECCurveFp getCurve()
public int[] getKeyData()
public int getSize()
|
SunSPOT host API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |