payload
Standalone Functions
compute_private_log_payload
compute_private_log_payload(contract_address, ovsk_app, ovpk, recipient, sender, plaintext, );
Once the structure is finalized with defined overhead and max note field sizes, this value will be fixed and should remain unaffected by further payload composition changes.
Parameters
Name | Type |
---|---|
contract_address | AztecAddress |
ovsk_app | Field |
ovpk | OvpkM |
recipient | AztecAddress |
sender | AztecAddress |
plaintext | [u8; P] |
compute_event_log_payload
compute_event_log_payload(contract_address, ovsk_app, ovpk, recipient, sender, plaintext, );
Parameters
Name | Type |
---|---|
contract_address | AztecAddress |
ovsk_app | Field |
ovpk | OvpkM |
recipient | AztecAddress |
sender | AztecAddress |
plaintext | [u8; P] |
compute_partial_public_log_payload
compute_partial_public_log_payload(contract_address, ovsk_app, ovpk, recipient, sender, plaintext, );
Parameters
Name | Type |
---|---|
contract_address | AztecAddress |
ovsk_app | Field |
ovpk | OvpkM |
recipient | AztecAddress |
sender | AztecAddress |
plaintext | [u8; P] |
compute_encrypted_log
compute_encrypted_log(contract_address, ovsk_app, ovpk, recipient, sender, plaintext, );
Parameters
Name | Type |
---|---|
contract_address | AztecAddress |
ovsk_app | Field |
ovpk | OvpkM |
recipient | AztecAddress |
sender | AztecAddress |
plaintext | [u8; P] |
extend_private_log_plaintext
extend_private_log_plaintext(plaintext);
Fill the remaining bytes with random values to reach a fixed length of N.
Parameters
Name | Type |
---|---|
plaintext | [u8; P] |
get_random_bytes
get_random_bytes();
Takes no parameters.
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
Name | Type |
---|---|
r | Field |
generate_ephemeral_key_pair
generate_ephemeral_key_pair();
Takes no parameters.
compute_incoming_body_ciphertext
compute_incoming_body_ciphertext(plaintext, eph_sk, address_point, );
Parameters
Name | Type |
---|---|
plaintext | [u8; P] |
eph_sk | Scalar |
address_point | AddressPoint |
compute_outgoing_body_ciphertext
compute_outgoing_body_ciphertext(recipient, ovsk_app, eph_sk, eph_pk, );
/ be able to derive the key with which the incoming log can be decrypted.
Parameters
Name | Type |
---|---|
recipient | AztecAddress |
ovsk_app | Scalar |
eph_sk | Scalar |
eph_pk | Point |
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.