diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2023-06-15 12:28:48 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-06-23 10:15:36 +0200 |
commit | 6cb8815f41a966b217c0d9826c592254d72dcc31 (patch) | |
tree | ddad1988bbe9ec6050e10eeecf2f456039b8bb3c /include/crypto/internal | |
parent | crypto: akcipher - Add sync interface without SG lists (diff) | |
download | linux-6cb8815f41a966b217c0d9826c592254d72dcc31.tar.xz linux-6cb8815f41a966b217c0d9826c592254d72dcc31.zip |
crypto: sig - Add interface for sign/verify
Split out the sign/verify functionality from the existing akcipher
interface. Most algorithms in akcipher either support encryption
and decryption, or signing and verify. Only one supports both.
As a signature algorithm may not support encryption at all, these
two should be spearated.
For now sig is simply a wrapper around akcipher as all algorithms
remain unchanged. This is a first step and allows users to start
allocating sig instead of akcipher.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/internal')
-rw-r--r-- | include/crypto/internal/sig.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/crypto/internal/sig.h b/include/crypto/internal/sig.h new file mode 100644 index 000000000000..97cb26ef8115 --- /dev/null +++ b/include/crypto/internal/sig.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Public Key Signature Algorithm + * + * Copyright (c) 2023 Herbert Xu <herbert@gondor.apana.org.au> + */ +#ifndef _CRYPTO_INTERNAL_SIG_H +#define _CRYPTO_INTERNAL_SIG_H + +#include <crypto/algapi.h> +#include <crypto/sig.h> + +static inline void *crypto_sig_ctx(struct crypto_sig *tfm) +{ + return crypto_tfm_ctx(&tfm->base); +} +#endif |