diff options
| author | NIIBE Yutaka <[email protected]> | 2025-05-22 05:34:05 +0000 |
|---|---|---|
| committer | NIIBE Yutaka <[email protected]> | 2025-05-22 05:34:05 +0000 |
| commit | 04782e7fd62923db8f4565bca2adc6cc349f667a (patch) | |
| tree | beac226345b464d7813c6e1c687e61f2e253d098 /agent/agent.h | |
| parent | agent: Finish ECC KEM, adding support for NIST curves. (diff) | |
| download | gnupg-04782e7fd62923db8f4565bca2adc6cc349f667a.tar.gz gnupg-04782e7fd62923db8f4565bca2adc6cc349f667a.zip | |
agent: Add support for TPM2 for ECC KEM.
* agent/agent.h (agent_tpm2d_ecc_kem): New.
* agent/divert-tpm2.c (agent_tpm2d_ecc_kem): New.
* agent/pkdecrypt.c (ecc_pgp_kem_decap): Call agent_tpm2d_ecc_kem.
--
GnuPG-bug-id: 7649
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'agent/agent.h')
| -rw-r--r-- | agent/agent.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/agent/agent.h b/agent/agent.h index 5d426f6b8..e891981b2 100644 --- a/agent/agent.h +++ b/agent/agent.h @@ -655,6 +655,9 @@ int divert_tpm2_pkdecrypt (ctrl_t ctrl, char **r_buf, size_t *r_len, int *r_padding); int divert_tpm2_writekey (ctrl_t ctrl, const unsigned char *grip, gcry_sexp_t s_skey); +int agent_tpm2d_ecc_kem (ctrl_t ctrl, const unsigned char *shadow_info, + const unsigned char *ecc_ct, + size_t ecc_point_len, unsigned char *ecc_ecdh); #else /*!HAVE_LIBTSS*/ static inline int divert_tpm2_pksign (ctrl_t ctrl, @@ -686,6 +689,16 @@ divert_tpm2_writekey (ctrl_t ctrl, const unsigned char *grip, (void)ctrl; (void)grip; (void)s_skey; return gpg_error (GPG_ERR_NOT_SUPPORTED); } + +static inline int +agent_tpm2d_ecc_kem (ctrl_t ctrl, const unsigned char *shadow_info, + const unsigned char *ecc_ct, + size_t ecc_point_len, unsigned char *ecc_ecdh) +{ + (void)ctrl; (void)ecc_ct; + (void)ecc_point_len; (void)ecc_ecdh; + return gpg_error (GPG_ERR_NOT_SUPPORTED); +} #endif /*!HAVE_LIBTSS*/ |
