Closed DanielAtCosmicDNA closed 8 months ago
It seems now, after analysing the data that the error is in the fact that the wrong public key is being sent together with the encrypted message. Instead of the server's that should be the sender's public key.
I am closing as the problem was successfully solved with the content being decrypted as expected. Thank you @alex for your prompt support!
Utilising a frontend with TweetNacl and a backend with Pynacl, the message decryption is failing. I have logged the information flow, but it still seems to me there is something amiss after applying this patch.
Frontend
At apiSlice.js line 7, the private key of the message sender is:
And the public key is:
Then a message with the content
{ message: 'Hello to you!' }
is encrypted at App.js line 97, which in turns calls the query at apiSlice.js line 23.Network
A GET query message with the following payload is then sent:
And which is responded by server with:
Server
On the server side, there is Plover with the following plugin.
This plugin writes and reads to a file that has the public and private keys. In this round the server has:
The read and write to this file are governed by config.py
The message is then received by the nacl_middleware where the following log is written to plover.log: