This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

elliptic curve cryptography on 8051

Hey guys, I am working on making Elliptic Curve Cryptography El-Gamal in 8051 MCU using Keil uvision 4. I want to make it 128 bit, so I need to use GMP library. However, to use GMP I usually download it in mingw-get-setup first, so I think it won't run if I just copy the gmp.h to my project in Keil.

My questions are :

1. how can I use gmp in 8051 using Keil?

2. Or should I compile it first in gcc, then just download the hex file to 8051? How to program the register in gcc?

Thanks for your attention :D

Best regards

Parents
  • Hexadecimal? Binary?

    That would only be applicable if you treated the numbers as ASCII text strings with the number stores as the characters '0' and '1' or '0'..'9', 'A'..'F' etc.

    Next thing - the processor is 8-bit.
    It's better to have an array of 8-bit values than to have an array of 32-bit values.
    Remember that for 32-bit values, the compiler need to either insert many assembler instructions, or call helper functions. And next thing - a 32-bit*32-bit multiply results in a 64-bit answer. But that isn't fun if you don't have a C data type available that can store a 64-bit value. Storing the 128-bit number as an array of 8-bit values would mean that your code would do base-256 arithmetic.

    Are you sure you are up for this?

Reply
  • Hexadecimal? Binary?

    That would only be applicable if you treated the numbers as ASCII text strings with the number stores as the characters '0' and '1' or '0'..'9', 'A'..'F' etc.

    Next thing - the processor is 8-bit.
    It's better to have an array of 8-bit values than to have an array of 32-bit values.
    Remember that for 32-bit values, the compiler need to either insert many assembler instructions, or call helper functions. And next thing - a 32-bit*32-bit multiply results in a 64-bit answer. But that isn't fun if you don't have a C data type available that can store a 64-bit value. Storing the 128-bit number as an array of 8-bit values would mean that your code would do base-256 arithmetic.

    Are you sure you are up for this?

Children
No data