Re: [icnrg] Directions on CCNx TimeTLVs: draft-gundogan-icnrg-ccnx-timetlv

"Mosko, Marc <mmosko@parc.com>" <mmosko@parc.com> Sat, 23 November 2019 01:04 UTC

Return-Path: <mmosko@parc.com>
X-Original-To: icnrg@ietfa.amsl.com
Delivered-To: icnrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2D08512088F for <icnrg@ietfa.amsl.com>; Fri, 22 Nov 2019 17:04:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=parc.onmicrosoft.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 NkpgNpWytgNS for <icnrg@ietfa.amsl.com>; Fri, 22 Nov 2019 17:04:47 -0800 (PST)
Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-eopbgr740054.outbound.protection.outlook.com [40.107.74.54]) (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 29703120091 for <icnrg@irtf.org>; Fri, 22 Nov 2019 17:04:46 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hj5XFyArePsxB0jbRV9HAwPMR7MXJG4dcMeU4rnlk8De6YQCrQeFODWDpPljyKUkRtC5j8oT6jVbdW9kc7CSTpeuoLMXKgkjTxg4+aNuBOi+a8VOSMxbet/GVbK0GI6cqqyDrJkTAuz+hpr9ClzPdjE5AGWoEmqBoPd406nJlYF47SatJiFCseZaKu+7MhV9tn60zz7nCyrNEYpM4jrQ+m7enSUu8D27WdoWH5OxVlKYrRu+l6quKxOFVIsmOx8Rjcy7jk+QKUmW51Hd2eOeFPpsX7J1TFuJAot5kBtdOGIbJPDD8twsfU4xGFDR4q+VTahYrJuncOy4g8xXXsraZA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=B3B7rUdfSmj/V9SDVq7qqyBw109w0CdUlHGaLIEYPig=; b=lj0C3OjUBEn0/ZmqKwTC+UBRtTvKHX/fZ0n1CUm+yd6iR33srpztORx/XPJDVIWofJ8l2jyWkyLpFB+/Q0Fas8YHmlLXljawyRktgXeQ6PWDBKSYAR57WmL4Hn6Q7ri9hTVWV5oh3BfCAcgYfazSDNdnUc3qq4DVGGQMCznllei6Eb7w123QLHMZRAvj6B7tk0YQcf0Gb3VFAmltFbXOrD2zONTKRgJ25e85nvvZ2Niu6mkVFYdZFQ4q+0GIdVWCLYq9fP9m4iMw+bTr5RaYpuQ+WcEx0LX7UvXURBa0r5kJvfHd4DXdR8zGBK0uzDRn86QxEoWlSHmsRm0M9Mw4Sw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=parc.com; dmarc=pass action=none header.from=parc.com; dkim=pass header.d=parc.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=parc.onmicrosoft.com; s=selector2-parc-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=B3B7rUdfSmj/V9SDVq7qqyBw109w0CdUlHGaLIEYPig=; b=ZGZU5wSqzbB+ctQFNL95uc/mKHSwVKu0NyL0ncv1MmYRwxew+m5AS0x9VXqSF9Rb19vWQb9EIPMz+hDti2HiRapoLqPliH6Jzb9YkOGbZ6/X2GU9j59n+hqUS3X67LJNeC5SozmX7jbAz1jOSyGNTISnkYJHNAmm20QQeBObyKs=
Received: from BYAPR15MB3272.namprd15.prod.outlook.com (20.179.59.145) by BYAPR15MB2295.namprd15.prod.outlook.com (52.135.199.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.23; Sat, 23 Nov 2019 01:04:42 +0000
Received: from BYAPR15MB3272.namprd15.prod.outlook.com ([fe80::78f2:5685:5bc3:3e27]) by BYAPR15MB3272.namprd15.prod.outlook.com ([fe80::78f2:5685:5bc3:3e27%6]) with mapi id 15.20.2474.019; Sat, 23 Nov 2019 01:04:42 +0000
From: "Mosko, Marc <mmosko@parc.com>" <mmosko@parc.com>
To: Cenk Gündoğan <mail=2Bietf=40gundogan.net@dmarc.ietf.org>, "icnrg@irtf.org" <icnrg@irtf.org>
Thread-Topic: [icnrg] Directions on CCNx TimeTLVs: draft-gundogan-icnrg-ccnx-timetlv
Thread-Index: AQHVn1ipW2xJXkUxYkyIhm3+LbJMcKeTEd8AgASZRYD//8QGgA==
Date: Sat, 23 Nov 2019 01:04:42 +0000
Message-ID: <2823BFCD-3228-4E8D-8B7F-D27C9FF046CA@parc.com>
References: <73a5a9ff-03c2-3b63-576d-8811c84b90c4@haw-hamburg.de> <9AB2EAD4-4458-4BD3-B263-A8C9BDAAB25B@parc.com> <87r21zy7ba.fsf@gundogan.net>
In-Reply-To: <87r21zy7ba.fsf@gundogan.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.1f.0.191110
authentication-results: spf=none (sender IP is ) smtp.mailfrom=mmosko@parc.com;
x-originating-ip: [50.0.67.90]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 19aa2f84-5968-430b-fc8c-08d76fb11f7f
x-ms-traffictypediagnostic: BYAPR15MB2295:
x-microsoft-antispam-prvs: <BYAPR15MB2295EC093555CCB319DC6868AD480@BYAPR15MB2295.namprd15.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 0230B09AC4
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(39850400004)(376002)(366004)(346002)(396003)(189003)(199004)(6512007)(6306002)(9686003)(53546011)(76116006)(2906002)(3450700001)(5024004)(14444005)(256004)(36542004)(5660300002)(81156014)(229853002)(7736002)(71200400001)(966005)(2501003)(71190400001)(8676002)(305945005)(26005)(66066001)(66446008)(25786009)(8936002)(2616005)(446003)(11346002)(81166006)(478600001)(3846002)(6116002)(66574012)(19273905006)(14454004)(64756008)(66476007)(86362001)(66556008)(110136005)(58126008)(6486002)(76176011)(6246003)(6436002)(102836004)(1250700005)(36756003)(33656002)(66946007)(186003)(99286004)(316002)(563064011); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR15MB2295; H:BYAPR15MB3272.namprd15.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: parc.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: rqA0gpphQpW5zDZYuE60McWtv9dT1DpWH6AU0prxwMKyM7mJ7i9mJzYbxrkou7C3zq9eG68q/l8PbZ9KlrIa+wo22zO3f9pRN18zVaQmMcm91MDLGhV98Bcuqk7Iqa10WNOjj6NpAlASDNLc0w08g/g9EbvdTItiLK9TRVPFJtH4Y5kVbDjgcpQ86foez94ZTaYnASVBMEpfklGjCIKBPCoeL7JxwpwWuWDYYQoVxYZrvjeOQiDEEM9wCcA3minZoADz+as4th0wbL41sXTlqTzMDUIp4BZ4Pmobyr5jINRwmC/BdIkg1j2YN+/ASoasNKavp2/XG0iaeZl+snwtJWSK0wO9IY5YmbrxpdVo1I+HEepuh7yomdUcr1hg/UH1p4OQqfJn0Oo3R5y4ndu4+ZYe7xhozT7oIl4nr8Ophs0+Tk6zVnYa7f2Hv4Ryb5EL
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <130B0A37E10CF340BFB1B7381E5DF357@namprd15.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: parc.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 19aa2f84-5968-430b-fc8c-08d76fb11f7f
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Nov 2019 01:04:42.2451 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 733d6903-c9f1-4a0f-b05b-d75eddb52d0d
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: x5S7x8QK4FfCQ+LrL9w4NFdnMT7lpCrxTeHHuAeXyWw3v7lBMtOW9tZvxdNqYrAm
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR15MB2295
Archived-At: <https://mailarchive.ietf.org/arch/msg/icnrg/ZrQDsb6RfcxP9GZg5-6VBKrtdbQ>
Subject: Re: [icnrg] Directions on CCNx TimeTLVs: draft-gundogan-icnrg-ccnx-timetlv
X-BeenThere: icnrg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Information-Centric Networking research group discussion list <icnrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/icnrg>, <mailto:icnrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/icnrg/>
List-Post: <mailto:icnrg@irtf.org>
List-Help: <mailto:icnrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/icnrg>, <mailto:icnrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Sat, 23 Nov 2019 01:04:50 -0000


On 11/22/19, 12:39 PM, "icnrg on behalf of Cenk Gündoğan" <icnrg-bounces@irtf.org on behalf of mail=2Bietf=40gundogan.net@dmarc.ietf.org> wrote:

    Hello Marc,
    
    thank you for the feedback. I have a couple of comments and questions
    inlined below.
    
    On Wed, Nov 20 2019 at 07:25 +0100, Mosko, Marc wrote:
    
    > Thomas,
    >
    > I think having more compact encodings is great!  Here's a few comments on draft-gundogan-icnrg-ccnx-timetlv-00.
    >
    > 1) The caption of Fig 3 cites RFC 4574.  Is that correct?  It's also not in the references section.
    
    Thanks .. that definitely does not belong there.
    
    >
    > 2) RFC 5497 is not definitive in the representation of 1 or 2 byte floats, as C must be specified.  In your draft, it would be good to have a section that completely spells out how to go from a timestamp to/from mini/half floats.
    >
    > 3) I agree that playing with the signature time might have unintended security consequences.  The signature time might also be unrelated to other time fields in the packet as it might be generated independently of the content itself, so using it as a time base is not a good idea either.
    
    hm, both, the expiry and signature times in Content Objects are part of
    the security envelope. There is a strong relation between the expiry and
    signature times once a signature is generated. I assume that expiry time
    is also always > signature time, because of the following quote from
    [1]:
    
     The ExpiryTime is a field that exists within the signature envelope
     of a Validation Algorithm.  It is the UTC time in milliseconds after
     which the Content Object is considered expired and MUST no longer be
     used to respond to an Interest from a cache.  Stale content MAY be
     flushed from the cache.
    
    If I am not mistaken, then there should never be expired Content Objects
    in the network. Expiry time can therefore be expressed as a (positive
    only) time delta to the signature time .. or is there any valid use case
    where expired Content Objects get a new signature (and therefore have an
    expiry time < signature time)?
    
    [1] https://tools.ietf.org/html/rfc8569#section-4
    
