dmazzella / ucryptoauthlib Goto Github PK
View Code? Open in Web Editor NEWLightweight driver for Microchip's Crypto Authentication secure elements written in pure python for micropython
License: MIT License
Lightweight driver for Microchip's Crypto Authentication secure elements written in pure python for micropython
License: MIT License
Hello Damiano,
i tried to compile your lib for RP2 ARDUINO_NANO_RP2040_CONNECT.
These are my commands:
$ git clone https://github.com/micropython/micropython.git
$ cd micropython
micropython$ git submodule update --init
micropython$ git clone https://github.com/dmazzella/ucryptoauthlib.git micropython-lib/ucryptoauthlib
micropython$ make -C mpy-cross && make -C ports/rp2 BOARD=ARDUINO_NANO_RP2040_CONNECT FROZEN_MANIFEST="$(pwd)/micropython-lib/ucryptoauthlib/manifest.py""
After flashing the rp2040 with the uf2 image, and the following command:
device = ATECCX08A()
i got this error
File "<stdin>", line 1, in <module>
File "cryptoauthlib/device.py", line 30, in __init__
NoDevicesFoundError: For protocols that support device discovery (kit protocol), no devices were
found
Do you have an idea how I can fix the device detection for the arduino rp2040 https://docs.arduino.cc/hardware/nano-rp2040-connect ?
Kind regards,
Matt
I have started trying to implement the atcab_read_enc() function.
This function relies on the atcab_gendig() function which I notice in code appears to be implemented, but the readme does not have a tick next to it. What is the current state of the atcab_gendig() function?
I am using as a guide the datasheets including "Atmel CryptoAuthentication Encrypted Reads and Writes" and the Atmel C++ library, but just wonder if you have any advise for me?
thanks,
Chris
I am building Micropython for ESP32 as per the instructions https://github.com/micropython/micropython/tree/master/ports/esp32, having first copied the files in modules/cryptoauthlib to the modules/cryptoauthlib in the esp32 directory. This builds successfully and I can see it compiling the cryptoauthlib files. I then deployed this and attempt to test that the device is working. I confirmed that its visible on I2C bus with
from machine import Pin, I2C
scl = Pin(5)
sda = Pin(18)
i2c = I2C(-1, scl, sda)
print(i2c.scan())
which gave 96, which is correct. I then tried to initialize the device with:
from cryptoauthlib.device import ATECCX08A
from machine import Pin, I2C
device = ATECCX08A(bus=I2C(-1, Pin(5), Pin(18), freq=133000))
but this fails with:
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
File "cryptoauthlib/device.py", line 36, in __init__
File "cryptoauthlib/packet.py", line 59, in __getitem__
IndexError: memoryview index out of range
I actually have your library working correctly on another esp32 and device, but unfortunately I did not keep a copy of this binary. I have the swapped the devices between the esp32's and they both work correctly with my first esp32. I have tried this new binary on two different esp32's and it gives the same error on both.
Any suggests on how to fix this? Thx
Chris
I happen to find myself in a situation where I need to interface with the ATECC508A on a Raspberry Pi. Python is my prefered language, so when I found ucryptoauthlib, I thought it was perfect until I realised it was for MicroPython, not for Python (CPython).
I've mucked about to the point that I've got everything to import / run correctly except for trying to actually initialize the device. CPython kinda craps out when it goes looking for the machine
library and doesn't find it. I can't find any kind of analog or drop in replacement, even micropython-cpython-machine
doesn't seem to satisfy.
Do you have any idea what would need to be done to "port" ucryptoauthlib to run correctly under CPython instead of MicroPython?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.