Re: [yang-doctors] Definition for base64

Mahesh Jethanandani <mjethanandani@gmail.com> Fri, 17 August 2018 22:57 UTC

Return-Path: <mjethanandani@gmail.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A9EFE130FF4 for <yang-doctors@ietfa.amsl.com>; Fri, 17 Aug 2018 15:57:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 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, RCVD_IN_DNSWL_NONE=-0.0001, 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 TgzZQpzPXBIj for <yang-doctors@ietfa.amsl.com>; Fri, 17 Aug 2018 15:57:40 -0700 (PDT)
Received: from mail-pl0-x234.google.com (mail-pl0-x234.google.com [IPv6:2607:f8b0:400e:c01::234]) (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 A1A2A130FED for <yang-doctors@ietf.org>; Fri, 17 Aug 2018 15:57:40 -0700 (PDT)
Received: by mail-pl0-x234.google.com with SMTP id j8-v6so4321175pll.12 for <yang-doctors@ietf.org>; Fri, 17 Aug 2018 15:57:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=pOP/nublC+gfvRrRX9WdiJXG7emw636N0h70DjhlyIQ=; b=NLHL/jrAHkxMztUdpT7brKBQWF/L+eVgc+kIaQAqR2llhYePUsI1YxgwMGk0BLMgdH Y2KxQYzL4LX178xFSYUgUTXYKtsqrjS1/jI+xtv56SXirorMJcZeQzgewF+d3BSE7Hdu kdslYE+v/6A3Q0uJOvQRmNoydVLaeyhuvfv5/fByMdOBwI5iNKEikEE0zkJaune/y30P RftLuHLPs95j22gBqNXh2/Iqa3vp1jq4df1pq+UoJ+AEQaXpmDfOtLcQh6k/2p803L9t s+tFu3mQ/cf7eRXcCWQ54X6ngN4ewN7D0pV12SMD+n6GZUT2GeuB4uKcEgXYrBLbKlmF ONWw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=pOP/nublC+gfvRrRX9WdiJXG7emw636N0h70DjhlyIQ=; b=UNVcPWn7Z9l0jfRbam0OO1Uw4LsUmmNAAehQ8aVtAl5MHaHhDlRFpI4hC+n8zayPAO ZCeYAmvmohkqVzfV7qEnn/v19AZb2SRwB5tOhl2s8Sg47miPV6BSCXFl3Dw0ywJRAiaH Ppm43BbY9NM8cQSDmItpWZPN5tIiKxo5ZBfP3Lo3jXrRUcM0GRQnJac1y2jc+3ECNMvo ei8z9dyWeTsEbD5HPQEhJHoufSTsl9n5ZibuA03RMkA9M3BekRd0O7wKX0R0hN5zaIsU fVq7b+lGnZGAy/RmhWkTazp+yz8JXCGjK29zrcwVDJ0lHS0FD48bBnLCNV+A7UhXxKTJ q+gA==
X-Gm-Message-State: AOUpUlHEX284tMwUbwDgaY0WzJwpufTbfaqsEtyQ+/q+O+kKoA68eZiq t/vnQvAQS655xnBtdGLrLQL7b2+T
X-Google-Smtp-Source: AA+uWPwVW8cy4JryY5f669AtKbQhFplsDZPoSwAryYBmV43S6uUiCLDMC8lmLT3nd1YBUJXbm5YJQw==
X-Received: by 2002:a17:902:2702:: with SMTP id c2-v6mr35802346plb.248.1534546660147; Fri, 17 Aug 2018 15:57:40 -0700 (PDT)
Received: from ?IPv6:2601:647:4700:1280:15a2:f843:dd20:11db? ([2601:647:4700:1280:15a2:f843:dd20:11db]) by smtp.gmail.com with ESMTPSA id 5-v6sm4240925pgc.86.2018.08.17.15.57.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Aug 2018 15:57:39 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Mahesh Jethanandani <mjethanandani@gmail.com>
In-Reply-To: <20180817190351.s2eqmn3at6qb2j3j@anna.jacobs.jacobs-university.de>
Date: Fri, 17 Aug 2018 15:58:13 -0700
Cc: Andy Bierman <andy@yumaworks.com>, YANG Doctors <yang-doctors@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <6C501123-2ADE-402C-94FB-9A9BEA3340E9@gmail.com>
References: <09CD4A1F-2A3C-4E42-A0D3-C5A475947724@gmail.com> <CABCOCHT6vj+Y1L7CprHvcYNmLtF9P5UDRw8H_uuD7ZKgqwRJog@mail.gmail.com> <2AD31000-4E60-47E7-9329-3DD4D17DA49D@gmail.com> <20180817190351.s2eqmn3at6qb2j3j@anna.jacobs.jacobs-university.de>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/eQWcKW6eoThNKIDCNYy54T_MzLQ>
Subject: Re: [yang-doctors] Definition for base64
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 17 Aug 2018 22:57:43 -0000

Hi Juergen,

I was going off of the information model. 

Let me check with the WG whether the router-id is a string of 8 octets or binary data of length 8.

Thanks.

> On Aug 17, 2018, at 12:03 PM, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
> 
> On Fri, Aug 17, 2018 at 10:46:55AM -0700, Mahesh Jethanandani wrote:
>> I have a protocol (Babel) that defines router-id as a base64 string of 8 octets. I could define it as a string, but isn’t it the case that base64 includes only a set of printable characters defined by the regex below? Not all printable characters are included in the set.
> 
> RFC 6126 section 4.1.2 says:
> 
> 4.1.2.  Router-Id
> 
>   A router-id is an arbitrary 8-octet value.  Router-ids SHOULD be
>   assigned in modified EUI-64 format [ADDRARCH].
> 
> Where does it say that it is a string on 8 octets base64? Note, if you
> use binary with length of 8, you actually get a base64 encoding on the
> wire. But then there might be another doument that says the router-id
> is to rendered as base64 but then the base64 string obviously is
> longer than 8 octets. If you work off the information model, then I
> might understand that you are confused because
> draft-ietf-babel-information-model-03 says:
> 
>   base64      An opaque array of bytes.
> 
> What is that? Does this mean a base64 encoded opaque array of bytes?
> Or something else? I would check how babel people and implementors
> prefer to represent router-ids in textual format. Do they really
> want trailing characters?
> 
>  import base64
>  print(base64.b64encode(bytes(8)))
> 
> Gives me:
> 
>  b'AAAAAAAAAAA='
> 
> /js
> 
> -- 
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>

Mahesh Jethanandani
mjethanandani@gmail.com