Class BikeAlgorithm


public final class BikeAlgorithm extends AbstractCryptoAlgorithm

Integration of BIKE (Bit Flipping Key Encapsulation) algorithm

Declares BIKE as a AbstractCryptoAlgorithm and registers its supported roles, contexts, and key builders within the ZeroEcho framework.

Capabilities

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
  • 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