Skip to content

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.

@jhawk28 jhawk28 marked this pull request as ready for review July 25, 2025 16:23
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