From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/libopenssl: add option to enable some features
Date: Sat, 29 Aug 2020 23:56:57 +0200 [thread overview]
Message-ID: <20200829215657.GL14354@scaer> (raw)
In-Reply-To: <20200721092631.40977-1-erwan.gautron@bertin.fr>
Erwan, All,
On 2020-07-21 11:26 +0200, Erwan Gautron spake thusly:
> From: "GAUTRON, Erwan" <erwan.gautron@bertin.fr>
> Openssl implements lot of algorithms that are not required in
> some emdedded devices and cyphers known as weak.
> Secure embedded systems shall disable unused algorithms (and weak algo)
> in order to be certified.
> This patch allows to select weak algorithms and mecanims to enable
> such as md5
> To ensure backward compatibility, all items are selected by default
While I certainly understand and appreciate the rationale, I think this
is going a bit too far and is too granular.
I would suggest that we just add a few categories, like:
config BR2_PACKAGE_LIBOPENSSL_LEGACY_CIPHERS
bool "enable legacy cipher suites"
help
Build support for the following legacy, weak cipher suites:
rc2
rc4
rc5
[etc... fill in as appropriate]
config BR2_PACKAGE_LIBOPENSSL_LEGACY_HASHES
bool "enable legacy hash algorithms"
help
Build support for legacy, weak hash alorithms:
md2
md4
md5
[etc... fill in as appropriate]
config BR2_PACKAGE_LIBOPENSSL_LEGACY_PROTOCOLS
bool "enable legacy protocols"
help
Build support for legacy protocols;
SSL 1.0
SSL 2.0
SSL 3.0
TLS 1.0
[etc... fill in as appropriate]
And we would consider legacy any cipher suite, hash algorithm, or
protocol that is deprecated by NIST (e.g. because they are forbidden in
FIPS 140-2, or the soon-to-be-in-force FIPS 140-3).
Finally, I would not add any option to disable "current" cipher suites,
hash algorithms, or protocols; I would always have them built. This will
help build devices that are future-proof, when the servers they talk to
are upgraded to using new protocols and thus new cipher suites: devices
in the fields will not need to be updated just for that.
Also, see below for a few generic comments...
> Signed-off-by: Erwan GAUTRON <erwan.gautron@bertin.fr>
> ---
> package/libopenssl/Config.in | 147 +++++++++++++++++++++++++++++++
> package/libopenssl/libopenssl.mk | 24 +++++
> 2 files changed, 171 insertions(+)
>
> diff --git a/package/libopenssl/Config.in b/package/libopenssl/Config.in
> index 8909e36b9e..c034408a96 100644
> --- a/package/libopenssl/Config.in
> +++ b/package/libopenssl/Config.in
> @@ -44,4 +44,151 @@ config BR2_PACKAGE_LIBOPENSSL_ENGINES
> help
> Install additional encryption engine libraries.
>
> +config BR2_PACKAGE_LIBOPENSSL_ENABLE_CHACHA
> + bool "enable CHACHA "
> + default y
> + help
> + Enable CHACHA cipher.
There is not point in providing a help text that just repeats the prompt
of the option. Surely, the user expects to enable 'foo' when they select
the 'foo' option, so a help text that just says so is useless. And in
this case, there is no need for such a helpt text indeed.
But with the proposal I made above, that comment is now moot (but you'll
know for your next patches! ;-) ).
> +config BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5
> + bool "enable RC5"
> + default y
> + help
> + Enable RC5 cipher.
> +
> +config BR2_PACKAGE_LIBOPENSSL_ENABLE_RC2
> + bool "enable RC2"
> + default y
> + help
> + Enable RC2 cipher.
> +
> +config BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4
> + bool "enable RC4"
> + default y
> + help
> + Enable RC4 cipher.
Also for the future: keep alphabetical ordering, so that items in a same
category are ordered and easy to find.
> +config BR2_PACKAGE_LIBOPENSSL_ENABLE_MD2
> + bool "enable MD2"
> + default y
> + help
> + Enable MD2 cipher.
The MD2/4/5 are not ciphers, but hashes. Well, they are hash algorithms.
Well, they are message-digest algorithms. Well, I am not a security
pedant, but they are certainly not ciphers.
> +config BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL
> + bool "enable SSL"
> + default y
> + help
> + Enable SSL mode.
> +
> +config BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL2
> + bool "enable SSL2"
> + default y
> + help
> + Enable SSL2 mode.
> +
> +config BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL3
> + bool "enable SSL3"
> + default y
> + help
> + Enable SSL3 mode.
> +
> +config BR2_PACKAGE_LIBOPENSSL_ENABLE_WEAK_SSL
> + bool "enable WEAK_SSL"
> + default y
> + help
> + Enable WEAK_SSL mode.
WEAK_SSL is about weak ciphers; it's not a protocol, just the list of
ciphers allowed.
> +config BR2_PACKAGE_LIBOPENSSL_ENABLE_PSK
> + bool "enable mode PSK"
> + default y
> + help
> + Enable PSK mode.
> +
> +config BR2_PACKAGE_LIBOPENSSL_ENABLE_CAST
> + bool "enable mode CAST"
> + default y
> + help
> + Enable CAST mode.
> +
> +config BR2_PACKAGE_LIBOPENSSL_UNSECURE
> + bool "enable unit test, debug, backtrace"
> + default y
> + help
> + Enable unit-test crypto-mdebug-backtrace
> + crypto-mdebug autoerrinit mode.
> +
> +config BR2_PACKAGE_LIBOPENSSL_DYNAMIC_ENGINE
> + bool "enable dynamic engine"
> + default y
> + help
> + Enable dynamic engine.
> +
> +
Two empty consecutive lines is one too many.
Running 'make check-package' would hint at this.
> +config BR2_PACKAGE_LIBOPENSSL_ENABLE_COMP
> + bool "enable compression"
> + default y
> + help
> + Enable compression.
> +
> +
Ditto empty lines.
Would you care to respin your series in the direction I suggest above,
please?
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2020-08-29 21:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 9:26 [Buildroot] [PATCH 1/1] package/libopenssl: add option to enable some features Erwan Gautron
2020-08-29 21:56 ` Yann E. MORIN [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-05-11 13:21 Erwan GAUTRON
2021-05-16 17:09 ` Yann E. MORIN
2020-05-11 11:28 [Buildroot] [PATCH 1/1] package/libopenssl: add option to disable unwanted features Erwan GAUTRON
2020-05-11 11:28 ` [Buildroot] [PATCH 1/1] package/libopenssl: add option to enable some features Erwan GAUTRON
2020-05-11 12:47 ` Thomas Petazzoni
2020-05-11 13:02 ` Erwan Gautron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200829215657.GL14354@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox