Skip to main content

encrypt

function encrypt(message: Field[], otherPublicKey: PublicKey): {
"cipherText": Field[];
"publicKey": Group;
}

Public Key Encryption, using a given array of Field elements and encrypts it using a PublicKey.

Parameters

message: Field[]

otherPublicKey: PublicKey

Returns

{
"cipherText": Field[];
"publicKey": Group;
}

cipherText

cipherText: Field[];

publicKey

publicKey: Group;

Source

lib/provable/crypto/encryption.ts:16