Package zeroecho.core.alg.bike
Class BikeAlgorithm
java.lang.Object
zeroecho.core.CryptoAlgorithm
zeroecho.core.alg.AbstractCryptoAlgorithm
zeroecho.core.alg.bike.BikeAlgorithm
Integration of BIKE (Bit Flipping Key Encapsulation) algorithm
Declares BIKE as aAbstractCryptoAlgorithm and
registers its supported roles, contexts, and key builders within the ZeroEcho
framework.
Capabilities
- KEM - encapsulation and decapsulation of shared secrets using public and private keys.
- Agreement - initiator and responder flows for
MessageAgreementContextbuilt on top of BIKE KEM. - Asymmetric key builders - generation and import of BIKE keys from
BikeKeyGenSpec,BikePublicKeySpec, andBikePrivateKeySpec.
Provider
Uses the BouncyCastle Post-Quantum provider (BCPQC). The provider must be registered in the JCA Security
before use.
Example
BikeAlgorithm bike = new BikeAlgorithm();
// Generate a key pair
KeyPair kp = bike.asymmetricKeyBuilder(BikeKeyGenSpec.class)
.generateKeyPair(BikeKeyGenSpec.bike256());
// Encapsulation using recipient's public key
KemContext kemEnc = bike.create(KeyUsage.ENCAPSULATE, kp.getPublic(), VoidSpec.INSTANCE);
// Decapsulation using private key
KemContext kemDec = bike.create(KeyUsage.DECAPSULATE, kp.getPrivate(), VoidSpec.INSTANCE);
- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class zeroecho.core.CryptoAlgorithm
CryptoAlgorithm.AsymBuilderInfo, CryptoAlgorithm.SymBuilderInfo -
Constructor Summary
ConstructorsConstructorDescriptionConstructs and registers the BIKE algorithm with all its roles and key builders. -
Method Summary
Methods inherited from class zeroecho.core.alg.AbstractCryptoAlgorithm
capabilityMethods inherited from class zeroecho.core.CryptoAlgorithm
addCapability, asymmetricBuildersInfo, asymmetricKeyBuilder, bind, create, displayName, generateKeyPair, generateKeyPair, generateSecret, id, importPrivate, importPublic, importSecret, listCapabilities, priority, providerName, registerAsymmetricKeyBuilder, registerSymmetricKeyBuilder, roles, supports, symmetricBuildersInfo, symmetricKeyBuilder
-
Constructor Details
-
BikeAlgorithm
public BikeAlgorithm()Constructs and registers the BIKE algorithm with all its roles and key builders.Registers:
- KEM (encapsulate/decapsulate)
- Agreement (initiator/responder)
- Asymmetric key builders for BIKE key specifications
-