Article View: news.software.nntp
Article #90486Re: Reversable Injection-Info header encryption for nnrpd?
From: Russ Allbery
Date: Thu, 06 Jul 2023 18:04
Date: Thu, 06 Jul 2023 18:04
30 lines
2202 bytes
2202 bytes
Julien ΓLIE <iulius@nom-de-mon-site.com.invalid> writes:
> If posting-account is "myuser", nnrpd would then write
> "U2FsdGVkX1+AIde8W1/6D7PFN0YrP0pekyWK4Vt4qhM=" instead, using the
> suggested CBC algorithm:
> % echo "myuser" | openssl enc -aes-256-cbc -pbkdf2 -base64 -pass pass:XXX
> U2FsdGVkX1+AIde8W1/6D7PFN0YrP0pekyWK4Vt4qhM=
I would not use AES-CBC for any new application. It's not authenticated,
which opens it to various problems. AES-CBC-HMAC is better, but it's a
complicated algorithm that's very easy to make mistakes with.
AES-GCM-SIV is probably the most foolproof of readily available encryption
algorithms. Unfortunately, it's not supported by openssl enc, and it's a
fairly new addition to the OpenSSL libraries. Other good options would be
AES-GCM or ChaCha20-Poly1305 (which require unique nonces, but given the
volume of a typical INN nnrpd server we can probably get away with random
nonces), which have been supported for longer but similarly aren't
supported by openssl enc.
PBKDF2 is also a pretty bad key derivation function. It probably doesn't
matter that much, but scrypt or bcrypt would be much better.
Unfortuantely, openssl enc is not a very good tool. :(
--
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:
<87h6qgvrvj.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:
<u85ak0$1uig$1@nnrp.usenet.blueworldhosting.com>Show Full Headers
Complete Article Headers
Message-ID: <87h6qgvrvj.fsf@hope.eyrie.org> Subject: Re: Reversable Injection-Info header encryption for nnrpd? Date: Thu, 06 Jul 2023 11:04:16 -0700 From: Russ Allbery <eagle@eyrie.org> References: <u85ak0$1uig$1@nnrp.usenet.blueworldhosting.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; User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cancel-Lock: sha1:+/lZZebewKnYjpYPlKO3MseF6lc=