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

Protocol State Machine #373

Merged
merged 9 commits into from Dec 16, 2022
Merged

Protocol State Machine #373

merged 9 commits into from Dec 16, 2022

Conversation

malishav
Copy link
Contributor

This PR adds an appendix describing an example protocol state machine with some encompassing text.

Closes #372

@gselander
Copy link
Collaborator

I think it is good that we label this as an example.

I propose to remove when to send error messages and when to discontinue from this text. When to send error messages is subject to DoS considerations and complicates the example. These actions are described elsewhere in the draft and can without loss of information be omitted here.

In the previous description I found it hard to distinguish between WAIT_M2 and RCVD_M2:

If a candidate message_2 is received we are still in WAIT_M2, because if processing fails we are transitioning from WAIT_M2 to ABORTED. So (after several versions) I added a state VRFD_M2, to distinguish between a message received and a message verified. It also enables a distinction between having decrypted message_2 (and obtained ID_CRED_R) and having verified the message with CRED_R.

To simplify the description after COMPLETED I separated the cases of message_4 or not with separate paragraphs in the text. This is known to the Initiator by the application profile.

Have a look at the result. If this works, I can make the same change for the Responder section.

@marco-tiloca-sics
Copy link
Collaborator

Have a look at the result. If this works, I can make the same change for the Responder section.

I think it looks and reads really nice!

@gselander
Copy link
Collaborator

gselander commented Dec 7, 2022

@malishav @marco-tiloca-sics Please read the whole appendix again.

Edit: Note one more commit on the last paragraph:

@malishav
Copy link
Contributor Author

malishav commented Dec 7, 2022

@gselander This looks good and I like how you split the handling of error vs invalid messages with new states. I am only thinking whether transition names should be in present tense to denote actions: s/sent message/send message; s/received message/receive message; s/verified message/verify message

@gselander
Copy link
Collaborator

@malishav Fixed, have a look.

@gselander
Copy link
Collaborator

@dnav You commented on this at IETF 115. Could you please review this new appendix and see if it addresses your concerns?

https://github.com/lake-wg/edhoc/pull/373/files

@marco-tiloca-sics
Copy link
Collaborator

@marco-tiloca-sics Please read the whole appendix again.

Looks good to me, thanks!

@dnav
Copy link

dnav commented Dec 7, 2022

@dnav You commented on this at IETF 115. Could you please review this new appendix and see if it addresses your concerns?

https://github.com/lake-wg/edhoc/pull/373/files

This looks goos to me.

My concerns were that a state machine could be seen as a second source of truth instead of just an example. I am relieved by the way it is presented here.

Note that now I want to rename my implementation states to WAIT_M2, RCVD_M2, etc. And I guess that during interoperability testings, people will refer to these states. This is not a bad thing.

Regards,

@gselander
Copy link
Collaborator

Thanks @dnav - no, you don't have to change your implementation states :-)

@gselander gselander mentioned this pull request Dec 9, 2022
@gselander
Copy link
Collaborator

No further comments received, merging now.

@gselander gselander merged commit 6a2fbff into lake-wg:master Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

State machine
4 participants