Gentoo Archives: gentoo-dev

From: Sam James <sam@g.o>
To: gentoo-dev@l.g.o
Cc: licenses@g.o, base-system@g.o
Subject: Re: [gentoo-dev] Guidance on distributed patented software
Date: Sun, 26 Sep 2021 19:42:01
Message-Id: 92006424-FB7A-464B-B1E0-8302203B3C0F@gentoo.org
In Reply to: Re: [gentoo-dev] Guidance on distributed patented software by Joshua Kinard
1 > On 25 Sep 2021, at 20:44, Joshua Kinard <kumba@g.o> wrote:
2 >
3 >> [snip]
4 >>
5 >> ECDSA and the NIST curves have been around since > 20 years, so it's
6 >> simply impossible that there are any valid patents covering those.
7 >> (There is of course a slight possibility that there may be patents
8 >> covering specific implementation details of ECDSA/NIST curves that were
9 >> only described later.)
10 >
11 > Then we are either A) being too paranoid and should just drop bindist from
12 > the OpenSSL ebuilds, or B) we are not being paranoid enough and packages
13 > like dropbear/libtomcrypt need bindist added, no? It seems we're stuck in
14 > the middle here because we don't have the right information. If Red Hat or
15 > IBM are being non-responsive over this, then surely some other distro out
16 > there has already figured things out?
17 >
18
19 Agreed.
20
21 Furthermore, it's not clear to me that Debian or Ubuntu are "hobbling"
22 their OpenSSL implementations. I may have missed something, but I
23 don't see anything in:
24 - https://salsa.debian.org/debian/openssl/-/tree/debian/unstable/debian/patches (or the rules file)
25 - https://git.launchpad.net/ubuntu/+source/openssl/tree/debian/patches?h=applied/ubuntu/impish (or the rules file)
26
27 The only thing I have found is an old bug report for Ubuntu (https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/597984)
28 referencing disabling some non-EC parts.
29
30 >
31 >> I'm not entirely sure what you'd like to ask the libtomcrypt authors.
32 >> "We think there may be patents, but we don't know. Did you consider
33 >> that?"
34 >
35 > No, actually, I was thinking something more along the lines of "Hey, are you
36 > aware of these supposed patent claims about ECC/ECDSA implementations that
37 > Red Hat says exist, and if so, did you do any research on them that you
38 > could possibly share that led you to feeling confident to release your
39 > implementation into the public domain".
40
41 I'd like to make some points about our continued use of the "hobble" patch
42 for at least < OpenSSL 3 too:
43
44 - RH won't publicly say what they're worried about wrt EC in OpenSSL. This could be to
45 avoid patent trolls, but this isn't really consistent with the patch being "enough"
46 to protect them - or us - anyway?
47
48 - We don't know what patents the Fedora patch is allegedly preventing us
49 from infringing.
50
51 - If Fedora's patch is based on legal advice, there's no reason to believe
52 that it necessarily applies to us.
53
54 - We have no way of verifying the correctness (or completeness) of the Fedora
55 patch we use because it is unclear what it is protecting against.
56
57 - Even the latest version of Fedora's hobble patch _script_ only references
58 patents expiring, at the latest, in 2020: https://src.fedoraproject.org/rpms/openssl/blob/rawhide/f/hobble-openssl.
59
60 And, as you observed, this doesn't appear to be applied consistently anyway. Dropbear
61 in Fedora appears to allow EC.
62
63 Right now, I'm far more concerned about the possible security impact of
64 applying patches whose correctness is not vouched for, nor do we truly
65 understand their purpose.
66
67 In addition, some of the changes in our current OpenSSL 1.1.x patches are fragile
68 and easily mis-applied or mis-rebased. Here's an example of such a possibly
69 problematic hunk:
70
71 @@ -2026,9 +1945,9 @@ int speed_main(int argc, char **argv)
72 # endif
73
74 # ifndef OPENSSL_NO_EC
75 - ecdsa_c[R_EC_P160][0] = count / 1000;
76 - ecdsa_c[R_EC_P160][1] = count / 1000 / 2;
77 - for (i = R_EC_P192; i <= R_EC_P521; i++) {
78 + ecdsa_c[R_EC_P224][0] = count / 1000;
79 + ecdsa_c[R_EC_P224][1] = count / 1000 / 2;
80 + for (i = R_EC_P256; i <= R_EC_P521; i++) {
81 ecdsa_c[i][0] = ecdsa_c[i - 1][0] / 2;
82 ecdsa_c[i][1] = ecdsa_c[i - 1][1] / 2;
83 if (ecdsa_doit[i] <= 1 && ecdsa_c[i][0] == 0)
84 @@ -2040,7 +1959,7 @@ int speed_main(int argc, char **argv)
85 }
86 }
87 }
88 -# ifndef OPENSSL_NO_EC2M
89 +# if 0
90
91 By not using easy macros where possible, we're making it far easier to have compile-time
92 or even runtime errors.
93
94 >
95 > But I am open to better language. I just don't wanna sit here not knowing.
96 > Someone out there has to have the right information to settle this.
97 >
98
99 Yep. We consult legal advice or stop using half-measures.
100
101 Best,
102 sam

Attachments

File name MIME type
signature.asc application/pgp-signature