-
Notifications
You must be signed in to change notification settings - Fork 10
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
Refactor process_message_3 to follow implementation guidelines #130
Refactor process_message_3 to follow implementation guidelines #130
Conversation
bf9075b
to
0513f02
Compare
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.
Thanks for this PR, looks good to me! Left two minor comments below.
let ead_success = if let Some(ead_3) = ead_3 { | ||
r_process_ead_3(ead_3).is_ok() | ||
cred_i = if let Some(cred_i_expected) = cred_i_expected { | ||
// 1. Does ID_CRED_X point to a stored authentication credential? YES |
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.
We could leave a pointer to Marco's diagram, just to make clear where these comments come from.
Suggestion: Comments tagged with a number refer to Marco Tiloca's implementation guidelines diagram (yet to be published).
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.
done
@@ -287,19 +289,86 @@ pub fn r_process_message_3( | |||
let decoded_p3_res = decode_plaintext_3(&plaintext_3); | |||
|
|||
if decoded_p3_res.is_ok() { | |||
let (kid, mac_3, ead_3) = decoded_p3_res.unwrap(); | |||
let (id_cred_i, mac_3, ead_3) = decoded_p3_res.unwrap(); |
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 to leave this as a note, for now this will only work for the following cases:
- R receives KID and has the associated CRED_I locally stored
- R receives CRED_I and uses it
According to lake-authz
, R (V) could also support receiving KID and calling W to resolve CRED_I. We could leave a TO-DO for that in the code.
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.
done
0513f02
to
0906fa0
Compare
@geonnave fstar generation seems to be triggered for this PR now and it fails. could you check if the command is OK? |
0906fa0
to
2fbf6f7
Compare
This PR updates
r_process_message_3
routine to allow generic handling of EAD items and of credentials, as per draft-tiloca-lake-implem-cons.It also updated the
decode_plaintext_3
routine to enable the credential to be passed in the message by value, instead only by reference.Closes #129