From 3e566818f747baa135e1b693ab2ab67fe4f942e2 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 2 Dec 2025 13:13:01 +0000 Subject: [crypto] Remove obsolete maximum output length method Now that public-key algorithms use ASN.1 builders to dynamically allocate the output data, there is no further need for callers to be able to determine the maximum output length. Signed-off-by: Michael Brown --- src/include/ipxe/crypto.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/include') diff --git a/src/include/ipxe/crypto.h b/src/include/ipxe/crypto.h index 68bd23048..ee63423c9 100644 --- a/src/include/ipxe/crypto.h +++ b/src/include/ipxe/crypto.h @@ -121,12 +121,6 @@ struct cipher_algorithm { struct pubkey_algorithm { /** Algorithm name */ const char *name; - /** Calculate maximum output length - * - * @v key Key - * @ret max_len Maximum output length - */ - size_t ( * max_len ) ( const struct asn1_cursor *key ); /** Encrypt * * @v key Key @@ -266,12 +260,6 @@ is_auth_cipher ( struct cipher_algorithm *cipher ) { return cipher->authsize; } -static inline __attribute__ (( always_inline )) size_t -pubkey_max_len ( struct pubkey_algorithm *pubkey, - const struct asn1_cursor *key ) { - return pubkey->max_len ( key ); -} - static inline __attribute__ (( always_inline )) int pubkey_encrypt ( struct pubkey_algorithm *pubkey, const struct asn1_cursor *key, const struct asn1_cursor *plaintext, @@ -325,7 +313,6 @@ extern void cipher_null_decrypt ( void *ctx, const void *src, void *dst, size_t len ); extern void cipher_null_auth ( void *ctx, void *auth ); -extern size_t pubkey_null_max_len ( const struct asn1_cursor *key ); extern int pubkey_null_encrypt ( const struct asn1_cursor *key, const struct asn1_cursor *plaintext, struct asn1_builder *ciphertext ); -- cgit v1.2.3-55-g7522