Package org.bouncycastle.pqc.crypto.mayo
Class MayoKeyPairGenerator
java.lang.Object
org.bouncycastle.pqc.crypto.mayo.MayoKeyPairGenerator
- All Implemented Interfaces:
AsymmetricCipherKeyPairGenerator
Implementation of the MAYO asymmetric key pair generator following the MAYO signature scheme specifications.
This generator produces MayoPublicKeyParameters
and MayoPrivateKeyParameters
based on the
MAYO algorithm parameters. The implementation follows the specification defined in the official MAYO
documentation and reference implementation.
References:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerates a new asymmetric key pair following the MAYO algorithm specifications.void
init
(KeyGenerationParameters param) intialise the key pair generator.
-
Constructor Details
-
MayoKeyPairGenerator
public MayoKeyPairGenerator()
-
-
Method Details
-
init
Description copied from interface:AsymmetricCipherKeyPairGenerator
intialise the key pair generator.- Specified by:
init
in interfaceAsymmetricCipherKeyPairGenerator
- Parameters:
param
- the parameters the key pair is to be initialised with.
-
generateKeyPair
Generates a new asymmetric key pair following the MAYO algorithm specifications.The key generation process follows these steps:
- Initializes parameter dimensions from
MayoParameters
- Generates secret key seed using a secure random generator
- Derives public key seed using SHAKE-256
- Expands matrix parameters P1 and P2
- Performs GF(16) matrix operations for key material generation
- Assembles and packages the public key components
- Securely clears temporary buffers containing sensitive data
- Specified by:
generateKeyPair
in interfaceAsymmetricCipherKeyPairGenerator
- Returns:
- A valid MAYO key pair containing public and private key parameters
- Initializes parameter dimensions from
-