0
$\begingroup$

The use-case is as follows:

There is a signer, call it $S_A$ that have a claim or document $D_j$. $S_A$ wants any client $C_k, \forall k$ to be able to verify that it has not been tampered with.

I suppose one way to do this is to use assymetric encryption where $S_A$ encrypts $D_j$ as: $E_j = encrypt(D_j, K_{priv})$ using the private key $K_{priv}$.

Then any client who get access to $K_{pub}$ can decrypt $E_j$ as $D_j = decrypt(E_j, K_{pub})$ to be sure that noone have tampered with the claim.

$S_A$ does not want to be forced to encrypt the claim for every client that connects using $C_k$'s public key. It would be sufficient to just send a pre-encrypted claim to any client who desires to watch it, together with the public key $K_{pub}$. Then the clients who desires to verify the claim $D_j$ can do so.

$K_{priv}$ and $K_{pub}$ are only used for signing claims and not to encrypt communication.

My question is: Is this a valid solution for this use case? If not, what is the proper way to handle this?

$\endgroup$
1
  • $\begingroup$ Please do not cross-post the same question on multiple sites! $\endgroup$
    – not2savvy
    Jul 10, 2022 at 8:00

1 Answer 1

2
$\begingroup$

Your encryption and decryption functions are not really standard. Typically the public key is used for encryption (but you're using the private key) and the private key used for decryption. You can simply use a digital signature in this scenario https://en.m.wikipedia.org/wiki/Digital_signature

In a digital signature scheme you have three algorithms $(KeyGen, Sign, Verify)$. $KeyGen$ gives you a verification key $vk$ and a signing key $sk$. $Sign(sk, D_j) \to s_j$ gives you a signature $s_j$. $Verify(vk, s_j, D_j)$ takes the verification key $vk$, signature $s$ and checks whether the signature is correctly signed. Typically $vk$ is public and $sk$ is kept private. In your case, your $Encrypt$ should be replaced with $Sign$ and $Decrypt$ should be replaced with $Verify$.

$\endgroup$
3
  • $\begingroup$ You mean I should instead use $E_j = encrypt(D_j, K_{priv})$? $\endgroup$
    – Decaf Sux
    Jul 9, 2022 at 21:20
  • $\begingroup$ I've updated the answer and hopefully that clarifies the answer $\endgroup$
    – lamba
    Jul 9, 2022 at 21:41
  • $\begingroup$ Thank you for the clarification! (I need more points to upvote your solution) $\endgroup$
    – Decaf Sux
    Jul 9, 2022 at 21:43

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.