There may be expired content objects in two conditions.  One is in-flight content objects that expire before reaching a consumer.  That's a corner case.  The publisher or cache initiating the transmission thought it was not expired and it expired during transit.  Two is locally stored content object.  They can expire, and there is no mandate to purge them; it is only a mandate to not transmit them on the network.  A consumer could keep them around for as long as it wants.

The issue with using the expiry time as a delta from the signature is that someone could strip the signature off a content object and re-sign it.  This would attach a new signature time.  If one knew that a certain field was a delta from the signature time, it might be possible to re-calculate it.  This could be a single publisher updating the signature on a content object or manifest to extend it or a 3rd party re-publishing a content object.

Another potential issue is that a content object might have co-signatures, or multiple signature blocks.  This is not in the draft, but it is a technique used in SDSI for cascading signatures and parallel signatures.  If such a feature were introduced in CCNx, one would need a way to express which signature is the time base.  This is not an issue as-is, just something to consider for the future.

Not all ValidationInfos have a signature time.  Some, like a CRC or SHA256 or HMAC, do not have the field.  Some content object, such as those referenced by hash in a manifest that use the root manifest's signature as the trust root, do not have a validation section at all.  So if those want to use an Expiry time, for example, they need to use an absolute time.  So, would it be possible to have a 1 or 2 byte float and be able to tell if it was relative or absolute?  Maybe the 2-byte could have a bit for that.

    >
    > 4) If the RCT becomes relative, then a cache should decrement it.  I'm not a big fan for using relative times here, but it could be done.  I had written up an idea on allowing relative times as an alternative to absolute times in https://tools.ietf.org/html/draft-mosko-icnrg-cachecontrol-00.
    >
    > 5) I think fractions of a second are not important for fields like interest lifetime or RCT, so the exponent does not need to support negatives.  Removing a sign bit and keeping the exponent positive with a normalized form mantissa would have a fairly large range, at least for the 8-bit (a 0.4.4.-0 minifloat).  The 16-bit should keep all the bells and whistles as it has space, and you'd likely use IEEE half precision floats anyway?
    >
    
    I put together this little visualization [2] to show the ranges of
    different time encodings. I assume an 8-bit float without sign bit and
    exponent bias. The legend shows configurations in the typical form:
    (sign bits, exponent bits, mantissa bits, bias).

Great!  I was thinking of doing that myself.  Are you still assuming that 0x00 is defined as 0 (instead of 1)?  I guess I'm asking would one use denormalized numbers with a 0 exponent?
    
    Let's assume that a time value represents seconds. Then we are obviously
    not able to represent sub-second floats. Though, milliseconds might be
    interesting for some use cases (e.g., to quickly delete a PIT trail for
    unsatisfied, but time-sensitive data).
    
    The configurations (0,3,5,0) and (0,6,2,0) have IMO either a very low
    range, or a rather unnecessarily huge range.
    
    (0,4,4,0) can at max represent ~17 hours (63488 seconds).
    (0,5,3,0) has a max time value of ~127 years (4026532000 seconds).
    
    If we assume milliseconds as base unit, then above values change to:
    
    (0,4,4,0): max ~1 minute
    (0,5,3,0): max ~46 days
    
    ~46 days as a max value for lingering PITs are IMO reasonable .. and we
    gain 80 sub-second values (out of 255 possible time codes).

    In previous slides there was also the constant C set to (1/1024). The
    beauty of having (1/1024) instaed of (1/1000, milliseconds) as base is
    that it yields integer values in the seconds range for power-of-2 values
    (1s,2s,4s,...). An application would more likely want to encode "4s",
    instead of "4.096s".

