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

Hang coconut issuance off the validator-api #679

Merged
merged 70 commits into from
Aug 13, 2021
Merged

Conversation

durch
Copy link
Contributor

@durch durch commented Jul 13, 2021

Changes:

  • Adds coconut mod to validator API

  • Adds tauri-client to clients

  • Adds coconut-validator-interface to common

  • validator-api needs a cocnut keypair to run, one can be generated via keygen-cli

  • see README to run

I'll go about merging develop, see if I can resolve the conflicts

@durch durch changed the title Hand coconut issuance off the validator-api Hang coconut issuance off the validator-api Jul 13, 2021
validator-api/src/main.rs Outdated Show resolved Hide resolved
@durch durch marked this pull request as ready for review July 20, 2021 11:04
@durch durch requested a review from jstuczyn July 20, 2021 12:02
clients/tauri-client/src/components/Nav.svelte Outdated Show resolved Hide resolved
clients/tauri-client/src/routes/index.svelte Outdated Show resolved Hide resolved
clients/tauri-client/src/service-worker.js Show resolved Hide resolved
common/coconut-interface/src/lib.rs Show resolved Hide resolved
validator-api/src/config/mod.rs Show resolved Hide resolved
validator-api/src/config/mod.rs Outdated Show resolved Hide resolved
validator-api/src/config/mod.rs Show resolved Hide resolved
validator-api/src/main.rs Outdated Show resolved Hide resolved
validator-api/src/main.rs Outdated Show resolved Hide resolved
@neacsu neacsu marked this pull request as draft August 3, 2021 08:16
@neacsu neacsu force-pushed the validator-api-coconut branch 3 times, most recently from b4f5f6a to 2a0c3c5 Compare August 5, 2021 12:35
@neacsu neacsu marked this pull request as ready for review August 5, 2021 13:27
@neacsu neacsu self-assigned this Aug 5, 2021
@neacsu neacsu requested review from jstuczyn and removed request for neacsu August 5, 2021 13:27
Copy link
Contributor

@jstuczyn jstuczyn left a 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

clients/native/src/client/mod.rs Outdated Show resolved Hide resolved
clients/native/src/commands/init.rs Outdated Show resolved Hide resolved
clients/socks5/src/commands/init.rs Outdated Show resolved Hide resolved
clients/tauri-client/src/routes/index.svelte Show resolved Hide resolved
@@ -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
Copy link
Contributor

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

Copy link
Contributor

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.

@neacsu neacsu requested a review from jstuczyn August 9, 2021 14:33
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.
common/coconut-interface/src/lib.rs Outdated Show resolved Hide resolved
common/coconut-interface/src/lib.rs Outdated Show resolved Hide resolved
common/coconut-interface/src/lib.rs Outdated Show resolved Hide resolved
@neacsu neacsu requested a review from jstuczyn August 11, 2021 14:17
@neacsu neacsu merged commit 28e55c6 into develop Aug 13, 2021
@neacsu neacsu deleted the validator-api-coconut branch August 13, 2021 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants