Skip to main content

payload

Standalone Functions

compute_encrypted_log

compute_encrypted_log(contract_address, ovsk_app, ovpk, ivpk, recipient, plaintext, );

Parameters

NameType
contract_addressAztecAddress
ovsk_appField
ovpkOvpkM
ivpkIvpkM
recipientAztecAddress
plaintext[u8; P]

fr_to_fq

fr_to_fq(r);

/ This is fine because modulus of the base field is smaller than the modulus of the scalar field.

Parameters

NameType
rField

generate_ephemeral_key_pair

generate_ephemeral_key_pair();

Takes no parameters.

compute_incoming_body_ciphertext

compute_incoming_body_ciphertext(plaintext, eph_sk, ivpk, );

Parameters

NameType
plaintext[u8; P]
eph_skScalar
ivpkIvpkM

compute_outgoing_body_ciphertext

compute_outgoing_body_ciphertext(recipient, recipient_ivpk, ovsk_app, eph_sk, eph_pk, );

/ be able to derive the key with which the incoming log can be decrypted.

Parameters

NameType
recipientAztecAddress
recipient_ivpkIvpkM
ovsk_appScalar
eph_skScalar
eph_pkPoint

test_encrypted_log_matches_typescript

test_encrypted_log_matches_typescript();

Takes no parameters.

test_incoming_body_ciphertext_matches_typescript

test_incoming_body_ciphertext_matches_typescript();

Takes no parameters.

test_encrypted_log_outgoing_body_matches_typescript

test_encrypted_log_outgoing_body_matches_typescript();

Takes no parameters.