five-bells-condition icon indicating copy to clipboard operation
five-bells-condition copied to clipboard

Specify padding for base64URL encoded values

Open gip opened this issue 9 years ago • 1 comments

We may want to specify the padding for base64URL encoding in https://interledger.org/five-bells-condition/spec.html.

From rfc4648 :

In some circumstances, the use of padding ("=") in base-encoded data
   is not required or used.  In the general case, when assumptions about
   the size of transported data cannot be made, padding is required to
   yield correct decoded data.

   Implementations MUST include appropriate pad characters at the end of
   encoded data unless the specification referring to this document
   explicitly states otherwise.

It looks like some implementation (like the one in this directory) drops padding. Implementations in other languages may not (for instance in Java and Haskell), creating inconsistencies. Comparing conditions becomes more complex in case of optional padding.

gip avatar Jul 14 '16 00:07 gip

Good point! Our decision is to use no padding. If padding appears, the condition should be considered invalid.

justmoon avatar Aug 01 '16 12:08 justmoon