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

CURVE plaintext should be placed in secure memory #3576

Closed
sigiesec opened this issue Jul 11, 2019 · 4 comments · Fixed by #3580
Closed

CURVE plaintext should be placed in secure memory #3576

sigiesec opened this issue Jul 11, 2019 · 4 comments · Fixed by #3580
Assignees

Comments

@sigiesec
Copy link
Member

For additional security, unencrypted plaintext should be placed in secure memory when using CURVE security.

Points to consider:

  • Is this effective for the message payload? Can we ensure this is for all copies that are under control of libzmq, and enable the user to ensure this as well?
  • We should care to reduce the number of secure memory allocations to a minimum since this is a very costly operation.
@bluca
Copy link
Member

bluca commented Jul 11, 2019

I think it's enough to protect the allocation of secrets - if users want to protect their payloads, they can already do so with the message APIs that take a buffer and a callback to free it

@sigiesec
Copy link
Member Author

Ok, please give that a close look once I submit a PR.

But does the message API use secure memory?

@bluca
Copy link
Member

bluca commented Jul 12, 2019

With msg_init_data the data buffer is provided by the user, so it's up to them for sending. For receiving, we'd have to allocate the buffer used by the TCP recv syscall with these API, and I don't think it's worth the trouble and performance degradation.
Let's start with the simplest and highest return value change - using it for the private keys plaintext storage

@sigiesec
Copy link
Member Author

Ok, then the number of allocations is not critical since the keys are only exhanged once in a session

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 a pull request may close this issue.

2 participants