Re: [pkix] Time in CMC requests

Stefan Santesson <stefan@aaa-sec.com> Tue, 26 October 2021 19:36 UTC

Return-Path: <stefan@aaa-sec.com>
X-Original-To: pkix@ietfa.amsl.com
Delivered-To: pkix@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 03E653A1734 for <pkix@ietfa.amsl.com>; Tue, 26 Oct 2021 12:36:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.229
X-Spam-Level:
X-Spam-Status: No, score=-5.229 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-3.33, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
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 YkmV_Z9ATCVC for <pkix@ietfa.amsl.com>; Tue, 26 Oct 2021 12:36:50 -0700 (PDT)
Received: from smtp.outgoing.loopia.se (smtp.outgoing.loopia.se [93.188.3.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 00A533A1786 for <pkix@ietf.org>; Tue, 26 Oct 2021 12:36:46 -0700 (PDT)
Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 47EBC2EB0DD0 for <pkix@ietf.org>; Tue, 26 Oct 2021 21:36:39 +0200 (CEST)
Received: from s630.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id 391442E2F32D; Tue, 26 Oct 2021 21:36:39 +0200 (CEST)
Received: from s475.loopia.se (unknown [172.22.191.5]) by s630.loopia.se (Postfix) with ESMTP id 298B813ABF63; Tue, 26 Oct 2021 21:36:39 +0200 (CEST)
X-Virus-Scanned: amavisd-new at amavis.loopia.se
Received: from s499.loopia.se ([172.22.191.6]) by s475.loopia.se (s475.loopia.se [172.22.190.15]) (amavisd-new, port 10024) with LMTP id ziBBqnZagaE2; Tue, 26 Oct 2021 21:36:38 +0200 (CEST)
X-Loopia-Auth: user
X-Loopia-User: mailstore2@aaa-sec.com
X-Loopia-Originating-IP: 90.229.17.25
Received: from [10.0.1.118] (unknown [90.229.17.25]) (Authenticated sender: mailstore2@aaa-sec.com) by s499.loopia.se (Postfix) with ESMTPSA id 7BE5F1CE04D0; Tue, 26 Oct 2021 21:36:38 +0200 (CEST)
Message-ID: <94eef0bd-13af-1f35-ecaa-3becdffa79ad@aaa-sec.com>
Date: Tue, 26 Oct 2021 21:36:38 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:94.0) Gecko/20100101 Thunderbird/94.0
Content-Language: en-US
To: Anders Rundgren <anders.rundgren.net@gmail.com>, IETF PKIX <pkix@ietf.org>
References: <401334e3-fbd1-497a-2313-0a39bd04f608@aaa-sec.com> <ef7c90b7-64d2-9cf7-7181-0491e555a56c@gmail.com>
From: Stefan Santesson <stefan@aaa-sec.com>
Organization: 3xA Security AB
In-Reply-To: <ef7c90b7-64d2-9cf7-7181-0491e555a56c@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/pkix/PUkGipX0FVk317tiCKuGjDXtd9g>
Subject: Re: [pkix] Time in CMC requests
X-BeenThere: pkix@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: PKIX Working Group <pkix.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/pkix>, <mailto:pkix-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/pkix/>
List-Post: <mailto:pkix@ietf.org>
List-Help: <mailto:pkix-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/pkix>, <mailto:pkix-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Oct 2021 19:36:55 -0000

Thanks Anders,

I think that max age (and max future) is redundant as it can simply be a
local policy for the CA who decides for itself how long it will store
nonces for old requests.

I would certainly not allow the requester to set this policy in the
request as they could suggest infinite time.

I want to stay away from structure in data where none was intended as it
makes it hard to distinguish support or non support in a clean way.

I'm leaning towards a custom control attribute for request time and an
open interface for replay protection that may use this information if
its available.

/Stefan


On 2021-10-26 19:15, Anders Rundgren wrote:
> Hi Stefan,
>
> Yes, time-stamped nonces is the way to go.
>
> The only addition needed is a MAX_AGE (and MAX_FUTURE) check to keep
> the bag in shape.
> I recently did this for a similar use case:
> https://github.com/fido-web-pay/specification/blob/gh-pages/replay-cache-java.md
>
>
> Anders
>
> On 2021-10-26 18:29, Stefan Santesson wrote:
>> We have an implementation of CMC (RFC 5272) that I need to use, but I
>> got stuck on replay protection.
>>
>> CMC says that replay protection is handled by the use of nonce values.
>>
>> However, without any time information when the request was created, I
>> would have to validate against an infinitely large bag of previous
>> nonces.
>>
>> Was this an oversight in the design, or am I missing something?
>>
>> Is there any control message defined elsewhere that holds a time when
>> the CMC request was created?
>>
>>
>> My current options (as I need replay protection in this particular case)
>> is either to abuse the nonce data and use a byte encoded timestamp as
>> nonce, or to create a new control attribute with time information.
>>
>> Any suggestions?
>>
>>
>>
>