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

No function to create a saltpack.BoxPublicKey without possession of the secret key #101

Open
antonis19 opened this issue Jan 18, 2024 · 0 comments

Comments

@antonis19
Copy link

I am trying to use the EncryptArmor62Seal function to encrypt a message for another party. I am following the example here:

https://pkg.go.dev/github.com/keybase/[email protected]#EncryptArmor62Seal

The issue with the example is that the public key for the receiver is obtained based on the secret key of the receiver. So the conversion process is:

saltpack.BoxSecretKey -> saltpack.BoxPublicKey

However in a real world application you don't have (and shouldn't have) the private key of the recipient. You only have the raw bytes of the public key. But going through the documentation I found that every constructor function or import function presupposes the possession of the private key, which we don't have.

So how can I encrypt a message when all I have is my own private key and the 32 byte array raw public key of the recipient?

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

No branches or pull requests

1 participant