Python-ELMO is a Python library which offers an encapsulation of the binary tool ELMO, in order to manipulate it easily in Python and SageMath script.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

project.c 944B

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include "elmoasmfunctionsdef.h"
  4. #include "elmoasmfunctionsdef-extension.h"
  5. // ELMO API :
  6. // - printbyte(addr): Print single byte located at address 'addr' to output file;
  7. // - randbyte(addr): Load byte of random to memory address 'addr';
  8. // - readbyte(addr): Read byte from input file to address 'addr'.
  9. // ELMO API (extension) :
  10. // - print2bytes, rand2bytes and read2bytes: idem, but for an address pointing on 2 bytes;
  11. // - print4bytes, rand4bytes and read4bytes: idem, but for an address pointing on 4 bytes.
  12. int main(void) {
  13. uint16_t num_challenge, nb_challenges;
  14. read2bytes(&nb_challenges);
  15. for(num_challenge=0; num_challenge<nb_challenges; num_challenge++) {
  16. starttrigger(); // To start a new trace
  17. // Do the leaking operations here...
  18. endtrigger(); // To end the current trace
  19. }
  20. endprogram(); // To indicate to ELMO that the simulation is finished
  21. return 0;
  22. }