Quark_D lightweight crypto


jacob morales
 

Hi, i am currently i am working developing a lightweight crypto primitive (https://131002.net/quark/quark_full.pdf), in brief, it is a module that returns fix size hash/digest of an arbitrary stream of information. I have "figured out" most of the implementation of the module, but the problem that is that of how to process the incoming stream of information, all the prove of concepts on the web use a pointer to an area of memory and they indicate the number of chuncks of information to be hashed. I don't think that this is feasible because i will execute the code in an arduino 101 or a quark d-2000 which don't have the memory to do that. So the partial solution that i have now is to implement an asynchronous protocol, something like this:

void quark_u()
{
     unsigned char flag=1;
     unsigned char chunk=0x00;
     while(flag) 
     {
           m=/*read */;
           flag=/*read*/;
     }
}

My intention is to be platform independent, is this possible? or should it be different versions of this function that read specific I/O ports of specific platforms?, any insight, observation or pointer will be greatly appreciated.
 
--
Kind Regards