I have to decide, whether a document, which I am given, was correctly signed by a private key.
my Ideas is to sign the document id using RSA with the private key and to print the following onto the document:
encrypt(privateKey, id) id
- Which requirenments should be fullfilled by the id, for the
encrypt(privateKey, id)to be safe?
- Is it safe, to publish both: plaintext and the encryption, when I am choosing the paintext?
- Is there a safe cryptography method, which would allow to minimize the
encrypt(privateKey, id)String? In this special case the attacker has a very limited amount of trials (1-2) to verify whether it's fake signature is legal. When the attacker does not provide a text with a valid signature after the second trial - he is identified as a cheater. The public key is not really public here. I think, that a symmetric encryption would be better here, but the limitation to an asymmetric encryption exists due to backward compatibility reasons.
id = ABX3193 privateKey = 12f21te32223523fefff5z.... encrypt(privateKey, id) = ??????