Go Down

Topic: ATECC508A library? (Read 9452 times) previous topic - next topic


Oct 12, 2015, 11:13 pm Last Edit: Oct 12, 2015, 11:55 pm by Roduino Reason: Url's etc.
Will there ever be an Arduino library for the ATECC508A? Considering it's covered by a Non Disclosure Agreement by Atmel. Meaning there is no full datasheet documentation, only Summary Documentation, unlike the ATSHA204A.... I presume not.

Although there is a CryptoAuth C dev library, with it's own documentation. And the ATECC508 is fully backward compatible with the ATSHA204A and so there is Sparkfun's ATSHA204 library to get started.

Then again the main advantage of using the ATECC508 v ATSHA204A seems to Asynchronous Authentication using PKI, so it seems the ATECC508A is really aimed at the the more serious developer.

Nevertheless it could be worthwhile being able to know how to use the PKI options, for as yet unknown projects down the road or just educational reasons. Is the dev library sufficient to do PKI without the datasheet documentation?



I've signed the NDA and have the datasheet and am working on a library.  Though, given the NDA, I doubt I'd be able to share it.

I'm actually starting with the Atmel library you linked to, and I also found https://github.com/cryptotronix/cryptoauth-arduino which looks like it was based on an older version of Atmel's library.

Unfortunately, neither of those are C++, so my modifications to use the Wire library so they will coexist with other I2C Wire.h based devices fails as soon as I attempt to include <Wire.h> because it chokes, not knowing what to do with all these classes...

SparkFun's library is C++, but it still doesn't attempt to use the Wire library. But, starting there might be easier.  I'd have to modify it to use Wire, and then to add the 508 calls to it.

If I get something working, I'll approach Atmel and see if they'd let me share my work.  I'm under NDA with them, so I'm at their mercy... Sorry.


Given that the board was designed by Atmel and has their crypto chip it seems strange that they would charge us for it but not let it be used. Perhaps this is a case of one hand not knowing what the other is doing?

This may be a case where they have licensed an algorithm from someone else and we are inheriting the burden of that license. Regardless, we should push Atmel to allow release of a library supporting it.


Do you have to sign the NDA to use the CryptoAuthLib Firmware Library?

I was thinking that it should be possible to rewrite hal_samd21_i2c_asf.* and hal_samd21_timer_asf.* files using SoftI2CMaster as mentioned in 5 Porting Guide for CryptoAuthLib. Then build it in Atmel Studio 7 to get at least a random number and move from there...


I have been working on an updated library for a little while now that uses the ATECC508A, it is a for of the cryptotronix library with a later version of the Atmel code dropped in to add the 508 features.
I've not looked at it for a while as there were still a couple of issues that I was trying to resolve, other than that its at https://github.com/thiseldo/cryptoauth-arduino with a write up on the features and use at http://thinginnovations.uk/developing-an-iot-security-solution




Dec 02, 2015, 12:40 am Last Edit: Dec 02, 2015, 12:49 am by Roduino
Thanks all for your informative replies & useful links.

Just curious SmittyHalibut (or anyone), are NDA's  granted for hobbyist use?

Calvin, if you can download it, then I don't think so. So if you can work it out , then I guess good luck to you!

For me, I would expect the documentation would make it a lot easier to program, as it would have memory maps & explanations. And describing the format of additional functions in detail, like the 204A doc.



As far as I understand it, the full datasheet for the ATECC508A is only available under NDA from Atmel. Your first point of contact would be your local Atmel representative. It took a couple of weeks to get the NDA sorted and the full datasheet released when I did it earlier in the year through my company. I was fortunate to have met one of the local reps at a networking event that I just happened to be demonstrating the use of the ATSHA204. Moving onto the ATECC508A was a natural progression.

Any serious development using the chips or developing libraries will require the datasheets, trying to reverse engineer the datasheet from the library code may be possible but there is a lot of information that will not be clear without the datasheet. The datasheet and other documents provided give additional information on the crypto techniques used in the chip and use cases for the various commands. This is useful for understanding how the chips can be used.

I've just seen there is a more recent version of the Atmel crypto code so I'm going to update the code I have in the library I have created. In all truth, the library is really just a set of wrappers for the Atmel code to produce an Arduino compatible library. The addition of the Arduino specific example sketches it makes a more useful package and provide a starting point for others to use the chip.



Go Up