Re: [netconf] base64encodedvalue== is an invalid base64 value

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Fri, 29 January 2021 19:11 UTC

Return-Path: <J.Schoenwaelder@jacobs-university.de>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 930DF3A123D for <netconf@ietfa.amsl.com>; Fri, 29 Jan 2021 11:11:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=jacobsuniversity.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 6xrrqp6BCNzM for <netconf@ietfa.amsl.com>; Fri, 29 Jan 2021 11:11:46 -0800 (PST)
Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150079.outbound.protection.outlook.com [40.107.15.79]) (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 3288A3A112A for <netconf@ietf.org>; Fri, 29 Jan 2021 11:11:45 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=csBKNCfN1tZ7Z6/5JuKsmuLSpue/u99+YBbM8u/VMa6gyrIQ6Rdj7mQHlF37saXHQSkNB4XrVqkfJV5zRX9qRylmxzS7bYgi1a9oX0Eov6BlAIXVAR91eEyxqGEPvzMKoWmiKLyXG0uPR9hHKkSE5ewjOw7lzECQtX5AaAl1J74W3cCBSn/cSJtvL5UJTboLhsc5kNNsem9MEszat8waPnxjHuJSX6I93cONycHijItLBtChVhlAIgRO7LNa3J5OHdKYmVnSUu46TLNYHl87EoEtBaVlA67VPyEM8RjXpc/Y43Zz8tx0DL90qnbrPx3zYNuP99dnstsyqu8WiTIZ7g==
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=oQPxa4luraVkp6U/06PO1AZRuGnVd/v8no+pK/719pY=; b=GZrAucDqa7BXcePmbVECEKa/si+HXBlywEyujJ0E3z5sVY+UQ0yh+vZP5rxUU0Bv93qGZlyyO7D1Qk+ROYDroClCsB6Rrv9u2FcsxnKx8Ge7RR7Fe1ZB+NyZePoaGHJaR+11I+QrbMg6YJIeVmrAH2nwxem3EkkbCQjwP9fPm4KxQwTtPghaFVxT44Ti5vkHQ9irFfFuglzzo3l6s58s/E4Iwir7YQpiBqSzzHrtpu/DmWXHWRLVwIJjZPYVLMQeIuJ9y3qJtx9cNx8KMjdKfTgrgdPZi70pMeNHtlUoy2iQRUEriHnGd2A/ZM6JYxV3jJE9Zn4JL+3SyS/G6e4XCA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=jacobs-university.de; dmarc=pass action=none header.from=jacobs-university.de; dkim=pass header.d=jacobs-university.de; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jacobsuniversity.onmicrosoft.com; s=selector2-jacobsuniversity-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oQPxa4luraVkp6U/06PO1AZRuGnVd/v8no+pK/719pY=; b=bzd+cZqMFPDOphThsHLnWFYRGzNBAUvlfmHhCBWIFOX8hVipqWMLhCZdhJbPF/i/bm6SDiXx3oAwymoun9knB43my8hWwUhhmQgyUCOnIVElc0riSPPA+xDC0Ue9DSn6meybWgrc/stCYiSROki4VEbNdTf4WAJ5GFWctWqCDjw=
Authentication-Results: watsen.net; dkim=none (message not signed) header.d=none;watsen.net; dmarc=none action=none header.from=jacobs-university.de;
Received: from AM0P190MB0641.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:194::23) by AM8P190MB0820.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:1c5::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.13; Fri, 29 Jan 2021 19:11:43 +0000
Received: from AM0P190MB0641.EURP190.PROD.OUTLOOK.COM ([fe80::1ce1:49e3:3e54:804d]) by AM0P190MB0641.EURP190.PROD.OUTLOOK.COM ([fe80::1ce1:49e3:3e54:804d%4]) with mapi id 15.20.3805.019; Fri, 29 Jan 2021 19:11:43 +0000
Date: Fri, 29 Jan 2021 20:11:42 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Kent Watsen <kent+ietf@watsen.net>
Cc: "netconf@ietf.org" <netconf@ietf.org>
Message-ID: <20210129191142.lxhtegbkgan37oyj@anna.jacobs.jacobs-university.de>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Kent Watsen <kent+ietf@watsen.net>, "netconf@ietf.org" <netconf@ietf.org>
References: <010001774f5f7df0-89830501-6d1a-465b-a172-dd95e98e8a3e-000000@email.amazonses.com>
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <010001774f5f7df0-89830501-6d1a-465b-a172-dd95e98e8a3e-000000@email.amazonses.com>
X-Originating-IP: [212.201.44.247]
X-ClientProxiedBy: AM0P190CA0003.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::13) To AM0P190MB0641.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:194::23)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from localhost (212.201.44.247) by AM0P190CA0003.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16 via Frontend Transport; Fri, 29 Jan 2021 19:11:42 +0000
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: b7f3b810-8b6f-4514-d894-08d8c489b6b9
X-MS-TrafficTypeDiagnostic: AM8P190MB0820:
X-MS-Exchange-Transport-Forked: True
X-Microsoft-Antispam-PRVS: <AM8P190MB08209337343F4FBAC5068F12DEB99@AM8P190MB0820.EURP190.PROD.OUTLOOK.COM>
X-MS-Oob-TLC-OOBClassifiers: OLM:9508;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: ib7jSKSdKxfSRoaGcOWSPhB4ohod7mhHYiFvbeyPcs0s37kMxdcNfCjIk/lWY4ElNGthcOeWfHdISb/ReAW59/jwXl8WE+JmOMxSQacDzhTRCz7FzSDn/MvLr9/H+k4Li1YXSu+pAD66IdgNeLuUvEf9Bhp8Uab2ChQ9Z4ftE41nHWcT9lbpbY9kPoZiCvWHyJJkC0R3HZ1CqZ96Qmab6lta6bpSIa94DTq+PWv4DchWZWNsZKED05crDUbsih5/Ljr1ap7XjfOtCSGiHRtLgGBTKdKClyICD7arOxQeSQnDVdXtEUdLHNWteHnS4viE/52/6yb1rvhNJapfTYmS8O6e7CnRy4mI6h2A16fmxZkYx+5Cj4/Ht3O7gfpYGKDUO7W0MzzKzjpOj243u6eglK3LP8P6HA1qmegqWENWwL0CF3VLSJLvKjwui/96VJ5TyGtdZ79Cw6+rSbGNICBDFkw7afpJnBkpbgZMACL14xinj5PkR1A+AuAJlf3i/hCMcaPZB+SoFwIBd4575yQAfE13G/xEKWj/aZLKmgZYeTdlDSKGN613S1lOZyjWx4lGLqvNseLNXcZPJVLFel0lbIxqyzx1L4JCUdaStPDe1+LxuzOrDTdyA1lANhRd0ZZjxrH3xt4dPDPrqX+yGost4A==
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0P190MB0641.EURP190.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(376002)(39850400004)(396003)(346002)(136003)(366004)(83080400002)(966005)(3450700001)(2906002)(5660300002)(8936002)(186003)(66946007)(956004)(6496006)(8676002)(52116002)(16526019)(4326008)(66476007)(66556008)(86362001)(478600001)(786003)(26005)(1076003)(316002)(83380400001)(6486002); DIR:OUT; SFP:1101;
X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?RjArUWtCWUZBMHl2bWpJRms1TW43NGFTTWgwYWl2VTkrKzhJaldmajl6eWRW?= =?utf-8?B?SDdMQTZTNC9Td0lTUHdsRzNSSDZheGdOdlRqdDFPeEtZUWozbU5hbjZSZi9W?= =?utf-8?B?Q2JjRCsxeThCbjdrNDZxMmUyRlJDa0pyTmFRQnM4SUp3NDBHOThucVdpVUgy?= =?utf-8?B?WXNKSlRTdUxjVE1YZW9SS0txbjc0YWh5Y2ZvSWRtbk1RNUxVWUs0MjJNVzFy?= =?utf-8?B?aE5NK3hzaUExUjRGTVVnV0xnSHQzV0Z6Z3NubkVCbW9hTjMxa21QOHZEd0p2?= =?utf-8?B?b1BEYVYxWStTZmdENlh4bkFkVU1wdUZtWEwzS2hVbXJESFI5bGdYQk9lQmpr?= =?utf-8?B?YkN3TWZiTXJJalpyN1lzakk1bE9kVFBSL0hsRVk4ZWM1WTVSVTMxVEU3Rnh4?= =?utf-8?B?TnBEeVZXMjNxMmdMNGZCcVpKcER4Y24yeE1MQWZWaitXcmJoeE1ic1FTd1Jw?= =?utf-8?B?NUlCK0h4amJLWWxrNXhPQ1c5QTBGUCtXQXBpaFVRU1d3UlhGWGVnM3N3N2d5?= =?utf-8?B?ZW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W9m?= =?utf-8?Q?VBliGFgv?=
X-OriginatorOrg: jacobs-university.de
X-MS-Exchange-CrossTenant-Network-Message-Id: b7f3b810-8b6f-4514-d894-08d8c489b6b9
X-MS-Exchange-CrossTenant-AuthSource: AM0P190MB0641.EURP190.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2021 19:11:42.9764 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: f78e973e-5c0b-4ab8-bbd7-9887c95a8ebd
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: C/UuhuEMTD4OIj6hX7M3UPKT5FTP06Q7jiX2orS+LUr2YaoAd5pfo5eqOe24V6BlTRVPLAkR8V404oFp3r4nFM+DYPEu3O/6hDXkghgWCtU=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8P190MB0820
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/jtcza_uO5jnUxUtHnTkP83biilM>
Subject: Re: [netconf] base64encodedvalue== is an invalid base64 value
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Jan 2021 19:11:49 -0000

