🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.free.newsservers
Article #186307

Re: Cancel-Lock without Login

#186307
From: Michael Bäuerle
Date: Fri, 22 Nov 2024 13:00
111 lines
6741 bytes
VanguardLH wrote:
> Michael Bäuerle <michael.baeuerle@stz-e.de> wrote:
> > VanguardLH wrote:
> > > 
> > > [...]
> > > That is, a user that must login is verified they are the
> > > user that submitted a Cancel on their own article, but a user that does
> > > not login cannot be verified to be the user whose article is requested
> > > to cancel.
> > 
> > This is only relevant if a server wants to act as representative for a
> > client.
> > 
> > > Seems cancels would need to get ignored from clients that do
> > > not login to prevent malicious destruction by someone pretending to be
> > > the original poster.
> > 
> > To avoid abuse, the identity of the client should be verified before a
> > server creates Cancel-Locks and Cancel-Keys as representative for the
> > client.
> > 
> > The verification, that Cancel-Keys matches Cancel-Locks, for executing
> > Cancel and Supersede operations does not need such information.
> 
> So, the client can add the Cancel-Lock header on generating a new
> message (which the server will not override with its own Cancel-Lock
> header).

Yes. The Cancel-Lock header field can contain multiple Locks (defined
as <c-lock> elements by RFC 8315 in Section 2.1):
<https://datatracker.ietf.org/doc/html/rfc8315#section-2>

The server can extend it, if the header field is already present:
<https://datatracker.ietf.org/doc/html/rfc8315#section-3.2>

> And later, the same client can create a cancel message where
> it adds the Cancel-Key header.  Okay, so there must be something within
> THAT client to record something unique for a message it generated to
> ensure only it can generate the Cancel-Key header;

RFC 8315 uses the name <sec> for this local secret.

> else, another
> instance of the same client could use the same algorithm to generate a
> Cancel-Key based on the Cancel-Lock that is already present in the
> previously submitted and available article.  Does seem appropriate for
> the Cancel-Key to get generated solely based on the Cancel-Lock value or
> that in combination with the content of the original article.  
>  
> Something needs to remain hidden within the original client, so only it
> knows the correct value of Cancel-Key; else, HipCrime could kill any
> article by seeing the Cancel-Lock header in an article, and using the
> same algorithm to generate the Cancel-Key header.  That's why I figured
> the "something hidden" would be login credentials; i.e., the client
> would have to login to verify it's the same user as the article to
> cancel.

The recommended algorithm is defined in RFC 8315 Section 4:
<https://datatracker.ietf.org/doc/html/rfc8315#section-4>
(this algorithm is used by libcanlock)

The local secret <sec> must be feeded into the canlock utility via
standard input. The following example uses the file "secfile" that
contains the secret <sec>:
| 
| $ <secfile canlock -a sha256 -l '<mid@domain.example>'
| sha256:yM5nDbPwq3Qb5B/4F1PYWgyFegUVpqreLO638zrZVxA=

The first part "<secfile" is the input redirection that feeds the secret
data from "secfile" into standard input of the canlock utility.

The "-a" option specifies the hash algorithm for <scheme>.
RFC 8315 defines SHA256 as mandatory for all implementations.

The "-l" option requests a <c-lock> element from the canlock utility.
The Message-ID must be quoted, so that the angle brackets are not
misinterpreted as input/output redirection.

> If Cancel-Lock and Cancel-Key work like public and private keys in x.509
> or PGP, those encryption schemes work by having hidden info.  You give
> the public key to those who might to send you encrypted messages, but
> only you have the private key (the hidden info).  However, if anyone
> gets your private key, they can decrypt messages that encrypted with
> your public key.  Putting out your private key as Cancel-Key would
> destroy your hidden info as anyone can read the control.cancels
> newsgroup.  
> 
> Something has to remain private (hidden) to ensure only the poster that
> submitted the original article is the only poster that can issue an
> effective cancel.  Cancel-Lock and Cancel-Key are both public. 

