[Gnuk-users] [PATCH] linker script: fix keystore_pool size
Aurelien Jarno
aurelien at aurel32.net
Wed Oct 18 21:40:16 UTC 2017
Gnuk supports RSA keys up to 4096 bits. This require 1024 bytes of
storage (p and q are 256 bytes, n is 512 bytes). The linker script
should therefore reserve 1024 bytes per key instead of 512.
In practice it's not an issue at all as all supported MCU have a page
size bigger than 1024 bytes and Gnuk use one page per key.
---
src/gnuk.ld.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gnuk.ld.in b/src/gnuk.ld.in
index ce17ccf..b086e8a 100644
--- a/src/gnuk.ld.in
+++ b/src/gnuk.ld.in
@@ -136,11 +136,11 @@ SECTIONS
{
. = ALIGN (@FLASH_PAGE_SIZE@);
_keystore_pool = .;
- . += 512;
+ . += 1024;
. = ALIGN(@FLASH_PAGE_SIZE@);
- . += 512;
+ . += 1024;
. = ALIGN(@FLASH_PAGE_SIZE@);
- . += 512;
+ . += 1024;
. = ALIGN(@FLASH_PAGE_SIZE@);
_updatekey_store = .;
. += 1024;
--
2.14.2
More information about the gnuk-users
mailing list