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.
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

123456789101112131415161718192021222324252627282930
  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. }