CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

AES encryption between PC and PIC

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
gbolson



Joined: 24 Oct 2006
Posts: 7

View user's profile Send private message

AES encryption between PC and PIC
PostPosted: Fri Jul 27, 2007 3:25 pm     Reply with quote

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?
elleP
Guest







AN953
PostPosted: Thu Sep 13, 2007 6:05 am     Reply with quote

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?
gbolson



Joined: 24 Oct 2006
Posts: 7

View user's profile Send private message

PostPosted: Thu Sep 13, 2007 6:19 am     Reply with quote

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.
elleP
Guest







PostPosted: Thu Sep 13, 2007 6:47 am     Reply with quote

Thanx, I'll try that. It sounds like fun Smile
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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