Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What you require is a method of generating "raw signatures". Raw signatures generally consist of modular exponentiation of PKCS#1 v1.5 compatible signature formats, although other padding methods may be used as well. The difference with a normal signing operation is that it <em>does not</em> perform any hashing, and - in the case of PKCS#1 v1.5 compatible signature formats - does not create the ASN.1 structure around the hash value, which is used to identify the hashing method used.</p> <p>This <em>raw signature formats</em> are not a standardized method of generating signatures and <em>should be avoided</em>. <code>private_encrypt</code> mainly is used to support deprecated versions of SSL, that uses the method to create a signature for authentication using a concatenation of the raw output of MD5 and SHA1 hash values.</p> <p>Finally, as Siva suggested, you may use the Bouncy Castle C# libraries to create raw signature formats. The raw signature format is not supported out of the box by most higher level API's, for the reasons given in the second paragraph.</p> <p>[EDIT2] To accomplish this you need to use the raw "RSA" functionality.</p> <pre><code>if (mechanism.Equals("RSA")) { return (new RsaDigestSigner(new NullDigest())); } </code></pre> <p>After that the <code>RsaDigestSigner</code> class will use the <code>EncodeBlock</code> method in <code>DigestInfo</code> to generate the PKCS#1 padding. The <code>NullDigest</code> does not do nothing, it just returns the data given to it as signature of itself.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload