February 19th, 2015, 04:06 AM
SignatureValue calculation for XML-DSIG
I am trying to write a method that returns a signature of an XML element for XMLDSIG using NET framework components (*RSACryptoServiceProvider*) in C++/CLI. Could please someone explain this excerpt from XMLDSIG specs ( XML-Signature Syntax and Processing ) in simplier words, for I am have very little programming and maths background and therefore have trouble undrestanding this:
In other words, if I am have the **hash** value for a certain XML element (not encoded in base64, is that right?), what do I do with it before sending it to the **SignHash** (in *RSACryptoServiceProvider*) function? I know it's in the text, but I have troubles understanding it.
I don't understand "CRYPT (PAD (ASN.1 (OID, DIGEST (data))))" at all, although I understand parts of it... I don't understand the way to get the OID and then ASN and how to pad it...