-
Notifications
You must be signed in to change notification settings - Fork 284
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
feat(Keys_Viewing): Update encrypted log format #5901
Comments
We should consider the exact format we will be using. Namely, when creating the final object, we have that using raw bytes that are only made into fields at the end will likely be using less data. A particularly annoying thing is that encrypting the address for the I think we should collect the bytes, as we can then use the other 30 bytes that we have available from this 1 byte extra to some other values, for example, we could likely have both the tag and the header sharing a bit. |
As part of this work, we should be altering the Currently the function is using the I suggest we alter this to draw a The remainder of the function would be mainly the same, but we would change the |
Speaking with Mike, and we will go back to the "one big log" for a note instead of splitting it into multiple sections. From #6348 there is a typescript implementation showing the encryption and decryption (both incoming and outgoing). It should be "fairly" straightforward to implement the In particular, we should be able to modify the
A interesting note that should make it slightly easier to implement. It is possible to set it up such that the plumbing can be handled before the noir implementation is even written 👀 But likely more convenient to match it first with just the payload similar to the other log tests (as #6334 and #6325) |
Fixes #5901. Uses the new format to match the keys and logs spec. The current implementation here is still using a typescript implementation to encrypt the data, mainly using the new flow. The intention is that #6408 and #1139 can be addresses separately and than we can just replace the import to use the constrained version instead of the oracle at that point. Note, that the outgoing logs are currently less than meaningful, as some of the infrastructure is not yet in place to handle those nicely, see #6410 for more on that. What was called the encrypted_log_payload in #6348 have been moved into the l1_payload, to better integrate with the rest of the setup.
Fixes #5901. Uses the new format to match the keys and logs spec. The current implementation here is still using a typescript implementation to encrypt the data, mainly using the new flow. The intention is that #6408 and #1139 can be addresses separately and than we can just replace the import to use the constrained version instead of the oracle at that point. Note, that the outgoing logs are currently less than meaningful, as some of the infrastructure is not yet in place to handle those nicely, see What was called the encrypted_log_payload in #6348 have been moved into the l1_payload, to better integrate with the rest of the setup.
The format of encrypted logs should be altered to better match our requirements.
From the diagram we currently have a description as
However, this can be horribly inefficient for transactions that emit notes but don't wish to emit an outgoing note.
Instead, we can alter it such that we have a general
incoming_encrypted_log
as follows:And then have a separate
outgoing_encrypted_log
that have the rest.Note, that there is not direct link between the two, but we know they are part of the same tx, so for decryption of the outgoing a user would match it against all the
incoming_encrypted_log
s in the transaction.The text was updated successfully, but these errors were encountered: