![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
pattousai
Joined: 23 Aug 2006 Posts: 37
|
asymmetric cryptography |
Posted: Fri Jul 09, 2010 1:10 pm |
|
|
Hi everybody,
I know this is a regular question (if there is any library that implement), but this time I'm asking if it is possible to do asymmetric cryptography in a PIC family device (dsPIC, PIC24 etc).
The Microchip has one library that implement many asymmetric cryptography functions (so, I believe it is possible to do in a CCS compiler, actually, the question is about hardware), but this library don't generate the keys, only implement the encryption and decryption functions (which is a lot, ok). So... my question is: with a PIC family hardware, is possible to implement the function that generate the asymmetric keys?
I know that would be more 'correct' that I just study the asymmetric cryptography theory and study the better PIC hardware and then conclude my question by myself (actually, I pretend to do so), but even then, I can't be sure of my conclusion, so... I thought that I could ask this here...
Thanks for the attention and sorry for the english,
Victor Hugo. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19384
|
|
Posted: Sat Jul 10, 2010 3:09 pm |
|
|
Possible. Yes.
Sensible. Arguable.....
Even on the smaller PIC's, it is perfectly possible to generate your own maths library using BCD, to handle large numbers, and with this calculate prime numbers. Given a lot of time, this could then calculate you a sequence of large primes. Then chosing values from this at 'random' (this is one of the hard parts....), calculate the product of these (call this n), the Euler totient of this, and a number that is less than this, and has no common factors with it (call this 'e'). Again you need a good 'random' algorithm to make the selection of this unlikely to be predictable. With these calculated, you need to destroy all record of how the numbers were derived (delete seed values generated to create the random steps etc., and the prime numbers used). You then calculate the unique value 'd', satifying the relation (d-e)%totient = 1.
Then 'n' is the public key, and 'd' is the private key.
It'll take a lot of time, and the quality of the random values is critical in how good the keys are. Count thermal noise from a photo-cell, for example, as a good way of seeding a standard psuedo random sequence generator.
It'll take significant time, and space, but could potentially be programmed on just about any chip. It will though require a probably custom maths library, and will require a really good random number source, if it is not to be easy to crack....
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
pattousai
Joined: 23 Aug 2006 Posts: 37
|
|
Posted: Sun Jul 11, 2010 3:38 pm |
|
|
Thanks Ttelmah, for the very good answer...
Well, to be honest I always thought that was very possible to make asymmetric cryptography (including generate the keys) in the PIC's hardware, but I am very surprised that nobody ever implemented this (at least I do not find).
But I will study this with more motivation now.
Thanks again |
|
![](templates/subSilver/images/spacer.gif) |
John P
Joined: 17 Sep 2003 Posts: 331
|
|
Posted: Sun Jul 11, 2010 5:00 pm |
|
|
Didn't Turing demonstrate that any processor can run any computational task? All you need is enough memory space and enough time! |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|