ChoPGP icon indicating copy to clipboard operation
ChoPGP copied to clipboard

Signed a file only

Open Salmanferozkhan opened this issue 5 years ago • 4 comments

Hello Is there possible to signed a file only not encryption because we have did encryption already we need to signed a file only?

Salmanferozkhan avatar Nov 04 '20 16:11 Salmanferozkhan

No, there is no support of sign file only.

Workaround is Decrypt -> EncryptWithSign.

Cinchoo avatar Nov 11 '20 00:11 Cinchoo

Hello @Cinchoo , When decrypting and verifying stream via method DecryptAndVerify, it throws an exception "Failed to verify file" Expected Input parameters are inputStream, outputStream, publicKey(sender), privateKey(receiver), passPhrase Actual Input parameters inputStream, outputStream, publicKey(receiver), privateKey(receiver), passPhrase According to the rule of verifying the signature, it should accept the public key of the sender in order to verify the signature of the sender. Please pass your comments on it.

Salmanferozkhan avatar Nov 11 '20 10:11 Salmanferozkhan

Have you tried Decrypt or DecryptFile? If the file is encrypted, not signed, you have to use these methods.

Cinchoo avatar Nov 11 '20 13:11 Cinchoo

@Cinchoo I have done encrypt and signed with the EncryptAndSigned method.. now from the decrypting and verifying from the DecryptAndVerify I was getting exception "Failed to verify file" so I check your condition so I found that I was passing (sender) public key when I changed sender public key to receiver public key so its worked. so I need to ask why it is taking receiver public key instead of sender public key?

According to the rule of verifying the signature, it should accept the public key of the sender in order to verify the signature of the sender. Please pass your comments on it.

Salmanferozkhan avatar Nov 11 '20 14:11 Salmanferozkhan