diff options
| author | Hannes Reinecke <hare@kernel.org> | 2025-02-24 13:38:10 +0100 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2025-03-20 16:53:53 -0700 |
| commit | 5c12a9cdb5ad54621f1b7c02df7993a4a1b86a46 (patch) | |
| tree | f31d16a16bc55de8cdc9ad8a98d87cbbe117e93e /include/linux/nvme-auth.h | |
| parent | 3241cd0c6c17919b5b984c6b770ced3d797ddc4c (diff) | |
| download | linux-next-5c12a9cdb5ad54621f1b7c02df7993a4a1b86a46.tar.gz linux-next-5c12a9cdb5ad54621f1b7c02df7993a4a1b86a46.zip | |
nvme: add nvme_auth_generate_psk()
Add a function to generate a NVMe PSK from the shared credentials
negotiated by DH-HMAC-CHAP.
Signed-off-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'include/linux/nvme-auth.h')
| -rw-r--r-- | include/linux/nvme-auth.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/nvme-auth.h b/include/linux/nvme-auth.h index c1d0bc5d9624..b13884b04dfd 100644 --- a/include/linux/nvme-auth.h +++ b/include/linux/nvme-auth.h @@ -40,5 +40,8 @@ int nvme_auth_gen_pubkey(struct crypto_kpp *dh_tfm, int nvme_auth_gen_shared_secret(struct crypto_kpp *dh_tfm, u8 *ctrl_key, size_t ctrl_key_len, u8 *sess_key, size_t sess_key_len); +int nvme_auth_generate_psk(u8 hmac_id, u8 *skey, size_t skey_len, + u8 *c1, u8 *c2, size_t hash_len, + u8 **ret_psk, size_t *ret_len); #endif /* _NVME_AUTH_H */ |
