Comments (11)
Hi, it can decrypt signed and encrypted files but currently it will only decrypt the file to its signed state, it will not verify the signature on the file using the public key or output the plain text content of the signed message. #6 was in relation to not being able to decrypt the encrypted message to it's signed state.
Decrypting and verifying files is something that I've meant to add in but haven't got around to yet. Feel free to submit a PR if you like or I'll add it in when I get a chance.
from pgpcore.
Actually, I've just added this in now though I haven't tested the code yet, will hopefully be able to push this live soon.
from pgpcore.
Hi,
I figured I might be able to help on the testing front of things. This could be my specific use-case (The public key I'm using is formatted as dsa1024) but I seem to lose it while it's adding to the public key ring.
Specifically in Utilities in ReadPublicKey(Stream inputStream) when it's going through the List keys = kRing.GetPublicKeys()
.Cast()
.Where(k => k.IsEncryptionKey).ToList();
It loses the 1 key that it had in the kRing object.
from pgpcore.
I've added in a Verify method (as well as some better tests) in #24 but from the sound of it this won't fix your issue. If you're able to send me a dsa1024 public key and your signed file I'll have a look at it and see if I can figure out what's going wrong.
from pgpcore.
Sure thing, I've attached the public key and the file in question below.
from pgpcore.
From looking at your WrightLiamSignedFile.gpg message file it appears that it's compressed, is that correct?
The verify/decrypt methods only work with standard message blocks so this might be where it's going wrong. I tried verifying here as well using the files provided and that also threw an error.
from pgpcore.
I didn't think it was, I've been able to decrypt/verify it using gpg4win with the relevant public and private keys on the key chain. Does gpg4win automatically decompress files as well?
Though the compressed file IS an xls file, would that cause the same kind of problem?
from pgpcore.
Ah, I think you've signed and encrypted it without ASCII armor which is why it doesn't look like standard text. However PGPCore is able to decrypt and verify unarmored files so it may be down to you using GPG rather than PGP for this as they're not entirely compatible.
from pgpcore.
I'm not actually the one encrypting and signing the file so I can't really confirm whether or not that is the case, but basically are you saying there's a sort of a fundamental incompatibility with my file and your tool?
from pgpcore.
Unfortunately I think that's probably the case, though I'm not ruling out it being a bug I'm not sure how best to replicate it. There does seem to be a couple of options for calling GPG4Win directly so maybe these would be better options.
https://forums.asp.net/t/2080593.aspx?Encrypting+with+GPG4Win
https://github.com/Baggykiin/Gpg.NET
from pgpcore.
Does it decrypt pdf files?
from pgpcore.
Related Issues (20)
- Converting from Out of Process Encryption HOT 9
- clearsign signature verification and removal HOT 2
- PGP Error codes HOT 3
- PGP command line to PGPCore? HOT 1
- Question: What is the difference between "EncryptAndSign" and first Sign, then Encrypt using the separate methods HOT 4
- Get content from message generated by SignArmoredStringAsync HOT 8
- MethodNotSupported exception signing stream HOT 3
- Verifying encrypted input does not verify signature
- Strength and Algorithm options? HOT 1
- issue while decrypting binary file HOT 1
- PgpCore open for Hacktoberfest? HOT 1
- Improve key handling HOT 6
- Improve key generation HOT 2
- Create missing interfaces
- Refactor PGP class HOT 2
- Error handling
- VerifyAndRead for non-clear signatures HOT 1
- Recommend AES over TripleDES HOT 1
- Size differences between files encrypted with PGPCore and files encrypted with PGP command line HOT 4
- Nuget publishing? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgpcore.