Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Include message type to signed payload #6

Closed
sergefdrv opened this issue Jul 12, 2018 · 5 comments · Fixed by #148
Closed

Include message type to signed payload #6

sergefdrv opened this issue Jul 12, 2018 · 5 comments · Fixed by #148
Assignees
Labels
bug Something isn't working

Comments

@sergefdrv
Copy link
Contributor

The message type should be covered by signature/USIG certificate to guarantee that a singed payload will not happen to be misinterpreted. NB: Protobuf does not include the message type into the binary encoding.

@sergefdrv sergefdrv added the bug Something isn't working label Jul 12, 2018
@nhoriguchi
Copy link
Contributor

My brief search shows that protobuf supports message type Any and golang provides the related package which should provide the functionality to embed the message type info into the message itself. Currently our project depends on the older version of protobuf (v1.3.1), so if we want to go in this direction we will start with updating protobuf version (which might cause unexpected issues).

@sergefdrv
Copy link
Contributor Author

I think first step to take would be defining an abstract interface for messages, thus separating message usage from message representation. Another thing to consider is that the signed/certified serialized message payload should be retained in its original form, so that validation will be reliable even if different node would use different version of Protobuf generating slightly different serialized binaries.

Now, I'm actually experimenting with similar kind of task. Maybe I could solve this issue using the gained experience, before introducing view-chage message types.

@sergefdrv sergefdrv self-assigned this Oct 4, 2019
@nhoriguchi
Copy link
Contributor

nhoriguchi commented Dec 25, 2019

This issue seems to be solved by #122, so can we close this or do we have remaining items?

BTW, have a nice holidays!

@sergefdrv
Copy link
Contributor Author

In fact, #122 was a preparation step to solve this issue in isolation from the core protocol logic. Messages' signed/certified payloads are still the same, i.e. missing any payload type designator/tag. I have solved similar problem somewhere else and plan to solve this issue in similar way.

@sergefdrv
Copy link
Contributor Author

Have nice holidays, too. Btw, I'll be fully back from Jan 2.

sergefdrv pushed a commit to sergefdrv/minbft that referenced this issue Jan 3, 2020
Message type should be covered in authenticated data to guarantee that
it cannot be misinterpreted. This resolves hyperledger-labs#6.

Signed-off-by: Sergey Fedorov <sergey.fedorov@neclab.eu>
sergefdrv pushed a commit to sergefdrv/minbft that referenced this issue Jan 9, 2020
Message type should be covered in authenticated data to guarantee that
it cannot be misinterpreted. This resolves hyperledger-labs#6.

Signed-off-by: Sergey Fedorov <sergey.fedorov@neclab.eu>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants