Skip to content

Conversation

@CaptainHaddock2016
Copy link
Contributor

Added support for Elliptic Curve Diffie-Hellman key agreement. This function is present on the ATECC608A/B as per the datasheet.

Added support for Elliptic Curve Diffie-Hellman key agreement. This function is present on the ATECC608A/B as per the datasheet.
@tannewt tannewt requested a review from a team October 7, 2025 17:18
Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks okay to me. I tried to test it, but was unable to get the ATECC608 breakout working.

It seems every function I try with my breakout including the new ECDH function results in Execution Error status response from the ATECC. I get the same results with gen_key function as well. I am guessing that I have gotten my ATECC into some locked or bad state where it doesn't want to perform these actions. The datasheet isn't really clear about what this error indicates, and I don't think I want to chase it any further right now. I notice several other issues relating to "CRC errors" which look like similar if not the same symptoms I am seeing. The CRC check fails because the buffers are sized assuming successful output, the error codes are a much smaller output so they need to use a smaller buffer in order to calculate the proper CRC. I used debug=True to see the raw data and can tell from there that 0xf the constant for "Execution Error" is always being returned for every function I try.

I did confirm the ECDH op code used by this PR in the datasheet and the function for it appears to me like it should be working with an ATECC that is in an operable state.

@FoamyGuy FoamyGuy merged commit d7687be into adafruit:main Nov 4, 2025
1 check passed
adafruit-adabot pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 5, 2025
Updating https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15 to 3.0.2 from 3.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_ADS1x15#107 from pantheraleo-7/type-hint-forward-reference

Updating https://github.com/adafruit/Adafruit_CircuitPython_ATECC to 1.3.0 from 1.2.25:
  > Merge pull request adafruit/Adafruit_CircuitPython_ATECC#38 from CaptainHaddock2016/patch-1
  > Merge pull request adafruit/Adafruit_CircuitPython_ATECC#40 from akgamerz790/fix-issuer-subject-length-bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants