Skip to content

Embedded

Simon Ninon edited this page Apr 4, 2018 · 2 revisions

Preamble

iota.lib.cpp aims to provide support for embedded development environments.

However, please keep in mind that

  • The library is under active development
  • The authors of this library do not have preliminary experience with embedded development

Thus, some embedded optimizations might either be under development, planned for development or not considered. Please do not hesitate to reach out to us by opening an issue if you have any concerns, questions or suggestions concerning embedded support adjustments.

This wiki page will collect all information related to our embedded support: from configuration options to design choices. Design choices are not meant to be permanent decision and can always be discussed by opening an issue and justifying your opinion.

Dependencies

Keccak

Keccak is the 3rd-part library used for the underlying IOTA hashing algorithms.

We are using the official implementation made by the mathematicians behind the Keccak algorithm. This library is highly performant and optimized for both CPU and memory management.

Additionally, Keccak provides some platform-specific optimizations. The following optimizations are available:

name description
reference Reference unoptimized implementation
reference32bits Reference unoptimized implementation for 32-bits platforms
compact Compact implementation (use more registers).
For more information, refer to Keccak Implementation Reference
generic32 Generically optimized 32-bit implementation
generic32lc Generically optimized 32-bit implementation, featuring Lane Complementing (LC).
For more information, refer to Keccak Implementation Reference
generic64 Generically optimized 64-bit implementation
generic64lc Generically optimized 64-bit implementation, featuring Lane Complementing (LC).
For more information, refer to Keccak Implementation Reference
asmX86-64 Assembler optimized 64-bit implementation
asmX86-64shld ssembler optimized 64-bit implementation (Double Precision Shift Left)
Nehalem Implementation selected for the Nehalem microarchitecture
SandyBridge Implementation selected for the Sandy Bridge microarchitecture
Bulldozer Implementation selected for the Bulldozer microarchitecture
Haswell Implementation selected for the Haswell microarchitecture
KnightsLanding Implementation selected for the Knights Landing microarchitecture
ARMv6M Implementation selected for ARMv6M
ARMv7M Implementation selected for ARMv7M
ARMv7A Implementation selected for ARMv7A
ARMv8A Implementation selected for ARMv8A
AVR8 Implementation selected for 8-bit AVR

You can select the optimization of your choice by using the KECCAK_ARCH_OPTIMIZATION CMake Variable as follows:

cmake .. -DKECCAK_ARCH_OPTIMIZATION=generic64

By default, if KECCAK_ARCH_OPTIMIZATION is not defined, we will either use generic32 or generic64 depending on the current architecture (or the architecture defined by the ARCH CMake variable if defined: for example cmake .. -DARCH=32 will select generic32 even if the current architecture is 64-bits).

Clone this wiki locally