Article View: news.software.nntp
Article #79557Re: Cancel-Key and Cancel-Lock
From: Alexander Bartolich
Date: Thu, 23 Oct 2008 16:36
Date: Thu, 23 Oct 2008 16:36
49 lines
3185 bytes
3185 bytes
Aioe schrieb: > [...] > When an user adds the Cancel-Key header, which algorithm he has to use in > order to generate it? Since this is probably done by a newsreader, which > alogrithms are used? First a key is generated. The lock is then defined as $lock = encode_base64(sha1($key)) This lock is then published as Cancel-Lock. It is assumed that sha1 has no reverse operation, i.e. for the general case it's practically impossible to calculate $key from $lock. This means that only the original publisher of Cancel-Lock can later on present a matching Cancel-Key. One straightforward method to generate $key is to just gather some random bits. However, that would mean that the publisher would have to remember every generated $key. The other extreme, having one $key for all messages, does not work since the first published Cancel-Key would then reveal the secret for all published messages. The middle ground is to base $key on a combination of message ID and a master key. Since the message ID is by definition unique this results in a different $key for every post but does not require the publisher to remember each $key. $digest = Digest::HMAC_SHA1::hmac_sha1($message_id, $master_key); $cancel_key = MIME::Base64::encode($digest, ''); $cancel_lock = MIME::Base64::encode(Digest::SHA1::sha1($cancel_key, '')); Only few newsreaders support Cancel-Lock. Fortunately it can be implemented transparently by the newsserver. > When a server receives a cancel message (which header has the user to use: > Control cancel or Supersedes or Cancel?) which kind of checks it's needed > to do? Cancel-Lock can be used for both cancel controls and supersedes. However, the correct response to a supersede with broken or missing Cancel-Key is to keep both the original post and the new post. With INN this requires option -C and a filter script that calls INN::cancel. -- usingwhitespaceisracism
Technical Details
Message-ID:
<gdq979$qn7$1@news.albasani.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news.k-dsl.de!news.albasani.net!not-for-mailReferences:
<gdpprr$rp4$1@aioe.org> <gdps9d$5mv$1@aioe.org>Show Full Headers
Complete Article Headers
Message-ID: <gdq979$qn7$1@news.albasani.net> Subject: Re: Cancel-Key and Cancel-Lock Date: Thu, 23 Oct 2008 16:36:57 +0000 From: Alexander Bartolich <alexander.bartolich@gmx.at> References: <gdpprr$rp4$1@aioe.org> <gdps9d$5mv$1@aioe.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news.k-dsl.de!news.albasani.net!not-for-mail Newsgroups: news.software.nntp Organization: albasani.net Lines: 49 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net oaF/5hi/MZhPXesxEp817vV7hb7xfxOBOOt+UUNnXIWjjW1Gxgs/wS5svefn7bAoGOqlicT5UIzd3TP7qp+mFSq6rmD47Zwpe/U9QV5R0cfAuSgZSJX0iKRG00Ay3I1x X-Complaints-To: abuse@albasani.net NNTP-Posting-Date: Thu, 23 Oct 2008 16:36:57 +0000 (UTC) X-User-ID: as5SfiEwp0pWsJILdxe7AXcmHRboTYJKwBD8eEsQxv8= Cancel-Lock: sha1:tkuJ4U2m9+tq8lyM55PbkJFf8Do= sha1:NtzIcDPfGrE/r6lPjFSs6WYR0ZE= User-Agent: slrn/0.9.9 (Linux) X-NNTP-Posting-Host: CaOCprGHmP/Admxk4u/QH8JU9T8naTaRnmZfx6Rh7IU=