Thread View: news.software.nntp
8 messages
8 total messages
Started by Michael Bäuerle
Tue, 16 May 2017 20:35
[libcanlock] Version 3
Author: Michael Bäuerle
Date: Tue, 16 May 2017 20:35
Date: Tue, 16 May 2017 20:35
40 lines
2529 bytes
2529 bytes
This is a development Snapshot of libcanlock 3.0.0: <http://micha.freeshell.org/libcanlock/src/libcanlock-3.0.0pre17.tar.bz2> SHA256(libcanlock-3.0.0pre17.tar.bz2)= 5b2f7637f60517b732581753adfdd4371bc1e0f0ad4135acb38c82b8b1f8a305 General: libcanlock is a standalone Cancel-Lock implementation without external dependencies. Version 3 is based on libcanlock Version 2b from G. J. Andruk. Dennis Preiser replaced the SHA-Implementation with the one from RFC6234 section 8 and has written a new API (hash algorithm independent). I have written the command line frontend "canlock" and added a GNU autotools based build system, some new test cases (for "make test") and man pages. The API of Version 2b is emulated, but the ABI of the shared library is not compatible and the headerfile is installed in a different location (so that both versions can be installed in parallel). Every C99 compiler should be able to build the code of the library and the CLI frontend. The build system and test programs require a POSIX based operating system to work. A <c-lock> element for the example from: <https://tools.ietf.org/html/draft-baeuerle-netnews-cancel-lock-04#section-5.1> can be created with the frontend like this: | | $ printf "ExampleSecret" | canlock -l '<12345@mid.example>' | sha256:s/pmK/3grrz++29ce2/mQydzJuc7iqHn1nqcJiQTPMc= Currently tested to work on AIX, Cygwin, GNU/Linux, HP-UX, NetBSD and Solaris. More test results and bugreports are welcome. Note: Work in progress. Please use this snapshot for testing only! [Xpost and Fup2 set to news.software.nntp]
Re: [libcanlock] Version 3
Author: Julien ÉLIE
Date: Thu, 18 May 2017 19:47
Date: Thu, 18 May 2017 19:47
42 lines
2609 bytes
2609 bytes
Hi Michael, > General: > libcanlock is a standalone Cancel-Lock implementation without external > dependencies. > > I have written the command line frontend "canlock" and added a GNU > autotools based build system, some new test cases (for "make test") > and man pages. Oh, that's great! Thanks for having modernized libcanlock! > Currently tested to work on AIX, Cygwin, GNU/Linux, HP-UX, NetBSD and > Solaris. More test results and bugreports are welcome. Works on macOS Sierra (10.12) too. I see that libcanlock supports sha224 and sha384. Are you willing to add these algorithm hashes to the IANA registry. Could you please better explain how to use the -c flag? -c key,lock Check Cancel-Key <key> against Cancel-Lock <lock> % printf "lm" | ./canlock -a sha512 -k "kl" sha512:adHjY67M8vrEmoRMptSiOWzt3nCmbFiUuaMTeAHZ2VwbfGyselzpU4F3n+DAs2/kL2Pjkq9g+KRNHzRPNL+a2A== % printf "lm" | ./canlock -a sha512 -l "kl" sha512:2Qzn5namk4E3FMjAELWTok31kyvyiIdbEcxKmAuBgVGjhQwy+w+9uXXsprpJL7V3krz2RxxZ3KbAWI9xVgIcrA== % ./canlock -c "sha512:adHjY67M8vrEmoRMptSiOWzt3nCmbFiUuaMTeAHZ2VwbfGyselzpU4F3n+DAs2/kL2Pjkq9g+KRNHzRPNL+a2A==","sha512:2Qzn5namk4E3FMjAELWTok31kyvyiIdbEcxKmAuBgVGjhQwy+w+9uXXsprpJL7V3krz2RxxZ3KbAWI9xVgIcrA==" Mismatch -- Julien ÉLIE « Et maintenant, la balle est dans le camp des slalomeurs. »
Re: [libcanlock] Version 3
Author: Dennis Preiser
Date: Thu, 18 May 2017 21:10
Date: Thu, 18 May 2017 21:10
25 lines
2381 bytes
2381 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote: > Could you please better explain how to use the -c flag? > > -c key,lock Check Cancel-Key <key> against Cancel-Lock <lock> > > % printf "lm" | ./canlock -a sha512 -k "kl" > sha512:adHjY67M8vrEmoRMptSiOWzt3nCmbFiUuaMTeAHZ2VwbfGyselzpU4F3n+DAs2/kL2Pjkq9g+KRNHzRPNL+a2A== > % printf "lm" | ./canlock -a sha512 -l "kl" > sha512:2Qzn5namk4E3FMjAELWTok31kyvyiIdbEcxKmAuBgVGjhQwy+w+9uXXsprpJL7V3krz2RxxZ3KbAWI9xVgIcrA== > % ./canlock -c > "sha512:adHjY67M8vrEmoRMptSiOWzt3nCmbFiUuaMTeAHZ2VwbfGyselzpU4F3n+DAs2/kL2Pjkq9g+KRNHzRPNL+a2A==","sha512:2Qzn5namk4E3FMjAELWTok31kyvyiIdbEcxKmAuBgVGjhQwy+w+9uXXsprpJL7V3krz2RxxZ3KbAWI9xVgIcrA==" > Mismatch You have to provide the scheme via -a: | % printf "lm" | ./canlock -a sha512 -k "kl" | sha512:adHjY67M8vrEmoRMptSiOWzt3nCmbFiUuaMTeAHZ2VwbfGyselzpU4F3n+DAs2/kL2Pjkq9g+KRNHzRPNL+a2A== | % printf "lm" | ./canlock -a sha512 -l "kl" | sha512:2Qzn5namk4E3FMjAELWTok31kyvyiIdbEcxKmAuBgVGjhQwy+w+9uXXsprpJL7V3krz2RxxZ3KbAWI9xVgIcrA== | % ./canlock -a sha512 -c "adHjY67M8vrEmoRMptSiOWzt3nCmbFiUuaMTeAHZ2VwbfGyselzpU4F3n+DAs2/kL2Pjkq9g+KRNHzRPNL+a2A==","2Qzn5namk4E3FMjAELWTok31kyvyiIdbEcxKmAuBgVGjhQwy+w+9uXXsprpJL7V3krz2RxxZ3KbAWI9xVgIcrA==" | Good Dennis
Re: [libcanlock] Version 3
Author: Michael Bäuerle
Date: Fri, 19 May 2017 11:48
Date: Fri, 19 May 2017 11:48
41 lines
2630 bytes
2630 bytes
Julien ÉLIE wrote: > Michael Bäuerle wrote: > > > > General: > > libcanlock is a standalone Cancel-Lock implementation without external > > dependencies. > > > > I have written the command line frontend "canlock" and added a GNU > > autotools based build system, some new test cases (for "make test") > > and man pages. > > Oh, that's great! Thanks for having modernized libcanlock! Dennis has created the new version and asked me if I would maintain it. > > Currently tested to work on AIX, Cygwin, GNU/Linux, HP-UX, NetBSD and > > Solaris. More test results and bugreports are welcome. > > Works on macOS Sierra (10.12) too. Thanks for the test. Dennis has tested macOS too, it was my fault that the list above was incomplete. > I see that libcanlock supports sha224 and sha384. Are you willing to > add these algorithm hashes to the IANA registry. Pro argument: - Users choice what algorithm to use (good in general) Contra arguments: - Proliferation of algorithms is not desireable in our case (because there is no negotiation - the receiver must be able to process what the sender has choosen) - Both, SHA224 and SHA384 are weaker than SHA512 that is already present - Both, SHA224 and SHA384 are truncated versions of SHA256 and SHA512 respectively. It is unlikely that an implementation supports them, but not full SHA256 and SHA512 (or that there is a performance benefit) Are there other Pro arguments that justify addition of SHA224/SHA384?
Re: [libcanlock] Version 3
Author: Julien ÉLIE
Date: Fri, 19 May 2017 19:41
Date: Fri, 19 May 2017 19:41
33 lines
2512 bytes
2512 bytes
Hi Michael, >> I see that libcanlock supports sha224 and sha384. Are you willing to >> add these algorithm hashes to the IANA registry. > > Pro argument: > - Users choice what algorithm to use (good in general) > > Contra arguments: > - Proliferation of algorithms is not desireable in our case (because > there is no negotiation - the receiver must be able to process what > the sender has choosen) > - Both, SHA224 and SHA384 are weaker than SHA512 that is already present > - Both, SHA224 and SHA384 are truncated versions of SHA256 and SHA512 > respectively. It is unlikely that an implementation supports them, but > not full SHA256 and SHA512 (or that there is a performance benefit) > > Are there other Pro arguments that justify addition of SHA224/SHA384? Pro argument: an implementation generates them :) Why not reference sha224 and sha384 with an intended usage of "LIMITED USE" like sha1? You can add a note in the registry saying for sha224 that sha256 should be used instead, as it is a truncated version of sha224. And same thing for sha384. -- Julien ÉLIE « The best preparation for tomorrow is to do today's work superbly well. » (William Osler)
Re: [libcanlock] Version 3
Author: Julien ÉLIE
Date: Fri, 19 May 2017 19:51
Date: Fri, 19 May 2017 19:51
41 lines
2720 bytes
2720 bytes
Hi Dennis,
>> Could you please better explain how to use the -c flag?
>>
>> -c key,lock Check Cancel-Key <key> against Cancel-Lock <lock>
>
> You have to provide the scheme via -a:
>
> | % printf "lm" | ./canlock -a sha512 -k "kl"
> | sha512:adHjY67M8vrEmoRMptSiOWzt3nCmbFiUuaMTeAHZ2VwbfGyselzpU4F3n+DAs2/kL2Pjkq9g+KRNHzRPNL+a2A==
> | % printf "lm" | ./canlock -a sha512 -l "kl"
> | sha512:2Qzn5namk4E3FMjAELWTok31kyvyiIdbEcxKmAuBgVGjhQwy+w+9uXXsprpJL7V3krz2RxxZ3KbAWI9xVgIcrA==
> | % ./canlock -a sha512 -c "adHjY67M8vrEmoRMptSiOWzt3nCmbFiUuaMTeAHZ2VwbfGyselzpU4F3n+DAs2/kL2Pjkq9g+KRNHzRPNL+a2A==","2Qzn5namk4E3FMjAELWTok31kyvyiIdbEcxKmAuBgVGjhQwy+w+9uXXsprpJL7V3krz2RxxZ3KbAWI9xVgIcrA=="
> | Good
OK, thanks.
Could SYNOPSIS be updated to make -a mandatory in the man page?
It currently reads:
canlock [-a scheme] [-q] -c key,lock
And canlock help differentiate Cancel-Key <key> and <c-key-string>?
I thought the result of -k or -l was directly usable as the input of -c
when seeing:
$ ./canlock -h
-c key,lock Check Cancel-Key <key> against Cancel-Lock <lock>
-k mid Get Cancel-Key for Message-ID <mid> (secret is read from stdin)
-l mid Get Cancel-Lock for Message-ID <mid> (secret is read from stdin)
(The man page is more clear about that.)
Thanks for your work!
--
Julien ÉLIE
« The best preparation for tomorrow is to do today's work superbly
well. » (William Osler)
Re: [libcanlock] Version 3
Author: Michael Bäuerle
Date: Sun, 21 May 2017 09:44
Date: Sun, 21 May 2017 09:44
31 lines
2389 bytes
2389 bytes
Julien ÉLIE wrote: > Michael Bäuerle wrote: > > Julien ÉLIE wrote: > > > > > > I see that libcanlock supports sha224 and sha384. Are you willing to > > > add these algorithm hashes to the IANA registry. > > > > Pro argument: > > - Users choice what algorithm to use (good in general) > > > > Contra arguments: > > - Proliferation of algorithms is not desireable in our case (because > > there is no negotiation - the receiver must be able to process what > > the sender has choosen) > > - Both, SHA224 and SHA384 are weaker than SHA512 that is already present > > - Both, SHA224 and SHA384 are truncated versions of SHA256 and SHA512 > > respectively. It is unlikely that an implementation supports them, but > > not full SHA256 and SHA512 (or that there is a performance benefit) > > > > Are there other Pro arguments that justify addition of SHA224/SHA384? > > Pro argument: an implementation generates them :) > > Why not reference sha224 and sha384 with an intended usage of "LIMITED > USE" like sha1? You can add a note in the registry saying for sha224 > that sha256 should be used instead, as it is a truncated version of > sha224. And same thing for sha384. OK, you convinced me.
Re: [libcanlock] Version 3
Author: Michael Bäuerle
Date: Sun, 21 May 2017 18:42
Date: Sun, 21 May 2017 18:42
42 lines
3043 bytes
3043 bytes
Julien ÉLIE wrote: > Dennis Preiser wrote: > > Julien ÉLIE wrote: > > > > > > Could you please better explain how to use the -c flag? > > > > > > -c key,lock Check Cancel-Key <key> against Cancel-Lock <lock> > > > > You have to provide the scheme via -a: > > > > | % printf "lm" | ./canlock -a sha512 -k "kl" > > | sha512:adHjY67M8vrEmoRMptSiOWzt3nCmbFiUuaMTeAHZ2VwbfGyselzpU4F3n+DAs2/kL2Pjkq9g+KRNHzRPNL+a2A== > > | % printf "lm" | ./canlock -a sha512 -l "kl" > > | sha512:2Qzn5namk4E3FMjAELWTok31kyvyiIdbEcxKmAuBgVGjhQwy+w+9uXXsprpJL7V3krz2RxxZ3KbAWI9xVgIcrA== > > | % ./canlock -a sha512 -c "adHjY67M8vrEmoRMptSiOWzt3nCmbFiUuaMTeAHZ2VwbfGyselzpU4F3n+DAs2/kL2Pjkq9g+KRNHzRPNL+a2A==","2Qzn5namk4E3FMjAELWTok31kyvyiIdbEcxKmAuBgVGjhQwy+w+9uXXsprpJL7V3krz2RxxZ3KbAWI9xVgIcrA==" > > | Good > > OK, thanks. > Could SYNOPSIS be updated to make -a mandatory in the man page? > It currently reads: > canlock [-a scheme] [-q] -c key,lock It was not mandatory (default was SHA256). But yes, that "<scheme>:" was generated by -k and -l options, but must be stripped before checking with the -c option was not intuitive. Here is a new snapshot: <http://micha.freeshell.org/libcanlock/src/libcanlock-3.0.0pre21.tar.bz2> SHA256(libcanlock-3.0.0pre21.tar.bz2)= bfafa2e2fd7f82944ac4c9f4da769d2de693e720b66f0c773f0d6b10765f1f5e The -c Option now works like you had expected above: | | $ canlock -c "sha512:adHjY67M8vrEmoRMptSiOWzt3nCmbFiUuaMTeAHZ2VwbfGyselzpU4F3n+DAs2/kL2Pjkq9g+KRNHzRPNL+a2A==","sha512:2Qzn5namk4E3FMjAELWTok31kyvyiIdbEcxKmAuBgVGjhQwy+w+9uXXsprpJL7V3krz2RxxZ3KbAWI9xVgIcrA==" | Good The -a Option is still accepted together with -c, but no longer used (and removed from the SYNOPSIS for -c in the man page). The library function 'cl_split()', that is used by canlock to replace -a for the input direction, is now part of the new V3 API.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads