View previous topic :: View next topic |
Author |
Message |
gbolson
Joined: 24 Oct 2006 Posts: 7
|
AES encryption between PC and PIC |
Posted: Fri Jul 27, 2007 3:25 pm |
|
|
This is a long shot, but I am hoping somebody can give me some pointers here...
I'm successfully using the AES encryption outlined in Microchips' app note AN821 (or AN953 for that matter), to communicate between several PICs in a network, but now I need to send encrypted data to/from a PIC from my PC. I'm writing the PC stuff in VB.NET (VB 2005 free edition) and am trying to use the System.Security.Cryptography namespace to take care of the encryption/decryption for me - but it's not working.
The problem is that Windows is coming up with different encrypted text given the same block and key...
One difference I figured out is that by default, Windows is using an Initialization Vector, which tells me that it must be using the CBC mode of the Rijndael/AES algorithm. Since there is no Initialization Vector in the code in the app notes from Microchip, they must be using the ECB mode of the Rijndael/AES algorithm. To combat this I changed the CipherMode to ECB. I have also set the BlockSize and KeySize to 128 and the PaddingMode to none.
Does anyone have any idea how to get the two to understand each other? |
|
![](templates/subSilver/images/spacer.gif) |
elleP Guest
|
AN953 |
Posted: Thu Sep 13, 2007 6:05 am |
|
|
I'm sorry I can't help with your question, but you might be able to help me.
I'm trying to use the AN953 routines, but I can't find them.
Can you tell me where the code can be foud? |
|
![](templates/subSilver/images/spacer.gif) |
gbolson
Joined: 24 Oct 2006 Posts: 7
|
|
Posted: Thu Sep 13, 2007 6:19 am |
|
|
I had to contact Microchip and "apply" to receive the info. Then I had to promise not to export it to enemy countries, terrorists, etc. |
|
![](templates/subSilver/images/spacer.gif) |
elleP Guest
|
|
Posted: Thu Sep 13, 2007 6:47 am |
|
|
Thanx, I'll try that. It sounds like fun ![Smile](images/smiles/icon_smile.gif) |
|
![](templates/subSilver/images/spacer.gif) |
|