Skip to content

encrypt with private, decrypt with public and vice versa #1248

Answered by twiss
aviNrich asked this question in Q&A
Discussion options

You must be logged in to vote

Hey 👋
Asymmetric encryption is always done using the public key, and decryption is always done using the private key.
However, you can generate two key pairs, one for A, and one for B, and give A.private to A, B.private to B, A.public to B, and B.public to A.
Then, A can encrypt with B.public, and B can decrypt with B.private.
And, B can encrypt with A.public, and A can decrypt with A.private.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aviNrich
Comment options

Answer selected by twiss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1247 on February 23, 2021 18:38.