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

Ensure only valid keys are used to create nacl.Decrypter #350

Closed
robdefeo opened this issue Nov 4, 2019 · 1 comment
Closed

Ensure only valid keys are used to create nacl.Decrypter #350

robdefeo opened this issue Nov 4, 2019 · 1 comment
Labels
crypto/nacl enhancement New feature or request good first issue Good for newcomers

Comments

@robdefeo
Copy link
Member

robdefeo commented Nov 4, 2019

Is your feature request related to a problem? Please describe.
With the addition of different public key types, it is possible to create a signer with an incompatible public key

Describe the solution you'd like
Check public key type is valid before creating signer, currently it must be ed25519, return an error if not

Describe alternatives you've considered
N/a

Additional context
crypto/cipher/nacl/decrypt.go NewDecrypter gives an example of how this could be done.

@robdefeo robdefeo added enhancement New feature or request good first issue Good for newcomers crypto/nacl labels Nov 4, 2019
@Despire Despire mentioned this issue Nov 9, 2019
@robdefeo
Copy link
Member Author

Thank you to @Despire for identifying that this check is already performed by this code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto/nacl enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant