@@ -693,7 +693,8 @@ compiler is not gcc/clang compatible, the user can modify the CFLAGS as well as
693693for 8-bit MCUs to 64-bit CPUs. If the toolchain does not have a [ ` stdint.h ` ] ( http://pubs.opengroup.org/onlinepubs/009695399/basedefs/stdint.h.html )
694694header, it is still possible to compile libecc by exporting LIBECC_NOSTDLIB=1: in this case, the code will try to
695695guess and fit to native C types or throw an error so that the user can adapt [ src/words/types.h] ( src/words/types.h ) to its specific case.
696- * The library core is platform independent. However, when the platform is not recognized (i.e. everything aside UNIX/Windows/Mac OS),
696+ * The library core is platform independent. However, when the platform is not recognized (i.e. everything aside UNIX/Windows/Mac OS)
697+ and when not compiled with ` WITH_BLANK_EXTERNAL_DEPENDENCIES ` specified,
697698an error is thrown at compilation time asking the user to provide implementations for ** external dependencies**
698699in [ src/external&lowbar ; deps/] ( src/external_deps ) , namely:
699700 * The printing helper in [ src/external&lowbar ; deps/print.c] ( src/external_deps/print.c ) . This helper serves output debugging purposes.
@@ -703,6 +704,10 @@ in [src/external_deps/](src/external_deps), namely:
703704 schemes. One should notice that a ** good random source** is ** crucial** for the security of Elliptic Curve based signature schemes,
704705 so great care must be taken when implementing this.
705706
707+ If ` WITH_BLANK_EXTERNAL_DEPENDENCIES ` is specified in compiling time, blank implementation for these helpers are provided.
708+ As the random helper does not really generate random bits, this may be dangerous. They are provided
709+ because it is useful in some restricted environments or in some specific applications (e.g. deterministic signature generation).
710+
706711Some other external dependencies could arise depending on the compilation chain and/or the platform. Such an example is the
707712implementation of the gcc and clang stack protection option, usually expecting the user to provide stack canaries generation
708713(with random values) and failover behavior.
@@ -890,7 +895,8 @@ other compilers (`-c` flag to generate object files, `-o` flag to define output
890895[ partially implemented] ( http://sdcc.sourceforge.net/mediawiki/index.php/Standard_compliance ) .
891896* The compiler has "exotic" targets such as the Zilog Z80 MCU.
892897
893- We suppose that the user has also provided the ** external dependencies** for print, random and time
898+ Unless compiling with ` WITH_BLANK_EXTERNAL_DEPENDENCIES ` specified (which can be dangerous),
899+ we suppose that the user has also provided the ** external dependencies** for print, random and time
894900functions (otherwise explicit errors will be thrown by #error directives).
895901
896902We will show how overloading the Makefile flags can be of use in this case. Say that we want
0 commit comments