Who cares whether this value roundtrips in an examples??

/js

On Fri, Jan 29, 2021 at 06:19:54PM +0000, Kent Watsen wrote:
> 
> I’m unsure if this issue warrants a fix, but be aware that using "base64encodedvalue==“ in code doesn't roundtrip correctly:
> 
> $ echo "base64encodedvalue==" | base64 -d | base64
> base64encodedvaluQ==
> 
> Specifically, there is no binary input that results in “ue==“.
> 
> $ echo "ue==" | base64 -d | base64
> uQ==
> 
> The reason is a more detailed than this message warrants, but effectively, the second sextet is quantized and, worse, none of three different implementations I tested against raise a warning, much less an error...which is reasonable, IMO.
> 
> Options:
> 
> 1) stick with "base64encodedvalue==“ for the examples.
> 2) use a different value that is a valid base64 string.
> 
> Thoughts?
> 
> 
> With regards to option #1:
>   - still seems okay, as the value never occurs in practice
> 
> 
> With regards to option #2:
> 
>   - if it is desired to end with “==“:
>       - the last character must be one of [A, Q, g, w]
>       - options: b64tag==, BASE64DATA==
> 
>   - if it is desired to end with “=“:
>       - the last character must be one of [A, E, I, M, Q, U, Y, c, g, k, o, s, w, 0, 4, 8]
>       - options: BASE64VALUE=
> 
>   - if it is desisired to end with no padding:
>       - any alphanumeric string with length%4==0 works
>       - options: base64encodedval, anybase64val, b64value, base64string
> 
> 
> K.
> 
> 
> 
> 
> 

> _______________________________________________
> netconf mailing list
> netconf@ietf.org
> https://www.ietf.org/mailman/listinfo/netconf


-- 
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/>