How to use 3DES in a micro?

Oct 02, 2007 9 Replies

I need to implement some type of embedded security over a serial link, like 3DES (or DES or AES), and really don't know where to start to look, so some pointers would be really helpful.


- Can this be implemented only in software? (code space?)



- Does anyone sell a library that can be used?



- Do the two units (which can be any two units) have to know the keys in advance?



Thanks



ElderUberGeek escribió:

Yes.

Try googling OpenSSL.

In symmetric crypto (like 3DES), the key must be known by both units. This can be done installing the key at production time in both units. Or, you can install the key in a unit, and deliver it to the other unit via asymmetric crypto. Or, you can _generate_ the key in a unit as needed, and deliver it to the other unit via asymmetric crypto. Other scenarios are possible as well.

IMHO, a look at

formatting link
won't do you any harm :-)

Start with "Applied Cryptography" by Bruce Schnauer. Excellent book, a must for anyone implementing security algorithms.

Yes. However the encryption/decryption speed may be the issue. Depending on the algorithm and CPU, you can expect something like 1 kbyte/sec per one MIPS.

Avoid using anyone's code until you yourself realize the main concepts. You can seriously compromise the security. There are countless examples of the security flaws because someone used the code of the shelf brainlesly.

Keyword: "public key cryptography"

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

The name's Schneier.

"ElderUberGeek" skrev i meddelandet news: snipped-for-privacy@k79g2000hse.googlegroups.com...

There is a 3DES H/W block in the AT91SAM7XC128/256. These parts cannot be exported outside E.U, US/Canada, Austrealia,New Zealand or Japan without applying for an export license though.

Best Regards, Ulf Samuelsson This is intended to be my personal opinion which may, or may not be shared by my employer Atmel Nordic AB

Here's an implementation of DES and SKIPJACK on Microchip PIC:

formatting link

The DES code is about 700 instructions and SKIPJACK is around 300 instructions so they can easily be implemented on even the low end PICs.

Actually, as far as I have been looking in to it, AES is the way to go.

Any idea about libraries or maybe an external chip?

You can always implement it into an FPGA or another controller.

Rene

ElderUberGeek wrote:

No. XTEA is the way to go.

The AES standard description with the reference C code is available from NIST web site.

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

"ElderUberGeek" skrev i meddelandet news: snipped-for-privacy@r29g2000hsg.googlegroups.com...

AT91SAM7XC128/256 has AES as well as 3DES. (Should have been in the first mail)

This will give you a single chip solution with ARM7TDMI

128-256 kB Flash (soon 512 kB) 32-64 kB SRAM (soon 128 kB) 3DES, AES H/W encrypt/decrypt 3 x UARTs, SPI, I2C, I2S, ADC, Timers CAN controller, USB Full Speed device.

What else do you need?

Best Regards, Ulf Samuelsson This is intended to be my personal opinion which may, or may not be shared by my employer Atmel Nordic AB

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required