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

1024 bit Arithmetic using 8, 16, 32 bit microcontroller

Please tell me how to achieve 1024 bit and above Arithmetic operation using 8, 16, 32 bit microcontroller.
The Arithmetic operation consist of Addition, Subtraction, Multiplication, Division, Modulo.

Parents
  • I want 1024 bit algorithm for diffrent controller like 32 bit ARM controller, 16 bit c166 controller, 8 bit higher end controller like renesas, etc where RAM size is of 2 KB.

    i need to write a flexible code which will support RSA encryption technique with variable key length. ( 32 bit to 1024 bit)

Reply
  • I want 1024 bit algorithm for diffrent controller like 32 bit ARM controller, 16 bit c166 controller, 8 bit higher end controller like renesas, etc where RAM size is of 2 KB.

    i need to write a flexible code which will support RSA encryption technique with variable key length. ( 32 bit to 1024 bit)

Children
  • "i need to write a flexible code which will support RSA encryption technique with variable key length. ( 32 bit to 1024 bit)"
    There are no such thing as any 32-bit RSA. You need ridiculously large keys to get any security. A 32-bit or 64-bit key would be cracked in almost no time. 1024 is already questionably small and the recommendation is 2048 bits or more.

    Anyway - as long as the processor has RAM enough, the algorithms will just contain loops to perform the calculations with an arbitrary number of bits. There are many big number libraries available, and it is also quite easy to implement your own code for the few operators you need.

    Note that you should also pad the data, to reduce the probability of some specific attacks being able to quickly crack even quite large key sizes.

  • Another important point: when designing your own cryprographic system, you have to know exactly what you are doing. It is too easy to leave a hole which will compromise the overall security, and no amount of bits in the keys used will help that.

  • "It is too easy to leave a hole which will compromise the overall security, and no amount of bits in the keys used will help that."

    Such errors happens regularly even when the people involved do know what they are doing.

    And as Andy notes, I would stay away from 8-bit or 16-bit processors if there is a need for decent cryptographic security.

    I don't think I would go for any processor that can't run the OpenSSL code. Note that OpenSSL can be configured, so there is no need to include all algorithms.

    There may be security holes in the OpenSSL package, but no home developer or "normal" company can hope to match OpenSSL when it comes to code quality or amount of security reviews.