|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bouncycastle.jcajce.spec.SM9KeyExchangeSpec
Parameter spec for the SM9 key exchange protocol (GM/T 0044.3-2016) through : the two things the protocol needs that the API has no slot for - which role this party plays, and the length of the agreed key, which is an input to the GM/T 0044.3 key derivation rather than a truncation of its output.
Everything else the exchange needs comes from the key the
is initialised with (this party's key-exchange user key
from
SM9EncMasterPrivateKey.generateExchangeKeyPair(byte[]))
or from the peer's key supplied to : the master public key and
the hid ride on the user key, so this party's ephemeral value is generated
inside the provider under its own master key and cannot be mis-bound to
another.
The optional GM/T 0044.3 key-confirmation tags S_A / S_B have no channel in
the API; a caller needing them should use the
lightweight SM9KeyExchange
directly, as callers do for SM2's tags.
| Constructor Summary | |
SM9KeyExchangeSpec(boolean initiator)
Base constructor, with the 128-bit key length of the GM/T 0044.5 worked examples. |
|
SM9KeyExchangeSpec(boolean initiator,
int keyLengthBits)
|
|
| Method Summary | |
int |
getKeyLengthBits()
The agreed key length in bits - an input to the GM/T 0044.3 key derivation. |
boolean |
isInitiator()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SM9KeyExchangeSpec(boolean initiator)
initiator - whether this party is the initiator (user A).
public SM9KeyExchangeSpec(boolean initiator,
int keyLengthBits)
initiator - whether this party is the initiator (user A).keyLengthBits - the length of the agreed key in bits, a positive whole number of
bytes - the key is handed back as bytes, and KEM.SM9-KEM takes the same
rule, so the two services no longer round a fractional-byte request in
opposite directions.| Method Detail |
public boolean isInitiator()
public int getKeyLengthBits()
|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||