The union of all files from all check-ins in directory work_in_progress/experiments/mmmv_microbot_crypto_t1 [history]
The mmmvmicrobotcryptot1 is a microcontroller C library. The aim of the mmmvmicrobotcryptot1 is to maximize cryptographic strength and availability at as many microcontrollers as possible, while minimizing electrical power consumption and computational power requirements. It is up to the client code developers to decide, what their minimum acceptable cryptographic strength is, how much electrical power and computational power, RAM, execution time, etc. they are willing to sacrifice for cryptographic strength. This project is a sub-project of Silktorrent. Project theory related documentation and references reside at the Silktorrent Fossil repository.
The current version is optimized for 8-bit microcontrollers, but it has been written so that the same code can run and process the sime kind of data streams also on 32-bit microcontrollers and on desktop computers. CPU-specific bit endianness could be determined during runtime, but due to efficiency it is expected to be given to a buld script as a parameter. The mmmvmicrobotcrypto_t1 build and test system is written in Ruby. The main entry to the build and test system is the
W A R N I N G
There is absolutely no code in this project yet. This project will be a sub-project of the mmmvdeveltools sub-project
Source resides at
Build results are placed to an autogenerated folder
which includes, depending on build parameters, both, the patched source and compiled binaries. Formal verification tools are expected to work on the code that resides at the
because that allows the original C source, the one at
to be kept free from verification tool specific comments, making it easier to use multiple formal verification tools for analyzing the same source. The build output includes a verification tool specific patch. As the mmmvmicrobotcrypto_t1 is meant to be a sub-component of a collaborative scheduling based control software, error conditions are not allowed and data dependent maximum execution time is not allowed. If error conditions never occur, then exceptions are useless. Data is processed in blocks and control flow is collaboratively yielded to another thread at the end of the processing of a single block. Processing result is an instance of a C structure that has a flag, whether processing failed or succeeded. Flawed input data is discarded.
Error correction and bitstream dissection are done before there is an attempt to decrypt the series of blocks. All blocks that are received by the decryption function, can be decrypted, except that when the block content has been corrupted, the decryption result is also flawed. There has to be a separate checksum calculation step after decryption. The processing pipeline for decryption:
- Error correction, Viterbi demodulation, etc.
- Blockstream creation from error-corrected bitstream.
- Decryption. Outputs a blockstream.
- Decryption result blockstream checksum calculations and new blockstream creation.
The processing pipeline for encryption:
- Checksummed blockstream creation from cleartext.
- Encrypted blockstream to data transmission bitstream conversion.
The names of all of the mmmvmicrobotcryptot1 functions start with **mmmv0001func. The names of all of the mmmvmicrobotcryptot1 structures start with **mmmv0001st. The mmmvmicrobotcrypto_t1 library code does not have any global variables.
A general design pattern is that functions are given a pointer to a structure. All functions that return anything other than void are side-effect free. The ones that return void place their output to the structures that are referenced by their call parameters.
Building and Testing
The default Rake task at
displays the list of available tasks. The folder
can be deleted safely, because it is autogenerated and overwritten.