-
Notifications
You must be signed in to change notification settings - Fork 234
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
Hang coconut issuance off the validator-api #679
Conversation
b4f5f6a
to
2a0c3c5
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.
Considering we want to merge that puppy rather soon, I'd say the biggest things I'd really want changed before it are:
State::init()
in coconut-interface- introduction of some error enum in the same file, it looks kinda messy with the String there
- creation of github issues/user stories for things I mentioned in other comments
@@ -48,12 +50,29 @@ impl<'a> GatewayHandshake<'a> { | |||
} | |||
} | |||
|
|||
// init: <- pub_key || g^x | |||
let (remote_identity, remote_ephemeral_key) = check_processing_error( | |||
// init: <- pub_key || g^x || credential |
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 wonder whether there might be some attack surface here if we're sending the credential in plain that is not bound to anyone. Perhaps it should be sent towards the end of the handshake so that it'd be encrypted with the derived shared key? I honestly don't know. Perhaps @aniampio might have an opinion
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.
As per the offline discussion, I'll do the credential send after the handshake, so that it's protected with the shared key.
... as config is no longer managed by rocket
c63f208
to
4dd8c1a
Compare
... for the public attributes of the credential
Use the function from cli-demo-rs from https://github.com/nymtech/coconut to make the identity public key into a public attribute.
As we know beforehand the size of the keys, we can use fixed size array instead of vectors. This eliminates the need for a prefixed length in the serialized form of the InitMessage structure and enables a easy deserialization of the remote identity before the actual bincode deserialization that we do in the handshake process. Before this, the `extract_remote_identity_from_register_init` function attempted to deserialize into a public key the length-prefixed public key received from the client, thus failing sporadically with a `Cannot decompress Edwards point` error.
Changes:
Adds
coconut
mod to validator APIAdds
tauri-client
toclients
Adds
coconut-validator-interface
tocommon
validator-api
needs a cocnut keypair to run, one can be generated via keygen-clisee README to run
I'll go about merging
develop
, see if I can resolve the conflicts