Re: [TLS] TLSv1.2 - Is zero signature allowed in client CertificateVerify message?

M K Saravanan <mksarav@gmail.com> Wed, 04 September 2019 09:49 UTC

Return-Path: <mksarav@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 464D51200E6 for <tls@ietfa.amsl.com>; Wed, 4 Sep 2019 02:49:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.996
X-Spam-Level:
X-Spam-Status: No, score=-1.996 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_IMAGE_RATIO_08=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g6ihlxdec_mf for <tls@ietfa.amsl.com>; Wed, 4 Sep 2019 02:49:06 -0700 (PDT)
Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id ADDAA1200DF for <tls@ietf.org>; Wed, 4 Sep 2019 02:49:05 -0700 (PDT)
Received: by mail-yb1-xb32.google.com with SMTP id u32so7063221ybi.12 for <tls@ietf.org>; Wed, 04 Sep 2019 02:49:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=suTDZPqsbJTzTOT2L5yVh0cF4HAwpn6yb3mqDSwhwec=; b=bRQJelxlIOkWxE6qOGowU4vSUAJQPPfEkEllLRPnk2VbDo5z+C+LYeHFcvWOe9adZB bnCFw/XEji/xLpDc+Hx6G7xv/DLQNCHzJA4sHrJmbhTqaE1+RU8lLLci2rr3AZZd3bqS r/gREa+4MaUbQFtZSby/Kh+KcFOUhjqt8/HdXlLg/SN6JgknQPvF4SLEknNkxgIIhkZL tHBBruI7BWS9FrS0arQbAr5i2aEfO0pIMQe8icpcFzGSHttufxx8ih4qaJyhFr1HJERL OCAtvK2/+dlrvsq/dETIX3kJGfj0b8NeTVnjDAOb6Ame9n6RG5WM3hdsJww3HME+pmO+ nBmA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=suTDZPqsbJTzTOT2L5yVh0cF4HAwpn6yb3mqDSwhwec=; b=eAiooULUvREUB7lr8sxPkRvFYjMhO7H3Px6QlcSSwg5yJVfEqLcrN59y7pb2ZSbNnQ aeM2NBldw+hPJkL+IuByp/7Bw0Nc8JlQgdWHVsSwKW6Ycxu4xshOdPcAeznVjAY22Alc /jBOmUX9azKbZYxr+RkPscSRUjgu4ciDeEqsv6tx2ksBv0Nwc+wa8neAw2FJVDlO3aGd eq5OInKe7rbhI0UX98wRgqZEoHe3GthjZsE8BouBHsl2Pg3VaxR1OAN3ni1YHaVssUwU HHyYFQkpryG4Ygyr+U8evCPPUarZ3O7PZ2hK6RhxlEIGkpHLO9REdX4d7luRszp7bURS ULyQ==
X-Gm-Message-State: APjAAAWYurFGnSHKLTCmwhVHG0sCG9XmzcjRYKL6r18q6+K2aXw/rSk+ vQ+LiSq3MarA+5iBFWYiKvnateHk6cU7uWhmNn+X/x/V
X-Google-Smtp-Source: APXvYqyMgcXXaiQo7no0ofqH3pi2PVqcNT22SDdGfmkBN7o6GzW1PKjt0J6nx3ZvFExnVF0vqoRqkxzvl2ztESotbfg=
X-Received: by 2002:a25:b19a:: with SMTP id h26mr5092165ybj.59.1567590544529; Wed, 04 Sep 2019 02:49:04 -0700 (PDT)
MIME-Version: 1.0
References: <CAG5P2e8eHYimbgJQZYrJYTJHxijbNMGto66uzmcY6KDDJM_xbg@mail.gmail.com> <CAL02cgS0OsUxXz2ht=4uY-ZYqOdmYYCc6VqrHo5LrEusATwEtA@mail.gmail.com> <CAG5P2e_6a_C_b9z8kWgJBGtqV7hoA03Q0mRkP5aMeOs83nqrzw@mail.gmail.com> <CAF8qwaCfwCCbxKoDio5-oEF2YhVXgBYN6yPZrUE7syt=u9BSEg@mail.gmail.com>
In-Reply-To: <CAF8qwaCfwCCbxKoDio5-oEF2YhVXgBYN6yPZrUE7syt=u9BSEg@mail.gmail.com>
From: M K Saravanan <mksarav@gmail.com>
Date: Wed, 4 Sep 2019 17:48:53 +0800
Message-ID: <CAG5P2e9U+pobdPz8w7NKNEFXLG9SqN3eHkrHv8ykz6gisn2xkw@mail.gmail.com>
To: David Benjamin <davidben@chromium.org>
Cc: Richard Barnes <rlb@ipv.sx>, "<tls@ietf.org>" <tls@ietf.org>
Content-Type: multipart/related; boundary="000000000000902c710591b71d67"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/8358CywJFMiDJvFnNeZ18sFXjdg>
Subject: Re: [TLS] TLSv1.2 - Is zero signature allowed in client CertificateVerify message?
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Sep 2019 09:49:09 -0000

