Update of "Experiment: mmmv_microbot_crypto_t1: Implementation Ideas"
Not logged in
Overview

Artifact ID: c985c97b01e95ab4d7a18b636785033ed8a50fc9
Page Name:Experiment: mmmv_microbot_crypto_t1: Implementation Ideas
Date: 2016-12-29 22:56:45
Original User: martin_vahi
Parent: f3dc1c38ff1de50276825214e9b236551c2fe10b (diff)
Next 760dd35ab3ecc2832268db9cdc0dfe705f4306b4
Content

Random Number Generation 

Random numbers might be generated by combining some pseudo-random sequence generation function with bitstream from hardware based random bitstream generator. The role of the pseudo-random sequence generation function is to compensate for the slowness of the hardware based bitstream generator. The hardware based bitstream generator might use light, sound, electrical noise (even regular electrical noise, like the 50Hz or some engine noise) for an input to some fast cryptographically relatively strong hash function (not unrollable, has collisions). The hash function output would be the random bitstream. 


Hash Function

Probably one needs to write that from scratch, because 8bit MCUs are usually not used for executing cryptographically strong hash functions. The MurMurHash is not designed to be cryptographically strong, but it might give some ideas. The number of collisions must be maximized. The way to do it is to require a minimum of N bytes as an input and use some constants, when the input data is smaller. The constants can be pre-processed with input data before using them as inputs for the hash function. Different Hash function implementations can be evaluated by counting the number of collisions that literally every 4B number has. The 4B can address 4GiB, so results must be stored sparsely, may be by using a histogram. Given that it's a fast C program that fits wholly to CPU-cache, the calculation of the 4*2^9 values should take less than a minute.