How to use 3DES in a micro?

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

Reply to
ElderUberGeek
Loading thread data ...

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 :-)

Reply to
Ignacio G.T.

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

Reply to
Vladimir Vassilevsky

The name's Schneier.

Reply to
Hans-Bernhard Bröker

"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
 Click to see the full signature
Reply to
Ulf Samuelsson

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.

Reply to
slebetman

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?

Reply to
ElderUberGeek

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

Rene

ElderUberGeek wrote:

Reply to
Rene Tschaggelar

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

Reply to
Vladimir Vassilevsky

"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
 Click to see the full signature
Reply to
Ulf Samuelsson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.