Yes, the ~46 day range /1000 or /1024 sounds like a good option for things like expiry time or cache time, especially for the IoT environment.

If you denormalize (0,6,3,0), the 0 exponent values are 0.00, 0.25, 0.50, 0.75, 1.00, 1.25, 1.50, 1.75 without playing with a C factor.  If you denormalize (0,4,4,0), it goes in 1/8th increments from [0 .. 4], then in 1/4th [4,8], then 1/2th [8,16], etc.
    
    I like the idea of using an IEEE half precision float for the 16-bit
    variant.
    
    The next question (to the group) is how we want to encode them:
    T_INTLIFE is actually unbounded (as per RFC). It can use a time value of
    arbitrary octets, although the usefulness for 1- and 2-octet time values
    in milliseconds is questionable [3]. So, this TimeTLV draft would not
    just add new functionality, but would *replace* the current behavior, if
    we use it in T_INTLIFE with Length==1 OR LENGTH==2. Is that something we
    want?
    
    Cheers,
    Cenk
    
    [2] https://cgundogan.github.io/minifloat/
    [3] https://github.com/icnrg/draft-gundogan-icnrg-ccnx-timetlv/issues/3
    
    > Marc
    >
    >
    > On 11/19/19, 8:12 PM, "icnrg on behalf of Thomas C. Schmidt" <icnrg-bounces@irtf.org on behalf of t.schmidt@haw-hamburg.de> wrote:
    >
    >     Folks,
    >
    >     following up on our presentation of draft-gundogan-icnrg-ccnx-timetlv:
    >
    >     This proposes to replace time deltas in CCNx by logarithmic encodings
    >     and (maybe) some absolute timer values by deltas w.r.t. the signature time.
    >
    >     We solicit feedback: Do you agree on going this way, or do you suspect
    >     this to be harmful?
    >
    >     Best,
    >       Thomas
    >     --
    >
    >     Prof. Dr. Thomas C. Schmidt
    >     ° Hamburg University of Applied Sciences                  Berliner Tor 7 °
    >     ° Dept. Informatik, Internet Technologies Group   20099 Hamburg, Germany °
    >     ° http://inet.haw-hamburg.de/members/schmidt      Fon: +49-40-42875-8452 °
    >
    >     _______________________________________________
    >     icnrg mailing list
    >     icnrg@irtf.org
    >     https://www.irtf.org/mailman/listinfo/icnrg
    >
    >
    > _______________________________________________
    > icnrg mailing list
    > icnrg@irtf.org
    > https://www.irtf.org/mailman/listinfo/icnrg