Thank David.

I originally encountered the zero bytes in the signature field (the
screenshot I posted in my mail) with a client device during client cert
auth.

Android Version: 6.0.1
Hardware: samsung SM-T580 (Galaxy Tab A6)

It was sending proper client Certificate, but it was sending client
CertificateVerify with zero bytes in the signature.  Hence I was wondering
whether this behaviour is allowed or not as per TLS 1.2 RFC. (for e.g. when
the client encountered an error condition; in such cases ideally I expect
the client to terminate the connection with an alert like you suggested).

Looks like a bug on the client side then.

with regards,
Saravanan

On Tue, 3 Sep 2019 at 23:40, David Benjamin <davidben@chromium.org>; wrote:

> The client should just abort the handshake and probably send an alert like
> internal_error since it cannot usefully proceed.
>
> On Tue, Sep 3, 2019 at 11:27 AM M K Saravanan <mksarav@gmail.com>; wrote:
>
>> Thanks Richard for the reply.  Let me rephrase my question:
>>
>> If a client encounter any error condition (e.g. does not have access to
>> the private key for whatever reason) in generating the signature, can it
>> send zero bytes in the signature field of CertificateVerify message to
>> indicate the error condition?  Is this allowed in TLS 1.2 RFC?
>>
>> with regards,
>> Saravanan
>>
>>
>> On Tue, 3 Sep 2019 at 22:36, Richard Barnes <rlb@ipv.sx>; wrote:
>>
>>> I don't believe that's a valid signature according to rsa_pkcs1_sha256,
>>> so yeah, this is probably an error.
>>> --Richard
>>>
>>> On Sun, Sep 1, 2019 at 11:33 PM M K Saravanan <mksarav@gmail.com>; wrote:
>>>
>>>> Hi,
>>>>
>>>> Is zero signature allowed in client CertificateVerify message (I am
>>>> guessing may be to indicate error condition??). I don't see any thing
>>>> related to zero signature in the TLS 1.2 RFC (or may be I am not looking
>>>> into the right section?)
>>>>
>>>> Today I saw a packet like this and server was terminating the
>>>> connection due to the failure of client cert auth. (because of zero
>>>> signature in client cert verify message).
>>>>
>>>> [image: image.png]
>>>>
>>>> Under what circumstances a client can send a zero signature in the
>>>> client CertificateVerify message?  Is this behaviour TLS 1.2 RFC compliant?
>>>>
>>>> with regards,
>>>> Saravanan
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> TLS mailing list
>>>> TLS@ietf.org
>>>> https://www.ietf.org/mailman/listinfo/tls
>>>>
>>> _______________________________________________
>> TLS mailing list
>> TLS@ietf.org
>> https://www.ietf.org/mailman/listinfo/tls
>>
>