The panic is in line 67, when you were decrypting the private key. However
you provided a public key (see line 131).
These things are always obvious to a fresh pair of eyes :-)
In short, you need to provide *Roger's public key* and *Roger's private key*
respectively. The public key is used to
https://play.golang.org/p/XhnDZwJYdLp
On Sunday, February 28, 2021 at 10:57:21 PM UTC-5 Hugo3 wrote:
> I used 2 test keys using the key block for Alice as the public key and
> Roger as the private key. but receiving a panic error: panic: runtime
> error: invalid memory address or nil pointer de
I used 2 test keys using the key block for Alice as the public key and
Roger as the private key. but receiving a panic error: panic: runtime
error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x128 pc=0x51fdd7]
On Sunday, February 28, 2
Your program does that already, so I'm not sure what the problem is.
Note that you don't need the private key to encode. Your function
encryptMessage() makes no use of the arguments privateKey,
privateKeyPassword - you can simply remove them.
https://play.golang.org/p/EbuCRR32C7d
Now it's clea