0
$\begingroup$

I have a chat application that uses AES and RSA encryption to establish a peer-to-peer connection between two clients. Although the messages pass through a server, they are encrypted using a single symmetric key, which is generated and shared through asymmetric encryption between the two clients. None of the messages between the clients are stored on the server.

I am trying to implement a report feature where either client can report another client and send the server the plaintext messages that were decrypted on their end. This presents a challenge: I need to verify that a client indeed sent a message that was reported, to avoid a situation where a client could falsely claim a message was sent by another client. Initially, I considered using HMAC with a secret known only to the individual client and the server. However, this approach has flaws because the client sending the message could alter the message after it was encrypted and hashed with the secret key. As a result, the reported message would differ from the one actually sent. This is problematic because the server cannot view the plaintext contents of the messages.

One solution could be to give the secret to the receiving client. However, this could enable the receiving client to forge messages under the sender's identity. Therefore, I need a way to ensure that all messages sent through the server maintain unchanged plaintext compared to what the client originally sent. This must be achieved without exposing the contents of the message on the server side until the receiving client approves, and without exposing any unrelated messages.

Although I am aware of zero-knowledge proofs, I have not found any that address this specific issue of verifying the sent contents of a message without revealing them. Possible solutions might involve storing encrypted messages or HMACs, but I am keen to explore options that do not require server storage. Another idea is to send each message with its own unique AES key, although this could complicate the system and burden the clients' resources.

$\endgroup$
1
  • $\begingroup$ ZKP with blockchain? I mean, I must as a cryptographer at least once recommend block chain, right? $\endgroup$
    – Maarten Bodewes
    Commented Apr 20 at 23:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.