Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add an IBC prefix to transfer escrow addresses #7967
Add an IBC prefix to transfer escrow addresses #7967
Changes from 14 commits
bb7498f
b7227b4
6e4d099
b090898
af76261
8cb1fee
5fce47d
7bffc31
91b68dd
ab19a4a
c57493b
6731918
e366e9c
111ed79
d730ae2
3559e72
c697887
c5ef4f9
c9e3a18
272dd2a
8a99065
0677e09
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm what is the precise difference between inserting a prefix here and having a long fixed port name (security-wise)? Is there any?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a UI thing, if we make the port a long fixed name, then denominations would be long, though it seems apparent this information generally won't be user facing. There is also potential for design misuse. Port identifiers are allowed to be as small as 2 characters.
Should I make the escrow prefix longer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the length of the prefix increase the difficulty? If not, then we can just use the port as the prefix, the channel as the content and the
0
as the separator (ie still using ADR 028 format)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the length of the prefix does increase the difficulty (of-brute forcing an ECDSA key) the same way a longer port name does. Does ADR 28 analyse this concern in detail? As far as I can tell, it does not, but it should - consider the example of having a 1-character prefix, then every 1/255 (or so) ECDSA keys will have that prefix (although it needs to also have a
/
somewhere, but that's just then 1/255^2 which is still probably feasible).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any discussion of this either.
Any recommended prefix length to use?
I think using a prefix separate from the port identifier is a fine solution. It doesn't have any negatives from what I can see and reduces the likelihood of a chain accidentally opening themselves up to an attack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe even with the current construction on master, using a fixed, long portID makes this attack difficult already. From my understanding, the reason we wanted this feature is to remove any dependence between choice of port-id and security of the escrow address, since this would be non-obvious to a ibc application developer.
Which I agree with. Let's try to reduce the number of quirks developers have to keep in mind. Using a standard length prefix separate from portID makes sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed on the conclusion. I think this may be a point to clarify in ADR 028.