Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5341062ybe; Tue, 17 Sep 2019 06:39:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyenm00MrPovedflruugroPNAWhLbP9FjuyGkksC1XFJKfpU8aeychZDTPjtBtUVk33wqcR X-Received: by 2002:a17:906:d926:: with SMTP id rn6mr4643811ejb.175.1568727543790; Tue, 17 Sep 2019 06:39:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568727543; cv=none; d=google.com; s=arc-20160816; b=fdmSdPkyfC36J4ZM0dAkOFz56OAlbK3mUGGFrBkud9R+7DpYsRhVYvkLf8uqD+/GVc nohU8w0kjAHRyZZ8oVgaEx7DXWzYl0dHcbRvpTpJfjNOP2mVArXMNZM3wYwHfbkR5ox2 lPVx6se51S64f5xO6qvwCCs+JMOt3HHu0ghCwMTtgH3sCOb8DYAe/2I8IMGrTAIn3HPr UYMlyMtrTbIgH4Sni+12VA1Yxpdho84GZeoZKv5iq91Svsx0ODv0pjU9gNaXad9S+qCn PLIn4MVObup6Tu7t7xMIH7B0ZFQAYKxhu2IZH2hi2QA60pG53XlqUEDPN0hqkhXerX26 t5Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature; bh=FbvSBTZNtszguQDI9rTH0oC8VcHjwmxUhGV6gMIwuLA=; b=aG2sH4v8aEDNyCQvaDc3uvG3cDlr7qgt5uFQD/2L2Oucpo2oa24dm2jqaSDiLg+vyI 6z82WIIyQNwKsHpP8FF0+sIOhhWM1H5uJJkJJpMO7C0tUudgutmKyt6CL/iZ+Z4fwPyj tUyOxPR4rfn1clTDqlQbz4q2jrWmuXDiNZmplwC4XoZXu1Vyw0HkDU8DyjKJCQrzHqRV 5Rkv193juVm/e2/mYYeznVpgxMohxpAV13upvJ5B9nn3edH/J77hEZAa7PDqciErQJ+m uxbNkQy1IxTnaJlK1bX1A+KKnPSgRsALteR4qbPi1ORfhGMmFTdhvPu1mMi/mOBtD5hB mrSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nPRGxln+; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m21si1358070edc.153.2019.09.17.06.38.29; Tue, 17 Sep 2019 06:39:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nPRGxln+; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727024AbfIQNhf (ORCPT + 99 others); Tue, 17 Sep 2019 09:37:35 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:40185 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbfIQNhe (ORCPT ); Tue, 17 Sep 2019 09:37:34 -0400 Received: by mail-lj1-f193.google.com with SMTP id 7so3548571ljw.7; Tue, 17 Sep 2019 06:37:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to; bh=FbvSBTZNtszguQDI9rTH0oC8VcHjwmxUhGV6gMIwuLA=; b=nPRGxln+JvzxKYmEeV4c3p24xQeiy+moRIh61GhA6v5V+J6Nlo58x4n7WHtt/9rrpk JuAqf2FH76iOTkUrQVofNhTFmagMDkr4iCVLvLYPPROyxuw7PnB2CF1saX7x7PzzE2Og g2DAxTL1L/6n6z1daEJqYAe+64R88QtHxWbK04wxOV643lwRppDqR6vC2xsrVEdC9nbT N1CR5FQGDgQF3+n68makPvUX+HnZTmAL7xTFIwhmzBvsbRovdsrG5bLnuaPcZg/V/cvs bo6t8mSO56wk3nLV45m35p7KiwmCSuhCPWYVxPgzhOzHAL54PH+FPU6kV9GTGknDXghV rRgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to; bh=FbvSBTZNtszguQDI9rTH0oC8VcHjwmxUhGV6gMIwuLA=; b=p66z09wujZcaiY3UqdmLPCmHD4cRyOeD0CBlH1iKneS+MUBcWkFjTan3oT09CwxXkI Dq7OZ1AZksqGeiDLOEG/hMFMG8rCqLnT0EuBrNFHzUKIhRLd6CihDrKyD17ycdGcGfKW 8c6IcV1RGvmksfqJeXwixvOqimte60b3eeA+W0aWlighigVmy+vtUwm6X97WCzGfKFI0 gleHi3YBC+4/jHgr2DpXhSfAm1Leo4lG2pFE6RqJLM1NuRaa9sE9JKv3V7mfc7VjbAJm NjjlnFQiSiNRHmiHU55QAsKKrdHDEwbaHsbpSuIFQUfDqZoyRBBe6ewdTYJJ2oq/rQDa RODg== X-Gm-Message-State: APjAAAWYlt5RvDGGAToKbJ7a6um7rERnFFnnsTMXMht8K4VrIk0uJwzh 7n0V8aNm12tgWNaXE0r5THSIUP6cd49hmw== X-Received: by 2002:a05:651c:111c:: with SMTP id d28mr2041032ljo.138.1568727452085; Tue, 17 Sep 2019 06:37:32 -0700 (PDT) Received: from ?IPv6:2a02:17d0:4a6:5700::72c? ([2a02:17d0:4a6:5700::72c]) by smtp.googlemail.com with ESMTPSA id p27sm445367lfo.95.2019.09.17.06.37.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Sep 2019 06:37:31 -0700 (PDT) Subject: Re: Linux 5.3-rc8 From: "Alexander E. Patrakov" To: "Theodore Y. Ts'o" , Martin Steigerwald Cc: Willy Tarreau , Matthew Garrett , Linus Torvalds , "Ahmed S. Darwish" , Vito Caputo , Lennart Poettering , Andreas Dilger , Jan Kara , Ray Strode , William Jon McCann , zhangjs , linux-ext4@vger.kernel.org, lkml References: <20190917052438.GA26923@1wt.eu> <2508489.jOnZlRuxVn@merkaba> <20190917121156.GC6762@mit.edu> <6601569a-f339-bc2c-0459-5548a21d0595@gmail.com> Message-ID: Date: Tue, 17 Sep 2019 18:37:29 +0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <6601569a-f339-bc2c-0459-5548a21d0595@gmail.com> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms090507060509090405070701" Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org This is a cryptographically signed message in MIME format. --------------ms090507060509090405070701 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-PH Content-Transfer-Encoding: quoted-printable 17.09.2019 18:11, Alexander E. Patrakov =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > 17.09.2019 17:11, Theodore Y. Ts'o =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> There are only two ways out of this mess.=C2=A0 The first option is we= take >> functionality away from a userspace author who Really Wants A Secure >> Random Number Generator.=C2=A0 And there are an awful lot of programs = who >> really want secure crypto, becuase this is not a hypothetical.=C2=A0 T= he >> result in "Mining your P's and Q's" did happen before.=C2=A0 If we for= get >> the history, we are doomed to repeat it. >=20 > You cannot take away functionality that does not really exist. Every=20 > time somebody tries to use it, there is a huge news, "the boot process = > is blocked on application FOO", followed by an insecure fallback to=20 > /dev/urandom in the said application or library. >=20 > Regarding the "Mining your P's and Q's" paper: I would say it is a=20 > combination of TWO faults, only one of which (poor, or, as explained=20 > below, "marginally poor" entropy) is discussed and the other one (not=20 > really sound crypto when deriving the RSA key from the=20 > presumedly-available entropy) is ignored. >=20 > The authors of the paper factored the weak keys by applying the=20 > generalized GCD algorithm, thus looking for common factors in the RSA=20 > public keys. For two RSA public keys to be detected as faulty, they mus= t=20 > share exactly one of their prime factors. In other words: repeated keys= =20 > were specifically excluded from the study by the paper authors. >=20 > Sharing only one of the two primes means that that the systems in=20 > question behaved identically when they generated the first prime, but=20 > diverged (possibly due to the extra entropy becoming available) when=20 > they generated the second one. And asking the randomness for p and for = q=20 > separately is what I would call the application bug here that nobody=20 > wants to talk about: both p and q should have been derived from a CSPRN= G=20 > seeded by a single read from a random source. If that practice were=20 > followed, then it would either result in a duplicate key (which is not = > as bad as a factorable one), or in completely unrelated keys. I take this back. Of course, completely duplicate keys are weak keys,=20 and they are even more dangerous because they are not distinguishable=20 from intentionally copied good keys by the method in the paper. --=20 Alexander E. Patrakov --------------ms090507060509090405070701 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: Криптографическая подпись S/MIME MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC C5wwggVNMIIENaADAgECAhArQ2N9hOajPiuqD20bI16wMA0GCSqGSIb3DQEBCwUAMIGCMQsw CQYDVQQGEwJJVDEPMA0GA1UECAwGTWlsYW5vMQ8wDQYDVQQHDAZNaWxhbm8xIzAhBgNVBAoM GkFjdGFsaXMgUy5wLkEuLzAzMzU4NTIwOTY3MSwwKgYDVQQDDCNBY3RhbGlzIENsaWVudCBB dXRoZW50aWNhdGlvbiBDQSBHMTAeFw0xOTA2MDYwODAxMzVaFw0yMDA2MDYwODAxMzVaMB0x GzAZBgNVBAMMEnBhdHJha292Q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