ase library

Classes

ASECiphertextKEM
This class represents the ciphertext for the ASE KEM scheme. It contains a polynomial vector u and a polynomial v.
ASECombinedCipher
Final class for the combined ciphertext It contains the KEM ciphertext, nonce, ciphertext, AAD, and salt
ASEKeyPair
This class represents the key pair for the ASE KEM scheme. It contains a public key and a private key.
ASEPrivateKey
This class represents the private key for the ASE KEM scheme. It contains a polynomial vector s.
ASEPublicKey
This class represents the public key for the ASE KEM scheme. It contains a list of polynomial vectors A and a polynomial b.

Functions

decryptString(ASECombinedCipher cc, ASEPrivateKey sk) Future<String>
Decrypts a string using the hybrid PKE scheme It uses the private key (sk) to generate a shared secret and then uses AES-GCM to decrypt the ciphertext (ct)
deserializeCombinedCipher(String path) ASECombinedCipher
Deserializes the combined ciphertext from a JSON file The file should contain a JSON object with the keys 'kemCt', 'nonce', 'ciphertext', and 'salt'.
deserializePublicKey(String path) ASEPublicKey
Deserializes the public key from a JSON file The file should contain a JSON object with the keys 'A' and 'b'.
encryptString(String pt, ASEPublicKey pk) Future<ASECombinedCipher>
Encrypts a string using the hybrid PKE scheme It uses the public key (pk) to generate a shared secret and then uses AES-GCM to encrypt the plaintext (pt)
serializeCombinedCipher(ASECombinedCipher cc) String
Deserializes the public key from JSON format
serializePublicKey(ASEPublicKey pk) String
Serializes the public key to JSON format