🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #87613

Re: New draft for Cancel-Lock

#87613
From: Michael Bäuerle
Date: Fri, 10 Mar 2017 12:11
99 lines
4947 bytes
Julien ÉLIE wrote:
> Michael Bäuerle wrote:
> > Julien ÉLIE wrote:
> > > 
> > > - Section 2:
> > > code-string  = 1*base64-octet
> > > base64-octet = ALPHA / DIGIT / "+" / "/" / "="
> > > 
> > > Shouldn't something like RFC 3977 specifies be used?
> > > 
> > >      base64 = *(4base64-char) [base64-terminal]
> > >      base64-char = UPPER / LOWER / DIGIT / "+" / "/"
> >                      ^^^^^^^^^^^^^
> > Is there a particular reason to not use ALPHA here?
> 
> No particular reason.  I just did a copy/paste without trying to 
> optimize the grammar.  You're right that ALPHA is fine, especially when 
> importing ABNF RFC 5234 core rules.

OK. In your review you found another location where I used LOWER
myself by accident (without proper definition).
I will add a separate definition for it in version 2.

> > >      base64-terminal = 2base64-char "==" / 3base64-char "="
> > 
> > At all it is obviously a definition that matches Base64 much closer than
> > the one I copied from Simons draft.
> > 
> > In general I agree that it would be better to define it as you have
> > suggested above (if we use "base64" to create names for the syntax
> > definition, the defined thing should be Base64).
> > But from the formal point of view there is a possibility to break the
> > backward compatibility:
> > In Simons draft (on which all current implementations are based) it is
> > sufficient that a Cancel-Key code string "looks like Base64", it must
> > not be real Base64. Simon has defined this as an example (I have simply
> > copied it):
> > |
> > | Cancel-Key: sha1:aaaBBBcccDDDeeeFFF
> >                    |   |   |   |   |
> 
> Oh, then don't we have a problem?

Yes, we have.

> In Section 2.2, <c-key> is defined as "base64(K)" whereas it is in fact 
> not the case.  I understand <c-key> is in fact just a string of 
> base64-octets.
> K has no real significance, and I then think the document should not 
> mention it in Section 2.

The syntax definition is fairly complex. I would like to preserve the
"K" for the simple, human readable description suggested by Richard.

> Maybe K could be used in Section 4 as K = HMAC(mid+sec) if you want.

Done.

Or was your intention to move all the explaining stuff (that uses "K")
as informational to Section 4 and leave only the pure formal definitions
in Section 2?

> Correct me if I am wrong, but I believe the only thing to mention is 
> that we just have a Cancel-Key, that is a string of base64-octets, and:
>   <c-lock-string> = base64(hash(<c-key-string>))
> 
> 
> I would then suggest:
> 
>   c-lock          = scheme ":" c-lock-string
>   c-lock-string   = *(4base64-char) [base64-terminal]
>   base64-char     = ALPHA / DIGIT / "+" / "/"
>   base64-terminal = 2base64-char "==" / 3base64-char "="
> 
> 
>   c-key         = scheme ":" c-key-string
>   c-key-string  = 1*base64-octet
>   base64-octet  = ALPHA / DIGIT / "+" / "/" / "="
> 
> 
> It is consistent with both Simon's draft and yours.

Looks like a good compromise to me.

> > [...]
> > I prefer to nevertheless switch over to the more strict syntax, but in
> > this case I think we should preserve the current syntax for the SHA1
> > scheme to ensure backward compatibility. What do you think about this:
> > Move the current syntax to section 6 (and bind it to the deprecated SHA1
> > scheme) and define the new syntax only for the new SHA2 scheme?
> 
> It would complicates the understanding with an <obs-c-key> syntax, 
> especially when there is no reason for <c-key-string> to really be a 
> Base64 string.
> I suggest to have the same ABNF syntax for all schemes.

OK, I will change version 2 to use the ABNF above.

Technical Details
Message-ID: <AABYwpgPE30AAAm9.A1.flnews@WStation5.stz-e.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
References: <AABYvbRwKe8AABT3.A1.flnews@WStation5.stz-e.de> <o9pu2k$759$1@news.trigofacile.com> <AABYwYYoBNgAAAJq.A1.flnews@WStation5.stz-e.de> <o9sf8o$35n$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <AABYwpgPE30AAAm9.A1.flnews@WStation5.stz-e.de>
Subject: Re: New draft for Cancel-Lock
Date: Fri, 10 Mar 2017 13:11:59 +0100
From: Michael Bäuerle <michael.baeuerle@stz-e.de>
References: <AABYvbRwKe8AABT3.A1.flnews@WStation5.stz-e.de> <o9pu2k$759$1@news.trigofacile.com> <AABYwYYoBNgAAAJq.A1.flnews@WStation5.stz-e.de> <o9sf8o$35n$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
Newsgroups: news.software.nntp
Lines: 97
Reply-To: Michael Bäuerle <michael.baeuerle@gmx.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=fixed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net YZpjpB5zv/chSR1hiHSn7QKjBbmxulfUt8vVtVSLHWaZNAiaKX
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:GxxhfKC7wP5fIhJkugux6K5roHA= sha1:4O7x90qCfKoHie+XQk5c+DIxnOI=
Injection-Date: Fri, 10 Mar 2017 12:11:59 -0000
User-Agent: flnews/0.15pre8 (for NetBSD)
X-Received-Body-CRC: 1058455968
X-Received-Bytes: 4838