ctt-gob-es / FirmaXadesNet45

Librería desarrollada en C# para la generación de firmas XAdES
32 stars 58 forks source link

Signing a Document Hash #5

Closed dmitriy-shleht closed 6 years ago

dmitriy-shleht commented 6 years ago

Is it possible to sign a document hash? so that the signature was separate from the data. Does this violate the XADES standard?

dnturbanismo commented 6 years ago

If you set the SignaturePackaging property to HASH_INTERNALLY_DETACHED you will get a XAdES internally detached signature, but the signed content will be the SHA-256 hash of your document. This signature type is XAdES compliant but keep in mind that a signature validator will not check the original document hash because doesn't know that content you are signing it's a document hash, for this reason the validation always will be successfully.

Other way it's to sign a manifest thats contains the references to your content, but this feature is not supported by the library.

dmitriy-shleht commented 6 years ago

I think this will suit me. Thank You!