Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp924325ybp; Fri, 4 Oct 2019 07:06:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfj0FZSh/Z/BX4e9t2AHI6lNSeBk4ZZkRwyWzZb+0H5/zrQ+DfTi95QL9kaxsihP9IbQ3H X-Received: by 2002:a05:6402:a48:: with SMTP id bt8mr15363978edb.298.1570198018341; Fri, 04 Oct 2019 07:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570198018; cv=none; d=google.com; s=arc-20160816; b=q8SBMZh+CA7PJsK5SOu6ZcGhd253C0iVzy+dsegw3fQ8HN9j1rEzQHva3Okct/QSg6 G+bMz8GUcU4+y3+U8n1PFobI0eX7iqiO0wRWjLY4Pc5/QTcln3Vaqtw5596gaWudsZiP W3EOGw/BDzzi6Y1bhsyP108PC44Xr3re7sKuwtye/uB2JqDDqCCotauqKNTCtJBm4nTh fqbk6bqHwk/4PQvrvF9A5vYnCqMEtj4zsrtjViWkfDx3XD0hjLlB58KFkzmfuueDBckQ t5GtIK3f3u8S81XryEyz24v5xiuzrvKjI1gZ4ejKcJonKlywkLHZYYYqHzgWuo1Dcaqj Oiaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Er4SXIgxcEE4aax8T96FM3625i+T61N4koZmZMdahiY=; b=U/cNqC77nqz/q4tn8ygKWo24zDmWe1ZipdIYDHOOjl1w9UiGI0DLgcl9rpo8DcUlEV KEmEUkBXJH49Spbv3nXaKbjY3NpBDGlkYzO5GjXzHopZ5Yop5ijGUb/pxujCMEt2Qnja 6wM0QWb/m9Gy/fz9O97RIEXEdW+eySl1KELuagxzxNQpg7vEC85/SmMIuFyBJYm/6NDE i2rWEUfN5314KvjEtExYStU1oE/z8olRqOIo5ZFKxTc+HP3/vong82tcYvaI5YBJ8k5I s0r91STQOYy++8R6YA5sKvKGbTljACTQthUIo9zfaEUa1Qq7B3GkWMWZnUYON6yBGbBd v0wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P1Gz0jPO; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j14si3508492eda.181.2019.10.04.07.06.32; Fri, 04 Oct 2019 07:06:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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=@linaro.org header.s=google header.b=P1Gz0jPO; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388960AbfJDODP (ORCPT + 99 others); Fri, 4 Oct 2019 10:03:15 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37432 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388197AbfJDODP (ORCPT ); Fri, 4 Oct 2019 10:03:15 -0400 Received: by mail-wr1-f68.google.com with SMTP id p14so6424175wro.4 for ; Fri, 04 Oct 2019 07:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Er4SXIgxcEE4aax8T96FM3625i+T61N4koZmZMdahiY=; b=P1Gz0jPO/0QDPA+O8QhWsaRBWzJOIjWu5YAZFYoWor5mx3mVlq7r6ZDhWkJNudnBPm BMK+J8M6GcXZaefnaJP4WYSevLUnDQ36NiM8PUbNkshhkEPEI7yq/pqJZ/0jiqSNR6Xn mWYhoWjIzFjintOMIHoo7HkjjRz+Z/Xti4NueEtNmZLXqArM1Elqw7pOTB4MIPNYP0ZU d1PQ56Tuaho2BazpmXgHyGH9DIeegnKV1udKgIp6nb9wA/uR5n/OBVZK08Jpp54oE13S 74+K00H+EMq8nqtQDyWq87qw0M8RGGw5JFZdEsEMAbdMqRhNmvu24s+6llinmFv8FkwI y7CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Er4SXIgxcEE4aax8T96FM3625i+T61N4koZmZMdahiY=; b=JrMK4cISQ0B4TBMwQGRfAex0fIFI3R2DeK+qVsK2p0eWNUfBNGxUlvCOpls4N4dfhY QYYrqyBOMikfGVza4wzP37UNfSRD766djLPebP8aqtR1seCALG/sxZsrJeEEBMPMMycV Fwj4lze/N+RJPc1VT3PJBrc408ohcbnF//JGZ4t7E2ZvQO7lxTs7hVTea06HlXlt03Rk n5g0P1617N8T7fCHwHA9XHTb7nOPA5dxrTlOmqrg/iNJ/Nr+f0X/5FkmFN+Pqv0qqdf/ L52801f0WqiBfUTo9M1xNL8r5d9U6X2mbga/Z7/s/9fK/zPfAtog/9YZNwx3L1W1XQW6 lpbA== X-Gm-Message-State: APjAAAVZB/vjYeVZEpnm75WrJ+PWReMW1gQDPMEre6kaxXsjFQ3E8/Fc l7DxmWULE+1TD9XxVbwLpEIB5T4c9IslCAWw1pwWIw== X-Received: by 2002:a5d:61c8:: with SMTP id q8mr6169926wrv.325.1570197792258; Fri, 04 Oct 2019 07:03:12 -0700 (PDT) MIME-Version: 1.0 References: <20191002141713.31189-1-ard.biesheuvel@linaro.org> <20191002141713.31189-15-ard.biesheuvel@linaro.org> <20191004135750.GA114360@zx2c4.com> In-Reply-To: <20191004135750.GA114360@zx2c4.com> From: Ard Biesheuvel Date: Fri, 4 Oct 2019 16:03:00 +0200 Message-ID: Subject: Re: [PATCH v2 14/20] crypto: Curve25519 - generic C library implementations and selftest To: "Jason A. Donenfeld" Cc: "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , Herbert Xu , David Miller , Greg KH , Linus Torvalds , Samuel Neves , Dan Carpenter , Arnd Bergmann , Eric Biggers , Andy Lutomirski , Will Deacon , Marc Zyngier , Catalin Marinas , Martin Willi , Peter Zijlstra , Josh Poimboeuf Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, 4 Oct 2019 at 15:57, Jason A. Donenfeld wrote: > > On Wed, Oct 02, 2019 at 04:17:07PM +0200, Ard Biesheuvel wrote: > > - replace .c #includes with Kconfig based object selection > > Cool! > > > +config CRYPTO_ARCH_HAVE_LIB_CURVE25519 > > + tristate > > + > > +config CRYPTO_ARCH_HAVE_LIB_CURVE25519_BASE > > + bool > > + > > +config CRYPTO_LIB_CURVE25519 > > + tristate "Curve25519 scalar multiplication library" > > + depends on CRYPTO_ARCH_HAVE_LIB_CURVE25519 || !CRYPTO_ARCH_HAVE_LIB_CURVE25519 > > a || !a ==> true > > Did you mean for one of these to be _BASE? Or is this a Kconfig trick of > a different variety that's intentional? > This ensures that the base module is not builtin when the arch one is configured as a module, since in that case, the arch code never gets called. > > +libcurve25519-y := curve25519-fiat32.o > > +libcurve25519-$(CONFIG_ARCH_SUPPORTS_INT128) := curve25519-hacl64.o > > Nice idea.