Difference between revisions of "CryptoAuthentication SOIC Xplained Pro Starter Kit (DM320109)"

From Embedded Lab Vienna for IoT & Security
Jump to navigation Jump to search
Tag: Removed redirect
Line 1: Line 1:
#REDIRECT [[Install c't'-Raspion on Raspberry PI]]
== Summary ==
 
 
/// Still to do (Petra)
This documentation describes the usage of security features for microcontrollers especially for the Atmel Sam R21 with the expansion board Atcryptoauth Xpro B.
 
== Requirements ==
* [https://www.microchip.com/mplab/avr-support/atmel-studio-7 AtmelStudio]
* [https://www.microchip.com/developmenttools/ProductDetails/atsamr21-xpro Atmel SAM R21 Xplained Pro]
* [https://www.microchip.com/DevelopmentTools/ProductDetails/atcryptoauth-xpro-b ATCRYPTOAUTH-XPRO-B]
 
== Description ==
The Cryptoauth expansion board contains four chips which gets connected via I2C
Chips:
* [https://www.microchip.com/wwwproducts/en/atsha204a ATSHA204A] (SHA256)
* [https://www.microchip.com/wwwproducts/en/atecc508a ATECC508A] (Ellipticcurve P256, SHA256)
* [https://www.microchip.com/wwwproducts/en/atecc608a ATECC608A] (Ellipticcurve P256, SHA256, AES-GCM)
* [https://www.microchip.com/wwwproducts/en/ataes132a ATAES132A] (AES128)
 
=== Implementation for ATECCx08A and ATSHA204A ===
The [https://git.fh-campuswien.ac.at/c1710475053/atmel-sam-cryptography-with-cryptoauth-xpro-b implementation for ATECCx08A and ATSHA204A] is based on the [https://github.com/MicrochipTech/cryptoauthlib Cryptoauthlib].For ease of use of the ASF USART a custom abstraction layer got implemented.
 
The example program Implements:
* Showing the serial numbers of the chips
* Hashing a message
* Showing locked zones
* Locking zones
* Generate a random number (only works with locked configuration Zone)
* Generate a keypair (only works with locked configuration Zone)
 
Usage:
* Connect your microcontroller to the EDGB USB port and upload the software
* Open a terminal Program ([https://www.putty.org/ Putty], [https://ttssh2.osdn.jp/index.html.en TeraTerm])
* Terminal program configuration:
  Baud rate    115200
  Data bits    8
  Stop bits    1
  Parity        none
* Press the restart button in the controller
* The implementation has an text menu which allows you to navigate by numbers
 
=== Implementation for ATAES132A ===
[[File:AES132ADatasheet.pdf]] -> that Datasheet is made available from Atmel to get a better understanding of the ATAES132A Chip.
 
The ATAES132A Chip is NOT based on the [https://github.com/MicrochipTech/cryptoauthlib Cryptoauthlib]. Therefore Atmel doesn't offer  complete or functioning example codes for this Chip. There are some example codes that might be working but only for the SAMD21 Xplained Pro board not the SAMR21 Xplained Pro B board, which we are using. I tried to use those example codes, with some changes so it would be working with our board, but I got ERROR messages each time. The main error probably is, that the SAMR21 Xplained Pro Microcontroller is not able to connect to the ATAES132A chip as a I2C slave. Some other problems are, that the example codes for the SAMD21 Xplained Pro board rely too much on that board, so it is nearly impossible to change it for the SAMR21 Xplained Pro B board. Another problem is that Atmel don't even offer an example code to connect to the extension boards, so I wasn't able to check if the ATAES132A chip is working, because no connection could be build. One of the codes is probably working if the connection could be established, because I got a build access and I could load the code onto the board, but I only got negative replies over the Usart.
 
Here is the link to the projects I tried: [https://github.com/georgie047/Wahlfachprojekt/tree/master/Code/ATAES132A]
 
== Security Features ==
[[File:Sicherheits-Features.pdf]]
 
== Cryptographic algorithms ==
[https://git.fh-campuswien.ac.at/c1710475053/atmel-sam-cryptography-with-cryptoauth-xpro-b/blob/master/Dokumentation/Cryptographic_Algorithms.pdf Click here for Pdf]
 
== User Guides ==
* [[File:User Guide Atmel.pdf]]
* [[File:User Guide EDGB.pdf]]
* [[File:User Guide Security Features.pdf]]
those User Guides are made available from Atmel to get a better understanding of their products.
 
== Used Hardware ==
 
* [[Cryptoauth XPro B]]
* [https://www.microchip.com/mplab/avr-support/atmel-studio-7 AtmelStudio]
* [https://www.microchip.com/developmenttools/ProductDetails/atsamr21-xpro Atmel SAM R21 Xplained Pro]
* [https://www.microchip.com/DevelopmentTools/ProductDetails/atcryptoauth-xpro-b ATCRYPTOAUTH-XPRO-B]
 
== Courses ==
 
* [[Einführendes Wahlfachprojekt]] (2019)
 
== References ==
 
Implementation:
* https://www.insidegadgets.com/2017/04/21/alarm-system-v3-part-3-using-the-atmel-cryptoauthentication-atsha204a/
* https://www.youtube.com/watch?v=TAOVKcN-pwY
* https://microchiptech.github.io/cryptoauthlib/html/index.html
 
Cryptographic algorithms:
* https://en.wikipedia.org/wiki/SHA-2
* http://www.iwar.org.uk/comsec/resources/cipher/sha256-384-512.pdf
* https://www.geeksforgeeks.org/implementation-diffie-hellman-algorithm/
* https://www.korelstar.de/informatik/aes.html
* https://en.wikipedia.org/wiki/Advanced_Encryption_Standard#Description_of_the_ciphers
 
[[Category:Documentation]]

Revision as of 15:30, 31 October 2021

Summary

/// Still to do (Petra) This documentation describes the usage of security features for microcontrollers especially for the Atmel Sam R21 with the expansion board Atcryptoauth Xpro B.

Requirements

Description

The Cryptoauth expansion board contains four chips which gets connected via I2C Chips:

Implementation for ATECCx08A and ATSHA204A

The implementation for ATECCx08A and ATSHA204A is based on the Cryptoauthlib.For ease of use of the ASF USART a custom abstraction layer got implemented.

The example program Implements:

  • Showing the serial numbers of the chips
  • Hashing a message
  • Showing locked zones
  • Locking zones
  • Generate a random number (only works with locked configuration Zone)
  • Generate a keypair (only works with locked configuration Zone)

Usage:

  • Connect your microcontroller to the EDGB USB port and upload the software
  • Open a terminal Program (Putty, TeraTerm)
  • Terminal program configuration:
  Baud rate     115200
  Data bits     8
  Stop bits     1
  Parity        none
  • Press the restart button in the controller
  • The implementation has an text menu which allows you to navigate by numbers

Implementation for ATAES132A

File:AES132ADatasheet.pdf -> that Datasheet is made available from Atmel to get a better understanding of the ATAES132A Chip.

The ATAES132A Chip is NOT based on the Cryptoauthlib. Therefore Atmel doesn't offer complete or functioning example codes for this Chip. There are some example codes that might be working but only for the SAMD21 Xplained Pro board not the SAMR21 Xplained Pro B board, which we are using. I tried to use those example codes, with some changes so it would be working with our board, but I got ERROR messages each time. The main error probably is, that the SAMR21 Xplained Pro Microcontroller is not able to connect to the ATAES132A chip as a I2C slave. Some other problems are, that the example codes for the SAMD21 Xplained Pro board rely too much on that board, so it is nearly impossible to change it for the SAMR21 Xplained Pro B board. Another problem is that Atmel don't even offer an example code to connect to the extension boards, so I wasn't able to check if the ATAES132A chip is working, because no connection could be build. One of the codes is probably working if the connection could be established, because I got a build access and I could load the code onto the board, but I only got negative replies over the Usart.

Here is the link to the projects I tried: [1]

Security Features

File:Sicherheits-Features.pdf

Cryptographic algorithms

Click here for Pdf

User Guides

those User Guides are made available from Atmel to get a better understanding of their products.

Used Hardware

Courses

References

Implementation:

Cryptographic algorithms: