Re: can any file be digitally signed using RSA, certificate, etc., or can only certain types of files be signed?
A: Yes and no. On the one hand, a standard digital signature can be computed for any set of bits, including a simple text file, image files, binary files, anything you can imagine.
But then the questions arise:
How do you associate a digital signature (which itself is a binary bit trigger) with a data file? Does the data file format have the ability to add a digital signature to the data? Or do you need to manage the digital signature yourself, perhaps as a separate file, perhaps using your own data format?
Once you have the digitally signed data and its signature, how does the recipient verify the data and their signature to guarantee to the recipient who signed the data (identity) and that the data has not been changed since it was signed (integrity)?
Digital Signature Support File Formats
The big advantage of file formats that essentially support digital signatures is that recipients can verify the digital signature and file integrity by simply receiving the signed file and then using their own verification software. The recipient does not need to install anything from the sender.
There are many supported file formats that support digital signatures. For example, pdf, Word.doc, .docx. Excel.xls, .xlsx. There is a standard for signing xml files . Its advantage is that xml can be used as an envelope for any type of data. For example, a PDF file can be digitally signed and sent to someone. The recipient can then use the standard / free Adobe Reader to open the PDF file and verify its digital signature.
The "format" for text files (a file filled with characters) does not support digital signatures. Thus, you will need an envelope for the text and its digital signature, or separately for the digital signature. In either case, the recipient will need your data verification software. (Or you will need to write it after you provide the specification for plain text and signature.)
S / MIME offers a standard way to digitally sign text or other organized email / mime data. See rfc 5751 . But it is not widely used outside of email agents that can generate or receive / check signed email messages. Outlook supports this.
source share