Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp993010imu; Tue, 20 Nov 2018 09:55:48 -0800 (PST) X-Google-Smtp-Source: AFSGD/VpgEnzgcuIpPXVGkc8wQRmBW5IyIhNAwcSbK4fTkEdzQi35wOwgimm54twvQR5ZWUGtFCF X-Received: by 2002:a17:902:b689:: with SMTP id c9-v6mr3306160pls.306.1542736548265; Tue, 20 Nov 2018 09:55:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542736548; cv=none; d=google.com; s=arc-20160816; b=pAgU/d5tY0BHnuXM1EAqicnFwH/7X9G41SSGQdsK213DX3jUMfDHcMHl6GSBUmf73y 4dNSWTO5ukIe6yGKWzwOTs6KWea1M34CGwYItYOLyyMqM8j9QnnxgWOXOSc+ZAwsAT8I /YX5PgJ8wEf2Ml+mO06JNjCXvAvJFhUcx9P20mbitBRjONXuNc0qvXqW9EB90mouGN4S XOcPDrtCftzr0L3eIdwaYSbpP30DRIQ5G4z9uYf3NzCbdPJO0UP8QGmMFiuv0DzgeTgC rLT5ew8O19nOu3cJ6+Xqsdw6aizmB1FCYlvDg3ZmADTo0dwvHmT0uK9jk/2AHL4ZnozO La6A== 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=hCaXszUv7XcrI53F37e6N62f+3ZWAqGswhFfCNL4lfw=; b=g8ybVLlGjopAzuSjZ/WI9BSrmN34cQ+bh0sdgu1SgbzaiHi31fNXm/osXrGqyEuCfM whTboW5P4/ix9okC21ngbBY769XKPZdrDI124EJ30zbC29jIKv0Rr14KbjnhUkXPOH0k 8Tp+Xkaz6xEsWphevRz/cWxqzWQgoCC2mpBGsNBatx1NK7hqGOzurn8HcMKK4JQu9rvj Te7bdH1wF+DvFy3BJLfuNZhsAT7LaVn/bwGYdYD+Fsj8gikakegL1TIYGuuF+qnQKEuz qOWSlTFPqg+nbT2acNRsPkzs5fnTIOE2iMMWnXJtPqZU/wSa5FGhQgkAGQLa2ePb7SPM u0Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=lXK92bKd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w11si33705430pgp.161.2018.11.20.09.55.34; Tue, 20 Nov 2018 09:55:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@zx2c4.com header.s=mail header.b=lXK92bKd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729107AbeKUCyx (ORCPT + 99 others); Tue, 20 Nov 2018 21:54:53 -0500 Received: from frisell.zx2c4.com ([192.95.5.64]:45373 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725904AbeKUCyw (ORCPT ); Tue, 20 Nov 2018 21:54:52 -0500 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id d140d4f1; Tue, 20 Nov 2018 16:18:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=7Q0jnRYteL0t9N+lomKk7N6MQHc=; b=lXK92b KdOEBx7FOJ9V734LApNY7qUIJqbq9oPvch+B9eHyulkBC68S6Oy/WX7HxN/KhGUQ qAGHVzQYwqfJx4Hxx+Gqi/3Ak72ACswW4LNUZdjw+2xO3YqpxutOaAYwU8ybVKis iopjsc0K/yLCTD8R4SSYLH27RvRXHmeUy5vIdLitEK25cu97Av2Z9P+wjzFJsUqF bEeodZXG+6HwAyn3AYMR8HFCwpj2F2pgBRXavYc7sekLiVe6Q7OCXjlo0eMhk7b8 QnICpWZuwWt+mmv6KL6yXsBpedsEJBFciIu2DbVQ8uwBhX1mCRYCgvSvw7Ff0usL uWZJ9bMip4hEXBoA== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id c7c277b0 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Tue, 20 Nov 2018 16:18:45 +0000 (UTC) Received: by mail-oi1-f181.google.com with SMTP id b141so1948111oii.12; Tue, 20 Nov 2018 08:24:53 -0800 (PST) X-Gm-Message-State: AA+aEWZTcDF/K+EcZSTOTLiUOBpcq2WbfK3qvHrxwkCT8UsQ4Q3M6Wnh 0tGJSwXIapdX6G8rhtzW3NSnbdhYMFn7d3NQonM= X-Received: by 2002:aca:3f87:: with SMTP id m129-v6mr1370041oia.228.1542731093111; Tue, 20 Nov 2018 08:24:53 -0800 (PST) MIME-Version: 1.0 References: <20181105232526.173947-1-ebiggers@kernel.org> <20181105232526.173947-11-ebiggers@kernel.org> <20181112185816.GA8663@gmail.com> <20181116060227.hwu4igi6bp26ddpi@gondor.apana.org.au> <20181117001718.GA175522@gmail.com> <20181119052451.qttzfgcm4hvbdc4u@gondor.apana.org.au> <20181120060217.t4nccaqpwnxkl4tx@gondor.apana.org.au> <20181120141850.zjmfwcari5kykk6y@gondor.apana.org.au> In-Reply-To: <20181120141850.zjmfwcari5kykk6y@gondor.apana.org.au> From: "Jason A. Donenfeld" Date: Tue, 20 Nov 2018 17:24:41 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2 0/4] Exporting existing crypto API code through zinc To: Herbert Xu Cc: Ard Biesheuvel , Eric Biggers , Linux Crypto Mailing List , linux-fscrypt@vger.kernel.org, linux-arm-kernel@lists.infradead.org, LKML , Paul Crowley , Greg Kaiser , Samuel Neves , Tomer Ashur , Martin Willi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 20, 2018 at 3:19 PM Herbert Xu wrote: > Yes. In fact it's used for FIPS certification testing. > Sure, nobody sane should be doing it. But when it comes to > government certification... :) The kernel does not aim toward any FIPS certification, and we're not going to start bloating our designs to fulfill this. It's never been a goal. Maybe ask Ted to add a FIPS mode to random.c and see what happens... When you start arguing "because FIPS!" as your justification, you really hit a head scratcher. > They've already paid for the indirect > function call so why make them go through yet another run-time > branch? The indirect function call in the crypto API is the performance hit. The branch in Zinc is not, as the predictor does the correct thing every single time. I'm not able to distinguish between the two looking at the performance measurements between it being there and the branch being commented out. Give me a few more days to finish v9's latest required changes for chacha12, and then I'll submit a revision that I think should address the remaining technical objections raised over the last several months we've been discussing this. Regards, Jason