From 1561030321a6a3c37e99938ab664e3a10defba4c Mon Sep 17 00:00:00 2001 From: denzo Date: Mon, 9 Oct 2017 15:20:09 +0100 Subject: [PATCH] some docs --- content/OTAESGCM/utility/OTAESGCM_OTAESGCM.h | 9 +++++++++ portableUnitTests/main.cpp | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/content/OTAESGCM/utility/OTAESGCM_OTAESGCM.h b/content/OTAESGCM/utility/OTAESGCM_OTAESGCM.h index 23f1720..e23fd59 100644 --- a/content/OTAESGCM/utility/OTAESGCM_OTAESGCM.h +++ b/content/OTAESGCM/utility/OTAESGCM_OTAESGCM.h @@ -29,7 +29,16 @@ Author(s) / Copyright (s): Deniz Erbilgin 2015--2017 #include "OTAESGCM_OTAES128.h" #include "OTAESGCM_OTAES128Impls.h" +// IF DEFINED: Allow encryption/decryption functions to take unpadded input. +// These are disabled by default as original implementation was incorrect, +// increased flash size and is unnecessary for the OT secure frame. #undef OTAESGCM_ALLOW_UNPADDED +// IF DEFINED: Enable non-workspace versions of AES128GCM. +// These are disabled by default as: +// - They make large (> 200 byte on AVR) stack allocations and are not +// recommended. +// - When included they prevent -Werror and -Wstack-usage being used together +// for static analysis of stack allocations. #undef OTAESGCM_ALLOW_NON_WORKSPACE // Use namespaces to help avoid collisions. diff --git a/portableUnitTests/main.cpp b/portableUnitTests/main.cpp index 3e9cfd3..2ebccf2 100644 --- a/portableUnitTests/main.cpp +++ b/portableUnitTests/main.cpp @@ -24,6 +24,13 @@ Author(s) / Copyright (s): Damon Hart-Davis 2016 #include #include + +// IF DEFINED: Enable non-workspace versions of AES128GCM. +// These are disabled by default as: +// - They make large (> 200 byte on AVR) stack allocations and are not +// recommended. +// - When included they prevent -Werror and -Wstack-usage being used together +// for static analysis of stack allocations. #undef OTAESGCM_ALLOW_NON_WORKSPACE // Sanity test.