Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signed a file only #24

Open
Salmanferozkhan opened this issue Nov 4, 2020 · 4 comments
Open

Signed a file only #24

Salmanferozkhan opened this issue Nov 4, 2020 · 4 comments

Comments

@Salmanferozkhan
Copy link

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

@Cinchoo
Copy link
Owner

Cinchoo commented Nov 11, 2020

No, there is no support of sign file only.

Workaround is Decrypt -> EncryptWithSign.

@Salmanferozkhan
Copy link
Author

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.

@Cinchoo
Copy link
Owner

Cinchoo commented Nov 11, 2020

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

@Salmanferozkhan
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants