summaryrefslogtreecommitdiff
path: root/chip
diff options
context:
space:
mode:
authorMarius Schilder <mschilder@google.com>2018-01-03 20:20:08 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-01-04 12:31:29 -0800
commit5c8b6391e48864b4c0faf2e1b08124471895817c (patch)
tree0b75fa73d9d463dd656e9d83a184ec7e9b052ac0 /chip
parentf1631210397f2db38ed20aa21c44bc0f9d2bd97f (diff)
downloadchrome-ec-5c8b6391e48864b4c0faf2e1b08124471895817c.tar.gz
g: allow for other values of RSA_MAX_BYTES
Some dependent projects need larger than 2K RSA computation. Allow their board.h to pre-define RSA_MAX_BYTES to suit their needs. BRANCH=none TEST=make buildall Change-Id: Ia00def60ea359e150285e7851a462531f40f5b18 Reviewed-on: https://chromium-review.googlesource.com/849756 Commit-Ready: Marius Schilder <mschilder@chromium.org> Tested-by: Marius Schilder <mschilder@chromium.org> Reviewed-by: Marius Schilder <mschilder@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r--chip/g/dcrypto/dcrypto.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/chip/g/dcrypto/dcrypto.h b/chip/g/dcrypto/dcrypto.h
index e964288f84..2d050ff6d7 100644
--- a/chip/g/dcrypto/dcrypto.h
+++ b/chip/g/dcrypto/dcrypto.h
@@ -144,7 +144,9 @@ void DCRYPTO_bn_wrap(struct LITE_BIGNUM *b, void *buf, size_t len);
#define RSA_BYTES_4K 512
#define RSA_WORDS_2K (RSA_BYTES_2K / sizeof(uint32_t))
#define RSA_WORDS_4K (RSA_BYTES_4K / sizeof(uint32_t))
+#ifndef RSA_MAX_BYTES
#define RSA_MAX_BYTES RSA_BYTES_2K
+#endif
#define RSA_MAX_WORDS (RSA_MAX_BYTES / sizeof(uint32_t))
#define RSA_F4 65537