🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.free.newsservers
Article #186308

Re: Cancel-Lock without Login

#186308
From: Michael Bäuerle
Date: Fri, 22 Nov 2024 15:17
98 lines
5662 bytes
VanguardLH wrote:
> 
> While looking, I found:
> 
> https://www.templetons.com/usenet-format/cancel.html
> 
> That mentions, for Cancel-Lock and Cancel-Key to work, "It's the secure
> hash (MD5 for example) of a secret string unique to the message."
> 
> Does that mean a client capable of issuing a cancel message retains a
> unique string for every article in its message store, and that unique
> and hidden string is used when generating both the Cancel-Lock and
> Cancel-Key headers?

Such an implementation would be possible, but is inconvenient.

> If so, seems every client would need to generate
> its own master secret to ensure another instance of the same client
> didn't have the same master string when creating the secret strings
> unique to each message.

See my article <news:AABnQIBbUEsAAAQk.A3.flnews@WStation5.stz-e.de>
(Message-ID: <AABnQIBbUEsAAAQk.A3.flnews@WStation5.stz-e.de>)
and the algorithm recommended by RFC 8315.

In this case only a single secret per user is required (normally stored
in the home directory of the user with access permissions limited to the
user).

> Also mentioned under "A solution now" is:
> 
>   Cancels which contain an authentication, either the unlocking secret
> string of the cancel lock, or a public key based digital signature,
> would propagate, and be effective all over the net. 
> 
> So, does that mean the secret string is encoded into Cancel-Lock, and
> only a properly valued Cancel-Key also with the encoded secret string
> within it would work together, and eliminate the need for the user to
> login to prove they are the same poster as for the original article?

A Cancel-Key <c-key-string> element is the Key K with Base 64 encoding
applied (to make it suitable for the US-ASCII encoded article header):
<https://datatracker.ietf.org/doc/html/rfc8315#section-2.2>
| 
| Base64(K)

To create a matching lock, a hash function is used (and the output is
Base64 encoded again to make it suitable for the article header):
<https://datatracker.ietf.org/doc/html/rfc8315#section-2.1>
| 
| Base64(hash(Base64(K)))

Calculating the hash is easy, but calculating K from the hash is hard.

K must be published as Cancel-Key for a Cancel or Supersede request.
This allows everybody to calculate the hash and check it, but it also
reveals K to the public, so that it is no longer secret.

If a secret is directly used for K, a database with different K
values for the Locks in all articles would be required.

> That leads me back to where does the secret string come from.  Is the
> secret key unique to each article, or to the client?

The algorithm recommended by RFC 8315 uses a single secret and the
Message-ID of the article (unique by definition) to calculate K.
HMAC is used to make this one-way too, so that revealing K does not
reveal the secret that was used to calculate K.

> If generated from
> the article, seems anyone could generate the same secret key since the
> algorithms are likely known.  If a master secret in the client used to
> generate the secret string for all messages in the Cancel-Lock, seems
> each client MUST generate its own unique master string/key per instance
> of that client, not the same key for every instance of that client
> (other users can be using the same client).

Yes, each client needs its own secret.
If multiple users share a secret, they can cancel each others articles.

> If true, seems the client
> should have a means of reseeding its key should somehow its secret
> become known.

If somebody steals the secret, articles with Cancel-Locks based on that
secret can be cancelled with it.
The secret can be replaced in regular intervals to limit potential
damage.

> Multiple instances of the same client (i.e., many users
> of the same client) should not be using the same secret or master
> string.

A newsreader normally stores the secret in the home directory of the
user (this means a different secret for every user).

A server can use the User-ID for the optional <uid> element when
calculating K.
Technical Details
Message-ID: <AABnQKCHQ-QAAAQk.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> <1065wihoiibab.dlg@v.nguard.lh>

Show Full Headers
Complete Article Headers
Message-ID: <AABnQKCHQ-QAAAQk.A3.flnews@WStation5.stz-e.de>
Subject: Re: Cancel-Lock without Login
Date: Fri, 22 Nov 2024 15:17:27 +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> <1065wihoiibab.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: 98
Reply-To: Michael Bäuerle <michael.baeuerle@gmx.net>
Mime-Version: 1.0
X-Trace: individual.net jt1fXrWzn/qeoCI7IWlEVA+FramQfo1J72uQtWLaStplGeqeyZ
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:T+FAha0KLj/TvwBU7v+siU4nomQ= sha256:SPQsjbjs+/2bKwyAgIZJo3AFoOAmkA3RoUsuiFJTrWg= sha1:6P2o4GY0WHhbVIcps0dW/Biu51A= sha256:FildTnJ3pxHmRy3OXBcn3aaK4Tfpl3CqA89ffgropK8=
Injection-Date: Fri, 22 Nov 2024 15:17:27 -0000
User-Agent: flnews/1.3.0pre21 (for NetBSD)