Static
supportedPQCAlgorithmsDecrypts an encrypted object based on the algorithm
The encrypted object to decrypt
The decrypted data
Derives a seed for the given algorithm
The algorithm to derive the seed for
Optional
seed: Uint8Array<ArrayBufferLike>(optional) The seed to derive the seed from, or undefined to generate a new one or use the master seed if set
The derived seed
Encrypts a message based on the algorithm using the previously generated identity
The algorithm to encrypt the message with
The message to encrypt
The public key of the peer to encrypt the message to
The encrypted object as an encryptedObject
Signs a message based on the algorithm using the previously generated identity
The algorithm to sign the message with
The message to sign
The signed object as a signedObject
Verifies a signed object based on the algorithm
The signed object to verify
True if the signed object is valid, false otherwise
Static
getOptional
instanceId: stringOptional
masterSeed: Uint8Array<ArrayBufferLike>Static
getStatic
remove
UnifiedCrypto is a class that provides a unified interface for the different encryption algorithms It is used to encrypt and decrypt messages, sign and verify messages, and generate identities for the different algorithms It uses Enigma for PQC encryption/decryption and Cryptography for RSA encryption/decryption It uses Enigma for PQC signing and Cryptography for Ed25519 signing It uses the master seed to derive seeds for the different algorithms using HKDF Manages encryptedObjects and signedObjects to route data through the supported algorithms REVIEW: Check race conditions REVIEW: Check stability of the master seed transformation TODO: Build a test suite for the UnifiedCrypto class