Shop OBEX P1 Docs P2 Docs Learn Events
Can Propeller do HTTPS? — Parallax Forums

Can Propeller do HTTPS?

william chanwilliam chan Posts: 1,326
edited 2009-02-24 09:11 in Propeller 1
Propellerheads,

Now that the Propeller can do Ethernet and HTTP, how difficult would it be to act like a HTTPS client through SSL?

Thanks.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my

Comments

  • virtuPICvirtuPIC Posts: 193
    edited 2009-02-19 07:54
    Well, of course he can do HTTPS - if you tell him how to do so. But beware of the complexity of the corresponding public key crypto! Lots of long muls and rems.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Airspace V - international hangar flying!
    www.airspace-v.com/ggadgets for tools & toys
  • william chanwilliam chan Posts: 1,326
    edited 2009-02-24 01:27
    Hi,

    SPIN can do long multiplications easily.
    Where can I find more information on the crypto calculations for HTTPS or SSL?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • BradCBradC Posts: 2,601
    edited 2009-02-24 01:57
    william chan said...
    Hi,

    SPIN can do long multiplications easily.
    Where can I find more information on the crypto calculations for HTTPS or SSL?

    The source code for OpenSSL would be a good start..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cardinal Fang! Fetch the comfy chair.
  • virtuPICvirtuPIC Posts: 193
    edited 2009-02-24 08:05
    BradC said...
    The source code for OpenSSL would be a good start..
    Well, yes... but don't underestimate the complexity! I confess, I don't know for sure, but I assume that OpenSSL uses the GNU multiple precision arithmetic library (GMP). And this is really tough stuff.
    william chan said...
    SPIN can do long multiplications easily.
    You mean the 32 x 32 mutliplication operators giving lower and higher 32 bits of the result? Easily usable - yes. But not very efficient. You need to perform each multiplicaiton twice where something like one and a half would suffice in assembler. Further, you only get a 64 bit result of 32 x 32 bit. This is not really enough for SSL / HTTPS. To get an impression have a look at the mentioned GMP or at Karatsuba or Toom-Cook. And these algorithms only give you multiplication of long integers - not multiplication of long integers modulo long primes or modulo a product of two long primes.

    I don't want to frighten you! I would also like to see some SSL / HTTPS implementation on a uC. But long number arithmetic is really tough stuff if you want to do it at reasonable speed! Sure, you can simply port an existing solution - but that's a lot of work. Well. it's a lot of work anyway.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Airspace V - international hangar flying!
    www.airspace-v.com/ggadgets for tools & toys
  • Harrison.Harrison. Posts: 484
    edited 2009-02-24 08:20
    Microchip has a SSL library for PIC microcontrollers. Parts of the library are implemented in assembly (likely for speed). Beware that you can't really take their code since the license only allows it to be used on PIC devices. The only code from the TCP/IP stack that can be run on other controllers would be the enc28j60 driver.

    Other than that, the Microchip code should be a good example of how to implement SSL on microcontrollers. Most other companies charge all sorts of elaborate fees for SSL support.
  • virtuPICvirtuPIC Posts: 193
    edited 2009-02-24 08:33
    Harrison. said...
    Microchip has a SSL library for PIC microcontrollers.
    Oh! That's probably really something to look at. I wonder how fast we can make the Prop multiply compared to the 16 x 16 single cycle mul of the PIC...

    As usual, the more you investigate in such questions the more interesting they become... smilewinkgrin.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Airspace V - international hangar flying!
    www.airspace-v.com/ggadgets for tools & toys
  • mctriviamctrivia Posts: 3,772
    edited 2009-02-24 08:36
    in assembly 16x16 would require 16 shifts + 16 adds
  • virtuPICvirtuPIC Posts: 193
    edited 2009-02-24 09:11
    mctrivia said...
    in assembly 16x16 would require 16 shifts + 16 adds

    Right. Or you do five table lookups for 6 x 6 muls and combine them via Toom-Cook. Whichever is faster...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Airspace V - international hangar flying!
    www.airspace-v.com/ggadgets for tools & toys
Sign In or Register to comment.