Class BikeKeySupport
java.lang.Object
zeroecho.sdk.util.BikeKeySupport
BIKE-256 key pair utilities for modules that depend on
zeroecho.lib.
BouncyCastle is an internal implementation detail of zeroecho.lib.
This class provides BIKE key-pair operations through standard JCA types
(KeyPair, PublicKey, PrivateKey) so that callers
do not need to depend on BouncyCastle directly.
-
Method Summary
Modifier and TypeMethodDescriptionstatic KeyPairGenerates a fresh BIKE-256 key pair using the BCPQC provider.static PrivateKeyloadPrivateKey(byte[] pkcs8Der) Decodes a BIKE private key from a PKCS#8 structure.static PublicKeyloadPublicKey(byte[] x509Der) Decodes a BIKE public key from a SubjectPublicKeyInfo structure.
-
Method Details
-
generateKeyPair
Generates a fresh BIKE-256 key pair using the BCPQC provider.- Returns:
- a new key pair whose private key is owned by the caller
- Throws:
GeneralSecurityException- if the provider or key generator is unavailable
-
loadPublicKey
Decodes a BIKE public key from a SubjectPublicKeyInfo structure. The parameter set is taken from the encoding; this method does not restrict imported keys to BIKE-256.- Parameters:
x509Der- non-null DER-encoded SubjectPublicKeyInfo- Returns:
- the decoded public key
- Throws:
GeneralSecurityException- if the provider is unavailable or the encoding is invalid
-
loadPrivateKey
Decodes a BIKE private key from a PKCS#8 structure. The parameter set is taken from the encoding. The caller remains responsible for protecting and clearing its input byte array.- Parameters:
pkcs8Der- non-null DER-encoded private key- Returns:
- the decoded private key, owned by the caller
- Throws:
GeneralSecurityException- if the provider is unavailable or the encoding is invalid
-