Skip to content

Curve impl #160

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Curve impl #160

wants to merge 8 commits into from

Conversation

jhawk28
Copy link

@jhawk28 jhawk28 commented May 22, 2025

Porting curve implementation from https://github.com/workspace-9/gomq over. Handshake appears to be working correctly for both client and server. Decrypt and encrypt are partially working, but not exactly correct.

Needed to move the encrypt location so that it uses the encrypted payload for the header values. Encrypt also requires the more flag. The API may be able to be adjusted so that the Encrypt/Decrypt functions return a []byte instead of using the Writer/Reader interface. Also, instead of using the same interface for all security implementations (null, plain, and curve). It may make sense to have a small interface for curve that has the encrypt/decrypt since plain and null don't actually do encryption.

Fix #26

@jhawk28
Copy link
Author

jhawk28 commented May 23, 2025

updated API to return []byte and made a SecurityEncryption interface to separate plain/null (no encryption) from curve (with encryption). Found the issue with decryption (wasn't handling the more flag properly). Still need to figure out why encrypt isn't working properly.

@jhawk28
Copy link
Author

jhawk28 commented May 23, 2025

Was able to get the encryption working as well.

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.

zmq4: implement CURVE security mechanism
1 participant