Subject: [TLS] TLS 1.0 CertificateVerify signature length

From: "Andris Berzins" <[email-masked]>
Date: Mon, 04 Mar 2013 17:03:44 +0200

Hi,

Here is CertificateVerify TLS handshake message observed on the wire, given by client using 2048-bit RSA key:
---------
Handshake type: 15 (1 byte)
Length: 258 (3 bytes)
Length2: 256 (2 bytes)
Signature: ... (256 bytes)
---------

Looking on TLS 1.0 RFC I can't see where does this "Length2" fields is described:
 
    struct {
        HandshakeType msg_type;
        uint24 length;
        select (HandshakeType) {
            case certificate_verify:  CertificateVerify;
        } body;
    } Handshake;

    struct {
        Signature signature;
    } CertificateVerify;

    select (SignatureAlgorithm)
       {
           case rsa:
               digitally-signed struct {
                   opaque md5_hash[16];
                   opaque sha_hash[20];
               };
       } Signature;

Is there type in RFC or implementation?

---

From: Juho Vähä-Herttua <[email-masked]>
Date: Mon, 4 Mar 2013 17:36:07 +0200

> Is there type in RFC or implementation?

I think neither, see section 4.7:
In digital signing, one-way hash functions are used as input for a signing algorithm. A digitally-signed element is encoded as an opaque vector <0..2^16-1>, where the length is specified by the signing algorithm and key.

Juho