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

Add message encryption/decryption #184

Open
rabutial opened this issue Oct 6, 2021 · 4 comments
Open

Add message encryption/decryption #184

rabutial opened this issue Oct 6, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@rabutial
Copy link

rabutial commented Oct 6, 2021

See nym-hackathon/ideas#9

Specter DIY is a fantastic hardware platform for this idea.

@stepansnigirev
Copy link
Collaborator

Sounds doable. We are adding extensions support soon, and processing of nym messages can be one of the extensions.
Are there any specs on the message format and cryptographic algorithms used in the protocol?

@stepansnigirev stepansnigirev added the enhancement New feature or request label Oct 8, 2021
@rabutial
Copy link
Author

rabutial commented Dec 5, 2021

Sounds doable. We are adding extensions support soon, and processing of nym messages can be one of the extensions. Are there any specs on the message format and cryptographic algorithms used in the protocol?

I've asked someone from the Nym team to provide an authoritative answer.

@rabutial
Copy link
Author

rabutial commented Dec 11, 2021

@stepansnigirev It probably makes the most sense to focus on offline encryption/decryption of messages, rather than trying to do all the network-related cryptography offline.

That means we would be focused on interfacing to e.g https://github.com/sgeisler/nym-chat -- which appears to be the intended (but not yet finished) chat client for the Nym network.

At the moment the message format given here is probably too simple and will no doubt grow complications as development progresses.

At the moment, the plaintext format is:

  • the sender, represented as a String (Rust Strings are UTF-8)
  • the message, represented as a String

The ciphertext format is:

  • a Nonce, which is an array of unsigned 8 bit integers as documented here
  • the message data, as an array of 8 bit integers

Encryption/decryption is handled by the aes_gcm library, and that's really all there is to it.

Since the Nym chat client is in a very rudimentary state, I also added a note for Catchat that they may want to consider supporting this. My understanding is the Katzenpost mixnet-based Catchat (as opposed to the Nym mixnet-based nym-chat) is in a much more advanced state of development.

@rabutial
Copy link
Author

rabutial commented Mar 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants