• AVR Freaks

Hot!PIC32 - making an XML and signing using RSA-SHA256

Author
gmorfeus
Starting Member
  • Total Posts : 59
  • Reward points : 0
  • Joined: 2012/07/27 08:20:34
  • Location: 0
  • Status: offline
2019/09/22 14:28:19 (permalink)
0

PIC32 - making an XML and signing using RSA-SHA256

Hi,
 
I just can figure it out by myself so I would kindly ask for you help. I need to make a device that must be able to put together an XML file and hash it with SHA256 and then sign it using RSA-SHA256 and a certificate key. The maximum xml size (with signature part) must be less than 1Mb. The questions are:
1. how much RAM do I need for such task on the micro?
2. in last MLA I found examples for SHA256 hashing and RSA crypt using SHA256. Can mentioned xml signing be done using PIC24 family? I personally think not because there is no space to make XML of 1Mb.
3. can this task be done with an PIC32MZ2064DAS169 and external RAM?
 
Thanks in advance for any idea and thinking on this topic while I am "blocked" in decision if I shall even think about PIC or it is better to find a SoC or SoM capable of running Linux and implement all this in that environment.
#1

4 Replies Related Threads

    Jim Nickerson
    User 452
    • Total Posts : 6262
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: offline
    Re: PIC32 - making an XML and signing using RSA-SHA256 2019/09/23 06:24:56 (permalink)
    #2
    friesen
    Super Member
    • Total Posts : 2081
    • Reward points : 0
    • Joined: 2008/05/08 05:23:35
    • Location: Indiana, USA
    • Status: offline
    Re: PIC32 - making an XML and signing using RSA-SHA256 2019/09/24 08:38:24 (permalink)
    0
    I think this could be done with the DAS169.
     
    I personally use the older DAH176.  I am using zlib that uses ddr ram.  I am also using bearssl.

    Erik Friesen
    #3
    NorthGuy
    Super Member
    • Total Posts : 5675
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: PIC32 - making an XML and signing using RSA-SHA256 2019/09/24 09:00:55 (permalink)
    0
    You do not need much RAM for this. You do not have to hold the whole file in memory to calculate SHA256. You can just go through it one byte at a time. So, RAM requirements are very modest. It'll take a long time to calculate everything on a PIC though, especially if RSA keys are long.
    #4
    friesen
    Super Member
    • Total Posts : 2081
    • Reward points : 0
    • Joined: 2008/05/08 05:23:35
    • Location: Indiana, USA
    • Status: offline
    Re: PIC32 - making an XML and signing using RSA-SHA256 2019/09/24 09:31:58 (permalink)
    0
    FWIW, here is the bearssl performance test on the DAH176.

    Erik Friesen
    #5
    Jump to:
    © 2019 APG vNext Commercial Version 4.5