aboutsummaryrefslogtreecommitdiff
path: root/hal_internal.h
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-09-16 15:29:18 -0400
committerRob Austein <sra@hactrn.net>2016-09-16 15:29:18 -0400
commit95b79e109be2c7d85ed965e5dcf190420ae7be19 (patch)
tree593733b41fd5c2ffbdd48319af65aa8a8a3e469a /hal_internal.h
parente99f94d6b77641fc21830e14ef0df46766573bc4 (diff)
Debug new ks_flash code.
Diffstat (limited to 'hal_internal.h')
-rw-r--r--hal_internal.h9
1 files changed, 8 insertions, 1 deletions
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.