mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <20180413154840.5901-6-4bwarnke@informatik.uni-hamburg.de> (raw)
In-Reply-To: <20180413154840.5901-1-4bwarnke@informatik.uni-hamburg.de>

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

  parent reply	other threads:[~2018-04-13 15:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13 15:48 [PATCH v7 0/5] add compression algorithm zBeWalgo Benjamin Warnke
2018-04-13 15:48 ` [PATCH v7 1/5] " Benjamin Warnke
2018-04-13 15:48 ` [PATCH v7 2/5] crypto: add zBeWalgo to crypto-api Benjamin Warnke
2018-04-13 15:48 ` [PATCH v7 3/5] crypto: add unsafe decompression to api Benjamin Warnke
2018-04-13 15:48 ` [PATCH v7 4/5] crypto: configurable compression level Benjamin Warnke
2018-04-13 15:48 ` Benjamin Warnke [this message]
2018-04-20  7:33 ` [PATCH v7 0/5] add compression algorithm zBeWalgo Minchan Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180413154840.5901-6-4bwarnke@informatik.uni-hamburg.de \
    --to=4bwarnke@informatik.uni-hamburg.de \
    --cc=davem@davemloft.net \
    --cc=ebiggers3@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --cc=pombredanne@nexb.com \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=smueller@chronox.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®