The signature is as long as the modulus of key is. Thus the
20 bytes contain the (unsigned) hash value only. This field 
is just a octett string.

The most important thing of PKCS#1 is the padding. You can
have a look at crypto/rsa/rsa_pk1.c to verify what this
means in actual code.

Normally the signature contains only the hash and for 
verification you need the original data as well. But 
there are some techniques (not included in OpenSSL) 
that can contain the original data if there are short enough 

Regarding you question how the signature is represented
the answer is (as always ;-) it depends. Normally the
application tells you how this should look like. An
example for this is a X.509 cert where the signature
is embedded into an ASN.1 sequence. Or if you really
have interest and a plenty of time then look at the PKCS#7
stuff (directroy crypto/pk7).

jhkwon schrieb:
> 
>         In the following example,
> 
>         struct {
>                 uint8 field1;
>                 uint8 field2;
>                 digitally-signed opaque hash[20];
>         } UserType;
> 
>         How the hash field is represented?
> 
>         I've read PKC S#1 signature algorithms, so I understand what the signature 
>means.
> 
>         However,
> 
>         1) Does the "digitally-signed" hash data include both the original hash data 
>and the signature computed over it ?
> 
>         Or
> 
>         2) Does it include the signature alone?
> 
>         And in the case of 1), how is it represented?
> 
>         ( just the origianl hash data followd by the signature or
> 
>          Is there any syntax for it ?)
> 
>         Thank U in advance.
> 
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]

-- 
Holger Reif                  Tel.: +49 361 74707-0
SmartRing GmbH               Fax.: +49 361 7470720
Europaplatz 5             [EMAIL PROTECTED]
D-99091 Erfurt                    WWW.SmartRing.de
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to