EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Re: AES source code for MSP430

Started by "Richard (UK)" May 10, 2008
OK, let's get this straight.

You don't know assembler.

You don't know much about encryption ... and yet you SPECIFY your
requirement as being AES in your original post.

You don't know about block or stream ciphers and yet you specify that each
packet should be independently encryrpted.

In view of the above I suspect that maybe you need to learn some of this
stuff before you start coding this project.

Even if someone here gives you code for a fast algorithm, I doubt that your
final solution will be very secure.

Some tips:

1. Google 'session key'

2. Google 'streaming cipher'

3. Understand and research your software problems BEFORE you specify
solutions such as 'it must be AES', 'packets will be independently
encrypted'

4. Don't expect others to do your job for you for free.

----- Original Message -----
From: bhtpglu
To: m...
Sent: Saturday, May 10, 2008 9:09 AM
Subject: [msp430] Re: AES source code for MSP430

Hello,

Thank you all very much. I don't know encryption algorithms well,
but let me explain what I need:

I am going to encrypt and decrypt real time voice data. I have
64byte packets for every 15ms. I transmit them, and playback on the
receiver side. So, I just need to encrypt a packet of 64 bytes, and
decrypt. I don't know really what a block cipher is or what is AES's
block size or whatever, but as you understand, encrypted packets
should not depend on each other, they should be independently
decrypted.

I just want a strong algorithm, but I have limited cycles. So,
10,000 cycles is OK for my 64byte packet, but 100,000 is not.

If RC4 better fits my requirements, I will be pleased if you can
send that to me.

Thanks in advance. Regards.

--- In m..., "microbit" wrote:
>
> Or another good one is RC4. Although I believe the 'name' (aka arc
four IIRC) is trade mark, the
> algorithm is public domain. I wrote a function that does both
encrypt and decrypt a few years ago.
> If you can use that I'll dig it up. This is a stream cipher
particularly suited to 8 bit, so it
> runs fine on MSP430. I'm not the expert on ciphers but I believe
RC4 is a way stronger cipher than
> AES or DES. My code can hash the state array with an up to 2048
bit key IIRC.
>
> Best Regards,
> Kris
>
> -----Original Message-----
> From: m... [mailto:m...] On
Behalf Of Richard (UK).
> Sent: Friday, 28 March 2008 12:17 AM
> To: m...
> Subject: Re: [msp430] Re: AES source code for MSP430
>
> Do you SPECIFICALLY want AES .. or just a decent encryption
encryption
> algorithm?
>
> If you simply want an encryption algororithm why not take a look
ar XTEA ...
> it's fast and tiny!
>
> See: http://en.wikipedia.org/wiki/XTEA
>
> ----- Original Message -----
> From: bhtpglu
> To: m...
> Sent: Tuesday, March 25, 2008 7:20 PM
> Subject: [msp430] Re: AES source code for MSP430
> Yes, there are, but most of them are for 32-bit processors.
>
> Do they work for MSP430? I have asked here because I believe
> somebody in this group already had written some code for
encryption.
>
> --- In m..., "old_cow_yellow"
> wrote:
> >
> > There are c source code for AES all over the Internet. c is
> portable,
> > so do not restrict your search to MSP430 and do not restrict to
> this
> > group.
> >
> > --- In m..., "bhtpglu" wrote:
> > >
> > > Hello,
> > >
> > > Does anybody have C source for both encrypt and decrypt with
> AES? I
> > > need the C source because I don't know how to use ASM codes
with
> C code.
> > >
> > > I am using MSP430F169 and IAR Workbench.
> > >
> > > Thanks in advance.
> > >
> > >
> > > --- In m..., hchahine@ wrote:
> > > >
> > > > Thanks heaps mate. Your asm code works quite well and should
> just
> > > slip in to my project nicely. I will attempt the decipher
> routine with
> > > the help of the senior engineer. If you ever get it coded I
> would love
> > > to see it.
> > > >
> > > > Again thanks for you help.
> > > >
> > > > Hani
> > > >
> > > > Hi guys,
> > > > >
> > > > >I need to implement 128-bit AES Encryption in an MSP430F2370
> for
> > > secure RF communications. I've researched this and other forums
> and
> > > also the web and have been unsucessful in finding any suitable
> (free)
> > > open source code for any 16-bit processor/system, let alone the
> MSP430.
> > > > >
> > > > >Time is a big constraint and therefore I cannot afford to
> write
> > > code from scratch.
> > > > >
> > > > >Does anyone know where I can find preferably MSP430 AES
> source code
> > > or other code I can relatively quickly port to the MSP430. Any
> advice
> > > would be appreciated.
> > > > >
> > > > >Thanks in advance.
> > > > >
> > > > >Hani
> > > > >

Beginning Microcontrollers with the MSP430


The 2024 Embedded Online Conference