Article View: news.software.nntp
Article #90072Re: Modern encryption for INN's ckpasswd or equivalent options?
From: Russ Allbery
Date: Sat, 04 Feb 2023 17:20
Date: Sat, 04 Feb 2023 17:20
32 lines
2429 bytes
2429 bytes
Julien ΓLIE <iulius@nom-de-mon-site.com.invalid> writes:
> In case OpenSSL is not installed on your server, you can also use
> the following Perl command which does the same job:
> % perl -le "print crypt('pass', '\$5\$UIhtJSBOaC0Ap3Vk\$');"
> $5$UIhtJSBOaC0Ap3Vk$nbKgmykshoQ2HmvA3s/nI.X4uhhNHBKTYhBS3pYLjJ6
> As Perl makes use of crypt(3), you have access to all available
> hashing schemes on your systems (like yescript, if supported). Make
> sure to use a random salt.
> % perl -le "print crypt('pass', '\$y\$j9T\$YourSalt\$');"
> $y$j9T$YourSalt$X4tB48vKNDT6mK0vNOc7ppKPWvEsyMg5LwoQfO50r2A
Minor Perl syntax nit to avoid the backslashes:
% perl -le 'print crypt("pass", q{$5$YourSalt$})'
$5$YourSalt$V5hqwFg1nhKb5as6md9KTe5b2NyavsMS6dBYVKfp5W7
% perl -le 'print crypt("pass", q{$y$j9T$YourSalt$})'
$y$j9T$YourSalt$X4tB48vKNDT6mK0vNOc7ppKPWvEsyMg5LwoQfO50r2A
It may be worth mentioning that the opaque "j9T" string in the yescrypt
example is generated with crypt_gensalt(3), and what parameters generated
it. (I'm not sure if Perl has an easy interface to that.)
--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID:
<87h6w12vpx.fsf@hope.eyrie.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<tr3s1v$peb$1@nnrp.usenet.blueworldhosting.com> <87sffutqdx.fsf@hope.eyrie.org> <tr3tns$qg3$1@nnrp.usenet.blueworldhosting.com> <87k016tops.fsf@hope.eyrie.org> <tr4tmr$224f$1@nnrp.usenet.blueworldhosting.com> <trlb5t$k5qt$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <87h6w12vpx.fsf@hope.eyrie.org> Subject: Re: Modern encryption for INN's ckpasswd or equivalent options? Date: Sat, 04 Feb 2023 09:20:42 -0800 From: Russ Allbery <eagle@eyrie.org> References: <tr3s1v$peb$1@nnrp.usenet.blueworldhosting.com> <87sffutqdx.fsf@hope.eyrie.org> <tr3tns$qg3$1@nnrp.usenet.blueworldhosting.com> <87k016tops.fsf@hope.eyrie.org> <tr4tmr$224f$1@nnrp.usenet.blueworldhosting.com> <trlb5t$k5qt$1@news.trigofacile.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: news.software.nntp Organization: The Eyrie Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: hope.eyrie.org; logging-data="32718"; mail-complaints-to="news@eyrie.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cancel-Lock: sha1:5v8Z3x8F75AMd7DnveVHsMIbNlI=