diff options
author | Joonas Lahtinen <joonas.lahtinen@linux.intel.com> | 2022-04-12 10:28:42 +0200 |
---|---|---|
committer | Joonas Lahtinen <joonas.lahtinen@linux.intel.com> | 2022-04-12 10:28:42 +0200 |
commit | c16c8bfa09d5f318c1bd65698d058d3739970c24 (patch) | |
tree | a3ac5a1cad695c93d698cfff0b7629fd1a2ff79c /include/crypto/dh.h | |
parent | drm/i915: Sunset igpu legacy mmap support based on GRAPHICS_VER_FULL (diff) | |
parent | Merge tag 'drm-misc-next-2022-04-07' of git://anongit.freedesktop.org/drm/drm... (diff) | |
download | linux-c16c8bfa09d5f318c1bd65698d058d3739970c24.tar.xz linux-c16c8bfa09d5f318c1bd65698d058d3739970c24.zip |
Merge drm/drm-next into drm-intel-gt-next
Pull in TTM changes needed for DG2 CCS enabling from Ram.
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'include/crypto/dh.h')
-rw-r--r-- | include/crypto/dh.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/include/crypto/dh.h b/include/crypto/dh.h index d71e9858ab86..7b863e911cb4 100644 --- a/include/crypto/dh.h +++ b/include/crypto/dh.h @@ -24,21 +24,17 @@ * * @key: Private DH key * @p: Diffie-Hellman parameter P - * @q: Diffie-Hellman parameter Q * @g: Diffie-Hellman generator G * @key_size: Size of the private DH key * @p_size: Size of DH parameter P - * @q_size: Size of DH parameter Q * @g_size: Size of DH generator G */ struct dh { - void *key; - void *p; - void *q; - void *g; + const void *key; + const void *p; + const void *g; unsigned int key_size; unsigned int p_size; - unsigned int q_size; unsigned int g_size; }; @@ -83,4 +79,20 @@ int crypto_dh_encode_key(char *buf, unsigned int len, const struct dh *params); */ int crypto_dh_decode_key(const char *buf, unsigned int len, struct dh *params); +/** + * __crypto_dh_decode_key() - decode a private key without parameter checks + * @buf: Buffer holding a packet key that should be decoded + * @len: Length of the packet private key buffer + * @params: Buffer allocated by the caller that is filled with the + * unpacked DH private key. + * + * Internal function providing the same services as the exported + * crypto_dh_decode_key(), but without any of those basic parameter + * checks conducted by the latter. + * + * Return: -EINVAL if buffer has insufficient size, 0 on success + */ +int __crypto_dh_decode_key(const char *buf, unsigned int len, + struct dh *params); + #endif |