X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fsec%2Fentropy%2Fyarrow_pool.h;fp=bertos%2Fsec%2Fentropy%2Fyarrow_pool.h;h=d19fb8a292447bf5137627f71f3779588247b416;hb=b9382da8ff693a5881ce5d7ebc8f680bc8a18689;hp=0000000000000000000000000000000000000000;hpb=1bb0ad8f023538906d593d44a872cf4c091499c9;p=bertos.git diff --git a/bertos/sec/entropy/yarrow_pool.h b/bertos/sec/entropy/yarrow_pool.h new file mode 100644 index 00000000..d19fb8a2 --- /dev/null +++ b/bertos/sec/entropy/yarrow_pool.h @@ -0,0 +1,63 @@ +/** + * \file + * + * + * \brief Yarrow pool implementation + * \author Giovanni Bajo + * + */ + +#ifndef SEC_ENTROPY_YARROW_POOL_H +#define SEC_ENTROPY_YARROW_POOL_H + +#include +#include + +typedef struct +{ + EntropyPool e; + + struct YarrowPool + { + SHA1_Context hash; + int entropy[CONFIG_ENTROPY_NUM_SOURCES]; + } pools[2]; + + struct YarrowSources + { + int curpool; + } sources[CONFIG_ENTROPY_NUM_SOURCES]; + +} YarrowPoolContext; + +void yarrowpool_init(YarrowPoolContext *ctx); + +#endif /* SEC_ENTROPY_YARROW_POOL_H */