Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5310050ybe; Tue, 17 Sep 2019 06:11:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwemd3eAjgYnG7XXFwBJRA0SE508Q2vuf1ZneTxWRQd6h7al2VEZZek/Y1AB08JCvgFAI1g X-Received: by 2002:a05:6402:134d:: with SMTP id y13mr4413194edw.209.1568725915175; Tue, 17 Sep 2019 06:11:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568725915; cv=none; d=google.com; s=arc-20160816; b=q29F3FjGihkCXffLH7qyDizolFf94XylqoB17nCDrZAAv8PiZTxXMnxVQU3dK9s+ue PGkPWDidKmOP1KRrtwnAmWwU91kdcd3Y9PvrySYfXJ2DMtCScmSgYEJLskAHMsi9Nuio QiEKBKWTn0YNbzpIRBPUesq0Lp3ENC0lP6r32LxSzTzKqO3d+MtniiUzLWBEYL32Mxjq brfHuZwSWEIsThl79J80SqSevldfk6YP2mwbvGBK/7a6n26agcxKui1tqKgx0DOYYkfS dUPh9zueN00p5fB62wnCdyWqwcEXZDWlVPDNrNPLIjgaI4v4nzdX9ZI2gyoAVNasvIUe 0Ksw== 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:from:references:cc:to:subject:dkim-signature; bh=EZCXqAj8JTWrMTmIU44H25hWpxUIVaHu44MXcSwaNwk=; b=aoCoeOkpCwsCBRC9UbyBkUcY9B6qIoM0AEGW2TV/Qe1Zb2njPEYaRDQuOr5gjpji7o kbF41vPUtdGlg8FaeTZwOZurWSRSEe292tJUf+9S821mxAfgqf+EuhEJKmhuzs6/kYcR Dq9p0z0X+Wik5gQeLPs31JMHpInYob7B+bVLppgGhhtWC8zstnQ2a4C/zluthKoyOOaG rswroLn6/vf91HdWqieKVFsPvraQX2wDgrbtmmwTzGHyf/AHmyH8nG8QpQD6C3wgBED9 zhCwU1hrv5oG75ERv86OoBV4L3DP6uVuAUxsMr76+9ze57lTJoQVPeTQezJolSHfTzLs 9RBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dfKl9B5n; 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 k16si1025044ejj.24.2019.09.17.06.11.21; Tue, 17 Sep 2019 06:11:54 -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=dfKl9B5n; 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 S1727063AbfIQNLM (ORCPT + 99 others); Tue, 17 Sep 2019 09:11:12 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:44165 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726649AbfIQNLM (ORCPT ); Tue, 17 Sep 2019 09:11:12 -0400 Received: by mail-lf1-f65.google.com with SMTP id q11so2804606lfc.11; Tue, 17 Sep 2019 06:11:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to; bh=EZCXqAj8JTWrMTmIU44H25hWpxUIVaHu44MXcSwaNwk=; b=dfKl9B5nKL/rUbUpShub6ZPyLymeg5fooGANUJrpFVw7EHBYA7xEnYB50zerC78afv TrCqwNnJtxU+LyyAYxrMXhbJodXx4H34wYubjGgJ24O1PrdLHHv9A7WXqrutATtImwGG TxUhs8HQynSAOEIpM+b0kx0DQHM85T4hX9+vAeuI5GAB2ViK/FQUFl6e78AxiJ4a+1be QIsqmkoFYOTosFkmDcozrSeYd+U24RnD8MVHZdWrGnbsOgenyZZIAhKx25We21ha7oIJ EfJENn1pSZnOaf0zQ0nDPcCcpVX4aRtRNR1rg3boguYPbzspkKIS2TbL1E9TMYE/eA9L a7tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=EZCXqAj8JTWrMTmIU44H25hWpxUIVaHu44MXcSwaNwk=; b=Ire0bbwsj7xlMG+d2BiwfNgqYEZvmchr1CXcOVjpdthpYTttx9pJDdf4ZGK8rfPt/9 8ZkGbz+anODw27k6JL4cLUrhW443NeQY8lJYKf7mgU/L3Eco96nzn4Kd8wYYXSEj/SsQ Zlv8o76a5a5Gd8xAwVIwv7RsnKj2d2BCRQC7F6TIJRIdKTepWEsz9krq2zFChxNPOWzP X5cVLdCkOqh6P4p0nmis3K9yxbCoT+52EvwdGHS3K9oM/ck1D3u1zVH23YxQxp3lmqfj ZlEDnlPr+fs5u9KPV18nlPGm3JlitbQN3ey7Dhvw/G+KYRQJvudBW/7QISQ1wB7c0RRe KU3w== X-Gm-Message-State: APjAAAUvcO2qsvUjnkmyIZIxCMXoFvP0rgdzjmFiasfIzuB67gRTCC5z NYivo5CC+g0uX7X+IwrGTixwXN56k8YclQ== X-Received: by 2002:a19:6a09:: with SMTP id u9mr2022744lfu.91.1568725868337; Tue, 17 Sep 2019 06:11:08 -0700 (PDT) Received: from ?IPv6:2a02:17d0:4a6:5700::72c? ([2a02:17d0:4a6:5700::72c]) by smtp.googlemail.com with ESMTPSA id o18sm429465lfb.25.2019.09.17.06.11.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Sep 2019 06:11:06 -0700 (PDT) Subject: Re: Linux 5.3-rc8 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> From: "Alexander E. Patrakov" Message-ID: <6601569a-f339-bc2c-0459-5548a21d0595@gmail.com> Date: Tue, 17 Sep 2019 18:11:04 +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: <20190917121156.GC6762@mit.edu> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms040309000700070503000406" 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. --------------ms040309000700070503000406 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-PH Content-Transfer-Encoding: quoted-printable 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. The first option is we take > functionality away from a userspace author who Really Wants A Secure > Random Number Generator. And there are an awful lot of programs who > really want secure crypto, becuase this is not a hypothetical. The > result in "Mining your P's and Q's" did happen before. If we forget > the history, we are doomed to repeat it. 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=20 is blocked on application FOO", followed by an insecure fallback to=20 /dev/urandom in the said application or library. 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. 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 must = share exactly one of their prime factors. In other words: repeated keys=20 were specifically excluded from the study by the paper authors. 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 = 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 CSPRNG = 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=20 as bad as a factorable one), or in completely unrelated keys. --=20 Alexander E. Patrakov --------------ms040309000700070503000406 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 GzAZBgNVBAMMEnBhdHJha292QGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC AQoCggEBAOA0sb1ubDnIK32rbgW3BnjBcx1pYuEFOCU6aPVJ2gU+wtKJgAo9IdVUXG6kC1fF hXjIcZHOgbEqzFjHK1yXlHIUWEv+N8KdmBDOK1UdKQj58d9A4hnH62iEiwQsOR5YT1UyHX4A pfMjsBja7254cixR4jOPzfA4YUD6JTTPioyjDwuYQlhweVyXziK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