Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine the maximum log plaintext length #11634

Open
Tracked by #9119
nventuro opened this issue Jan 30, 2025 · 2 comments
Open
Tracked by #9119

Determine the maximum log plaintext length #11634

nventuro opened this issue Jan 30, 2025 · 2 comments
Labels
C-aztec.nr Component: Aztec smart contract framework team-fairies Nico's team

Comments

@nventuro
Copy link
Contributor

nventuro commented Jan 30, 2025

#11641 naively allocates the entire private log size to the ciphertext, but this is incorrect: there's also the tag, headers, encryption padding, etc. We need to account for this to produce a better limit.

Given users can introduce alternative encryption schemes, we could initially either choose to a) assume they're using our own, or b) set some upper bound for the overhead and hope their scheme does not require more metadata than what we allocate.

@nventuro nventuro added C-aztec.nr Component: Aztec smart contract framework team-fairies Nico's team labels Jan 30, 2025
@iAmMichaelConnor
Copy link
Contributor

I don't follow this one. The aim is for advanced users to be able to design their own log layouts, and the recent refactor enables that. The checks on whether the layout fits within a log should be done within the custom log strategy file (e.g. within default_aes128/note.nr)

@nventuro
Copy link
Contributor Author

nventuro commented Feb 3, 2025

I guess in the end it'll be multiple checks, and whichever one is strictest will be the one that actually matters. So e.g. the aztecnr note macro will fail if say your note would be packed into more than 13 fields, but a very inefficient encryption scheme might then fail if you're using it with your note that packes into more than 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-aztec.nr Component: Aztec smart contract framework team-fairies Nico's team
Projects
None yet
Development

No branches or pull requests

2 participants