From 95b79e109be2c7d85ed965e5dcf190420ae7be19 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Fri, 16 Sep 2016 15:29:18 -0400 Subject: Debug new ks_flash code. --- hal_internal.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'hal_internal.h') diff --git a/hal_internal.h b/hal_internal.h index e779168..ade908f 100644 --- a/hal_internal.h +++ b/hal_internal.h @@ -306,9 +306,16 @@ static inline hal_crc32_t hal_crc32_finalize(hal_crc32_t crc) * * Plus we need a bit of AES-keywrap overhead, since we're storing the * wrapped form (see hal_aes_keywrap_cyphertext_length()). + * + * A buffer big enough for a 8192-bit RSA key would overflow one + * sub-sector on the flash chip we're using on the Alpha. We could + * invent some more complex scheme where key blocks are allowed to + * span multiple sub-sectors, but since an 8192-bit RSA key would also + * be unusably slow with the current RSA implementation, for the + * moment we take the easy way out and cap this at 4096-bit RSA. */ -#define HAL_KS_WRAPPED_KEYSIZE ((4655 + 15) & ~7) +#define HAL_KS_WRAPPED_KEYSIZE ((2351 + 15) & ~7) /* * PINs. -- cgit v1.2.3