Yes, the local secret <sec> (stored in file "secfile" in the example
above) is required to generate a <c-key> element that matches the
<c-lock> element. The canlock utility do this with the "-k" option:
| 
| $ <secfile canlock -a sha256 -k '<mid@domain.example>'
| sha256:5scsO9BAAI3rHuZx9aiHd3mv9el/BEAhBcd3LvL9GIs=

But the secret data is not required anymore for verification:
| 
| $ canlock -c 'sha256:5scsO9BAAI3rHuZx9aiHd3mv9el/BEAhBcd3LvL9GIs=,sha256:yM5nDbPwq3Qb5B/4F1PYWgyFegUVpqreLO638zrZVxA='
| Good

If there are multiple Locks and Keys, every Key must be checked against
every Lock:
<https://datatracker.ietf.org/doc/html/rfc8315#section-3.5>
(the canlock utility can do this with the "-m" option)

This means a server can at least implement the checks without any secret
data or user authentication (and execute Cancel and Supersede operations
only when a matching Cancel-Key was found).
Technical Details
Message-ID: <AABnQIBbUEsAAAQk.A3.flnews@WStation5.stz-e.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf8.newsdeef.eu!nnrp.usenet.blueworldhosting.com!!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <n95ljjp6gnnlfsvjasd90fllco5duv2uc6@4ax.com> <rui8dpjpksdl$.dlg@v.nguard.lh> <vhfta9$1blnv$1@dont-email.me> <alb2yhvm1k0o.dlg@v.nguard.lh> <vhg5sc$1d7l0$1@dont-email.me> <x0xe8h24ln6m.dlg@v.nguard.lh> <8ma5dvwckq.fsf@raybanana.net> <wwxi2otyivz0.dlg@v.nguard.lh> <1gob2zx2ufz9l.dlg@v.nguard.lh> <AABnPbnNdgQAAFDu.A3.flnews@WStation5.stz-e.de> <sgxh7nuzs0xb.dlg@v.nguard.lh>

Show Full Headers
Complete Article Headers
Message-ID: <AABnQIBbUEsAAAQk.A3.flnews@WStation5.stz-e.de>
Subject: Re: Cancel-Lock without Login
Date: Fri, 22 Nov 2024 13:00:11 +0000
From: Michael Bäuerle <michael.baeuerle@stz-e.de>
References: <n95ljjp6gnnlfsvjasd90fllco5duv2uc6@4ax.com> <rui8dpjpksdl$.dlg@v.nguard.lh> <vhfta9$1blnv$1@dont-email.me> <alb2yhvm1k0o.dlg@v.nguard.lh> <vhg5sc$1d7l0$1@dont-email.me> <x0xe8h24ln6m.dlg@v.nguard.lh> <8ma5dvwckq.fsf@raybanana.net> <wwxi2otyivz0.dlg@v.nguard.lh> <1gob2zx2ufz9l.dlg@v.nguard.lh> <AABnPbnNdgQAAFDu.A3.flnews@WStation5.stz-e.de> <sgxh7nuzs0xb.dlg@v.nguard.lh>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf8.newsdeef.eu!nnrp.usenet.blueworldhosting.com!!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
Newsgroups: alt.free.newsservers
Lines: 111
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 1eKnOOf0FOkJegYGufckawwsgrDp1DyyF9qV7cuM12jEUhjUZN
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:AQmSptfk6cBxNiot3y3pFxddhNU= sha256:ZAZNR+9Nec8AMMSXK1h/TdGQijKc8KaRIuikELu4iyI= sha1:2Sx1t1LTcgZCklLZ3XG0Glsp1FQ= sha256:Je8G/xLudSvZTbkRuMvjSjv25hGmchaJzY1tDVMO5vU=
Injection-Date: Fri, 22 Nov 2024 13:00:11 -0000
User-Agent: flnews/1.3.0pre21 (for NetBSD)