This errata should probably be rejected per:
https://datatracker.ietf.org/doc/statement-iesg-iesg-processing-of-rfc-errata-for-the-ietf-stream-20210507/

On Tue, Nov 24, 2026 at 1:14 PM <[email protected]> wrote:

> The following errata report has been submitted for RFC7515,
> "JSON Web Signature (JWS)"
>
> --------------------------------------
> You may review the report below and at:
> https://errata.rfc-editor.org/eid9334/
>
> --------------------------------------
> Type: Technical
> Reported by: Laszlo Deak <[email protected]>
>
> Section Appendix C.  Notes on Implementing base64url Encoding without
> Padding says:
>
> Original Text
> -------------
> This appendix describes how to implement base64url encoding and
>    decoding functions without padding based upon standard base64
>    encoding and decoding functions that do use padding.
>
>    To be concrete, example C# code implementing these functions is shown
>    below.  Similar code could be used in other languages.
>
>      static string base64urlencode(byte [] arg)
>      {
>        string s = Convert.ToBase64String(arg); // Regular base64 encoder
>        s = s.Split('=')[0]; // Remove any trailing '='s
>        s = s.Replace('+', '-'); // 62nd char of encoding
>        s = s.Replace('/', '_'); // 63rd char of encoding
>        return s;
>      }
>
>      static byte [] base64urldecode(string arg)
>      {
>        string s = arg;
>        s = s.Replace('-', '+'); // 62nd char of encoding
>        s = s.Replace('_', '/'); // 63rd char of encoding
>        switch (s.Length % 4) // Pad with trailing '='s
>        {
>          case 0: break; // No pad chars in this case
>          case 2: s += "=="; break; // Two pad chars
>          case 3: s += "="; break; // One pad char
>          default: throw new System.Exception(
>            "Illegal base64url string!");
>        }
>        return Convert.FromBase64String(s); // Standard base64 decoder
>      }
>
>    As per the example code above, the number of '=' padding characters
>    that needs to be added to the end of a base64url-encoded string
>    without padding to turn it into one with padding is a deterministic
>    function of the length of the encoded string.  Specifically, if the
>    length mod 4 is 0, no padding is added; if the length mod 4 is 2, two
>    '=' padding characters are added; if the length mod 4 is 3, one '='
>    padding character is added; if the length mod 4 is 1, the input is
>    malformed.
>
>    An example correspondence between unencoded and encoded values
>    follows.  The octet sequence below encodes into the string below,
>    which when decoded, reproduces the octet sequence.
>
>    3 236 255 224 193
>    A-z_4ME
>
> Corrected Text
> --------------
> This appendix describes how to implement base64url encoding and
>    decoding functions without padding based upon standard base64
>    encoding and decoding functions that do use padding.
>
>    To be concrete, example C# code implementing these functions is shown
>    below. Similar code could be used in other languages.
>
>      static string Base64UrlEncode(byte[] arg) =>
> Base64Url.EncodeToString(arg);
>
>      static byte[] Base64UrlDecode(string arg) =>
> Base64Url.DecodeFromChars(arg);
>
>    An example correspondence between unencoded and encoded values
>    follows.  The octet sequence below encodes into the string below,
>    which when decoded, reproduces the octet sequence.
>
>    3 236 255 224 193
>    A-z_4ME
>
> Notes
> -----
> Although effective for demonstrating the underlying steps, the original
> example is neither idiomatic C# nor production-ready, as it incurs
> excessive memory allocations and multiple iterations over the input. Given
> native Base64Url support in C# and most modern languages, the example has
> been updated to a cleaner, more efficient implementation.
>
> Instructions:
> -------------
> This erratum is currently posted as "Reported". Please
> use "Reply All" to discuss whether it should be verified or
> rejected. When a decision is reached, the verifying party
> will log in to change the status and edit the report, if necessary.
>
> --------------------------------------
> RFC7515 (draft-ietf-jose-json-web-signature)
> --------------------------------------
> Title               : JSON Web Signature (JWS)
> Publication Date    : May 2015
> Author(s)           : M. Jones, J. Bradley, N. Sakimura
> Category            : Proposed Standard
> Source              : jose (sec)
> Stream              : IETF
> Verifying Party     : IESG
> _______________________________________________
> jose mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
>
_______________________________________________
jose mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to