Received: by 10.192.165.156 with SMTP id m28csp847884imm; Fri, 13 Apr 2018 08:52:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+S7X6bWErc7r1Yjhjn408ApJhhOD2zksnYWqXzi64zOntJhGlB3Qf66dIguflZz0NBbORZ X-Received: by 10.98.138.154 with SMTP id o26mr11980457pfk.82.1523634755455; Fri, 13 Apr 2018 08:52:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523634755; cv=none; d=google.com; s=arc-20160816; b=cKrHayx6e5PhrOv4NVJ33IUrOsrAt+p+rc0aQSN56kzyEmCPsL0fteuM17OPJVVHFy nMjfjvlu4TrrIx8KcnA7yXPw0FEBAUZNyB96vwWKORAnlVtJ49VFRXCoisjicC/Sd6Rx 9/x1/l4mHHiurFLIwNGwTnBjdQMCBHdDd5ZXB0PtYkRk8HyVPRly+P2dc0vEb6PMRJ+Z 1PCRDVp6Qyj0Of5G3HcCtsi1y4BjzTTQqHBp3oV5wtnnapHPhKqG9Sh2P3b9NlJ04vjz MVelqkL//XcfLgopdnpki0nPGeKw+w33HXxCTl0Jh4x9SjwEjP6NZcdezvJHB+9r0KWz VLSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=8HJJQ05QQmYKLYv5xs6UXamioMawcHnD0qL5TEHlD9o=; b=M4a6cBb/ILwUxCvyl7JqkSVZLN1ZIxVRtSf/w5V9vF0Fq8AwftqoBHlwPykFjXbrp2 CMwm4+wnE/O9jc0Ed+ZfHoVpzBzESgVWD8KbAMvq0P8iBg8phAmhaIMREfE0gesydx4v OlFq5ddoEFcfDMu8KwJZSCq8SWrWN6yZgpvEzFqmv6P4bwXeNGsaECU79fcUfyPnTusZ 3dwSgXtb87goLpTAxd4USxO5hKFs2qRHry5AwBB3Kz22zF8TmbxrMEiEidlKa5QGI6ko eY40FRk4r0utJXKCED2PT5DI8Ljq7AJbJk+oomoMAqQTpUhMLdLLhscDagieIN58p0iv 7dbQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6-v6si5707996plt.445.2018.04.13.08.52.21; Fri, 13 Apr 2018 08:52:35 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751864AbeDMPth (ORCPT + 99 others); Fri, 13 Apr 2018 11:49:37 -0400 Received: from mailhost.informatik.uni-hamburg.de ([134.100.9.70]:34612 "EHLO mailhost.informatik.uni-hamburg.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751299AbeDMPta (ORCPT ); Fri, 13 Apr 2018 11:49:30 -0400 Received: from localhost (localhost [127.0.0.1]) by mailhost.informatik.uni-hamburg.de (Postfix) with ESMTP id 65E77C32; Fri, 13 Apr 2018 17:49:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at informatik.uni-hamburg.de Received: from mailhost.informatik.uni-hamburg.de ([127.0.0.1]) by localhost (mailhost.informatik.uni-hamburg.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rvPta3A7ttbb; Fri, 13 Apr 2018 17:49:15 +0200 (CEST) Received: from benjamin0.fritz.box (port-34998.pppoe.wtnet.de [46.59.187.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: 4bwarnke) by mailhost.informatik.uni-hamburg.de (Postfix) with ESMTPSA id 000F0C2D; Fri, 13 Apr 2018 17:49:14 +0200 (CEST) From: Benjamin Warnke <4bwarnke@informatik.uni-hamburg.de> To: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, minchan@kernel.org, sergey.senozhatsky.work@gmail.com, ngupta@vflare.org, pombredanne@nexb.com, ebiggers3@gmail.com, smueller@chronox.de Cc: Benjamin Warnke <4bwarnke@informatik.uni-hamburg.de> Subject: [PATCH v7 5/5] crypto: add flag for unstable encoding Date: Fri, 13 Apr 2018 17:48:40 +0200 Message-Id: <20180413154840.5901-6-4bwarnke@informatik.uni-hamburg.de> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180413154840.5901-1-4bwarnke@informatik.uni-hamburg.de> References: <20180413154840.5901-1-4bwarnke@informatik.uni-hamburg.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The data-format of zBeWalgo, and some other algorithms is unstable. To identify such unstable algorithms this patch adds a new flag to the crypto-api. Signed-off-by: Benjamin Warnke <4bwarnke@informatik.uni-hamburg.de> --- crypto/zbewalgo.c | 2 +- include/linux/crypto.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/crypto/zbewalgo.c b/crypto/zbewalgo.c index 9db0d43b..e57b5ced 100644 --- a/crypto/zbewalgo.c +++ b/crypto/zbewalgo.c @@ -134,7 +134,7 @@ static int zbewalgo_decompress_crypto_unsafe(struct crypto_tfm *tfm, static struct crypto_alg crypto_alg_zbewalgo = { .cra_name = "zbewalgo", - .cra_flags = CRYPTO_ALG_TYPE_COMPRESS, + .cra_flags = CRYPTO_ALG_TYPE_COMPRESS | CRYPTO_ALG_UNSTABLE_ENCODING, .cra_ctxsize = sizeof(struct zbewalgo_ctx), .cra_module = THIS_MODULE, .cra_init = zbewalgo_init, diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 6bfb1aea..2228dd08 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -112,6 +112,12 @@ */ #define CRYPTO_ALG_OPTIONAL_KEY 0x00004000 +/* + * Set if the algorithm is new and it is likely that the encoding may + * change in near future + */ +#define CRYPTO_ALG_UNSTABLE_ENCODING 0x00008000 + /* * Transform masks and values (for crt_flags). */ -- 2.14.1