Open stokito opened 1 year ago
There have been similar feature requests like that before. While I am not opposed to adding such features to KSE (and have actually already considered it in the past), I see some significant issues with that:
To summarize these points: Feature bloat is bad and should be avoided.
Now to your specific requirements: For a PKCS#7 signature you don't need a special library, this is already available in Bouncy Castle and should be pretty easy to implement in KSE. However, I will only accept this feature request if it is useful for a wider range of people, so if you can list more use cases, that would be very beneficial.
Related: #96 and #162
Hello, I wanted to chime in because although PKCS7 detached signatures will do better for signing a .doc contract I still think that Keystore Explorer would greatly benefit from being able to sign arbitrary data.
If @stokito is really given a .doc file, it might be better to just generate a .p7s detached signature.
If it was a .docx file, then it could be signed with a DOCX Signer utility. This would generate a context-aware signature that displays correctly in Office programs.
But I still think that Keystore Explorer would benefit from being able to sign arbitrary data (the way OpenSSL does it).
In PHP it's what the openssl_sign() function generates, it's a bare RSA/DSA/etc signature that isn't tied to any file format.
It's also a base64 output and I found it used in other Java-based programs. It could also be used for digitally signing text & letting recipients verify it in KSE.
The Keystore manager then also becomes a good data signer & a data integrity verifier. If you can add a file / text signing dialog that generates PHP-like OpenSSL output, then it would be useful.
More details: OpenSSL signatures aren't like PGP, and while we have many PGP signing tools, there are fewer ones that generate pure OpenSSL signatures.
If an app requires being provided with OpenSSL signatures, then you can't give it a '----- BEGIN PGP SIGNED MESSAGE -----' signature, it wants a barebone base64 output instead.
@gdmeunier Thanks for your input. These are some interesting points.
Having just the raw signature as output/input and therefore being independent of any formats, is certainly not a bad idea, but it has its own issues:
openssl cms
). Interoperability with a wide range of other tools seems worthwhile.Also, everyone who has requested this feature so far wanted a different format, this alone shows how difficult it is to add this feature in a way that is useful for a larger group of users.
But I certainly agree that KSE should rather get a generic data signing feature (PKCS#7 or raw) than something specific like PDF, DOCX or PGP.
@kaikramer Thanks for your reply.
Actually with raw signatures you have to feed OpenSSL with the public key so that it cans verify the signature.
Perhaps PKCS#7 is better due to being able to embed the x509 certificate that was used to create the signature, and there are PKCS#7 signature viewers for Windows.
This would make it more user-friendly for electronic documents. But at the same time, we do also have PKCS#7 signer utilities for Windows too.
I wish to sign a contract doc file with a certificate issued to me by a government. Also I think it would be great to encrypt files for myself with my own self signed certificate. Currently the KSE allows only to sign JAR files. Can we extend it's functionality for a regular files? There is a jsign project that allows to sign executables but again nothing about signing regular files. I created a feature request for this with a proposition to use the KSE as a GUI.