/usr/src/kernels/4.18.0-553.121.1.el8_10.x86_64/include/crypto
NameSizeModeActions
internal/-0755rm
acompress.h81200644editdlrm
aead.h187290644editdlrm
aes.h10580644editdlrm
akcipher.h119890644editdlrm
algapi.h121630644editdlrm
arc4.h4840644editdlrm
authenc.h8450644editdlrm
b128ops.h24710644editdlrm
blowfish.h4150644editdlrm
cast5.h5900644editdlrm
cast6.h6360644editdlrm
cast_common.h2320644editdlrm
cbc.h35620644editdlrm
chacha20.h6380644editdlrm
cryptd.h25620644editdlrm
crypto_wq.h1610644editdlrm
ctr.h16660644editdlrm
des.h14030644editdlrm
dh.h27840644editdlrm
drbg.h91600644editdlrm
ecdh.h27330644editdlrm
engine.h42020644editdlrm
gcm.h1400644editdlrm
gf128mul.h96470644editdlrm
ghash.h3810644editdlrm
hash.h333860644editdlrm
hash_info.h11530644editdlrm
hmac.h1730644editdlrm
if_alg.h71280644editdlrm
kpp.h99260644editdlrm
md5.h4970644editdlrm
morus640_glue.h45850644editdlrm
morus1280_glue.h46470644editdlrm
morus_common.h7200644editdlrm
null.h3410644editdlrm
padlock.h6490644editdlrm
pcrypt.h14350644editdlrm
pkcs7.h13880644editdlrm
poly1305.h9200644editdlrm
public_key.h21260644editdlrm
rng.h68200644editdlrm
scatterwalk.h47320644editdlrm
serpent.h7120644editdlrm
sha.h43500644editdlrm
sha1_base.h25320644editdlrm
sha3.h8790644editdlrm
sha256_base.h26290644editdlrm
sha512_base.h32710644editdlrm
skcipher.h233810644editdlrm
sm3.h8330644editdlrm
sm3_base.h30240644editdlrm
sm4.h7540644editdlrm
speck.h13570644editdlrm
twofish.h7550644editdlrm
xts.h13850644editdlrm
Edit: /usr/src/kernels/4.18.0-553.121.1.el8_10.x86_64/include/crypto/dh.h (2784B)
/* * Diffie-Hellman secret to be used with kpp API along with helper functions * * Copyright (c) 2016, Intel Corporation * Authors: Salvatore Benedetto * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * */ #ifndef _CRYPTO_DH_ #define _CRYPTO_DH_ /** * DOC: DH Helper Functions * * To use DH with the KPP cipher API, the following data structure and * functions should be used. * * To use DH with KPP, the following functions should be used to operate on * a DH private key. The packet private key that can be set with * the KPP API function call of crypto_kpp_set_secret. */ /** * struct dh - define a DH private key * * @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; unsigned int key_size; unsigned int p_size; unsigned int q_size; unsigned int g_size; }; /** * crypto_dh_key_len() - Obtain the size of the private DH key * @params: private DH key * * This function returns the packet DH key size. A caller can use that * with the provided DH private key reference to obtain the required * memory size to hold a packet key. * * Return: size of the key in bytes */ unsigned int crypto_dh_key_len(const struct dh *params); /** * crypto_dh_encode_key() - encode the private key * @buf: Buffer allocated by the caller to hold the packet DH * private key. The buffer should be at least crypto_dh_key_len * bytes in size. * @len: Length of the packet private key buffer * @params: Buffer with the caller-specified private key * * The DH implementations operate on a packet representation of the private * key. * * Return: -EINVAL if buffer has insufficient size, 0 on success */ int crypto_dh_encode_key(char *buf, unsigned int len, const struct dh *params); /** * crypto_dh_decode_key() - decode a private key * @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. * * The unpacking obtains the private key by pointing @p to the correct location * in @buf. Thus, both pointers refer to the same memory. * * 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