Get algorithm information and constants
Algorithm metadata (copy of CLASSIC_MCELIECE_348864F_INFO)
Generate a new keypair for Classic-McEliece-348864f
Generates a public/private keypair using the algorithm's internal random number generator. The secret key must be kept confidential.
Generated keypair
Encapsulate a shared secret using a public key
Generates a random shared secret and encapsulates it using the provided public key. The shared secret can be used for symmetric encryption.
Recipient's public key (261120 bytes)
Encapsulation result
Decapsulate a shared secret using a secret key
Recovers the shared secret from a ciphertext using the secret key. The recovered shared secret will match the one generated during encapsulation.
Ciphertext received (96 bytes)
Recipient's secret key (6492 bytes)
Recovered shared secret (32 bytes)
Clean up resources and free WASM memory
This method should be called when you're done using the instance to free WASM memory. After calling destroy(), the instance cannot be used for further operations.
Classic-McEliece-348864f wrapper class providing high-level KEM operations
This class wraps the low-level WASM module to provide a user-friendly interface for Classic-McEliece-348864f operations with automatic memory management and input validation.
ClassicMcEliece348864f
Example