{"id":13801411,"url":"https://github.com/dmazzella/ucryptoauthlib","last_synced_at":"2026-01-18T10:48:19.107Z","repository":{"id":46834907,"uuid":"149888880","full_name":"dmazzella/ucryptoauthlib","owner":"dmazzella","description":"Lightweight driver for Microchip's Crypto Authentication secure elements written in pure python for micropython","archived":false,"fork":false,"pushed_at":"2024-08-12T12:39:43.000Z","size":2011,"stargazers_count":41,"open_issues_count":0,"forks_count":9,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-18T16:57:28.810Z","etag":null,"topics":["atecc","atecc508a","atecc608a","micropython","pyboard"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmazzella.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-22T15:20:01.000Z","updated_at":"2024-09-06T09:38:10.000Z","dependencies_parsed_at":"2024-11-18T16:50:46.187Z","dependency_job_id":"940af5c6-e2d0-4833-a3bb-afbd992c0cfd","html_url":"https://github.com/dmazzella/ucryptoauthlib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmazzella%2Fucryptoauthlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmazzella%2Fucryptoauthlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmazzella%2Fucryptoauthlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmazzella%2Fucryptoauthlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmazzella","download_url":"https://codeload.github.com/dmazzella/ucryptoauthlib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253932820,"owners_count":21986454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atecc","atecc508a","atecc608a","micropython","pyboard"],"created_at":"2024-08-04T00:01:22.545Z","updated_at":"2026-01-18T10:48:19.065Z","avatar_url":"https://github.com/dmazzella.png","language":"Python","readme":"# ucryptoauthlib\n\nLightweight driver for Microchip Crypto Authentication secure elements written in pure python for micropython.\n\nWARNING: this project is in beta stage and is subject to changes of the\ncode-base, including project-wide name changes and API changes.\n\n\u003e [!TIP]\n\u003e If you find **ucryptoauthlib** useful, consider :star: this project\n\u003e and why not ... [Buy me a coffee](https://www.buymeacoffee.com/damianomazp) :smile:\n\nFeatures\n---------------------\n\n- Allows PyBoard to control Microchip Crypto Authentication secure elements\n- Automatic recognition of the Microchip Crypto Authentication secure element\n- The API are the same of the [Library](https://github.com/MicrochipTech/cryptoauthlib) wrote by Microchip\n\nUsage\n---------------------\n\n- PyBoard basic connection:\n\n\u003c/br\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/dmazzella/ucryptoauthlib/master/docs/PYBOARD_ATECCX08A_bb.png\" width=\"80%\" height=\"80%\" alt=\"PYBOARD plus ATECCX08A\"/\u003e\n\u003c/br\u003e\n\n\n- BASIC\n\n```python\nMicroPython v1.10-127-g5801a003f-dirty on 2019-02-24; PYBv1.1 with STM32F405RG\nType \"help()\" for more information.\n\u003e\u003e\u003e from cryptoauthlib.device import ATECCX08A\n\u003e\u003e\u003e device = ATECCX08A()\n\u003e\u003e\u003e print(device)\n\u003cATECC608A address=0x60 retries=20\u003e\n\u003e\u003e\u003e\n```\n\n- TESTS:\n\n```python\nMicroPython v1.10-127-g5801a003f-dirty on 2019-02-24; PYBv1.1 with STM32F405RG\nType \"help()\" for more information.\n\u003e\u003e\u003e import ateccX08a; ateccX08a.test()\nINFO:ateccX08a \u003cATECC608A address=0x60 retries=20\u003e\nINFO:ateccX08a INFO SUCCEDED\nINFO:ateccX08a SHA SUCCEDED\nINFO:ateccX08a RANDOM SUCCEDED\nINFO:ateccX08a NONCE SUCCEDED\nINFO:ateccX08a READ SUCCEDED\nINFO:ateccX08a WRITE SUCCEDED\nINFO:ateccX08a LOCK SKIPPED\nINFO:ateccX08a VERIFY SUCCEDED\nINFO:ateccX08a SIGN SUCCEDED\nINFO:ateccX08a SELFTEST SUCCEDED\n\u003e\u003e\u003e \n```\n\nEnable DEBUG:\n```python\nimport logging\nlogging.basicConfig(level=logging.DEBUG)\n```\n\nExternal dependencies\n---------------------\n\nOnly for tests:\n'logging' already available into folder 'micropython-lib' of this repository\n\nInstall 'cryptoauthlib' into the PyBoard\n---------------------\n\n1. Freeze package using FROZEN_MANIFEST:\n   ```bash\n   $ git clone https://github.com/micropython/micropython.git\n   $ cd micropython\n   micropython$ git submodule update --init\n   micropython$ git clone https://github.com/dmazzella/ucryptoauthlib.git micropython-lib/ucryptoauthlib\n   micropython$ make -C mpy-cross \u0026\u0026 make -C ports/stm32 BOARD=PYBD_SF6 FROZEN_MANIFEST=\"$(pwd)/micropython-lib/ucryptoauthlib/manifest.py\"\n   ```\n   P.S.\n   'micropython-lib' is an example where to copy 'ucryptoauthlib', if you prefer to change this directory you need to modify manifest.py to reflect the changes\n\nSoftware\n---------------------\n\nCurrently supported commands are:\n\n* INFO\n* LOCK\n* NONCE\n* RANDOM\n* READ (1)\n* SHA (1)\n* WRITE (1)\n* VERIFY (1)\n* GENKEY\n* SIGN\n* SELFTEST\n\n  (1) Not all features are implemented, see follow list for details\n\nCurrently implemented methods are:\n\n![API Implemented](https://progress-bar.dev/61)\n\n- [x] ```atcab_version()```\n- [x] ```atcab_get_addr(zone, slot=0, block=0, offset=0)```\n- [x] ```atcab_get_zone_size(zone, slot=0)```\n- [ ] ```atcab_checkmac(mode, key_id, challenge, response,  other_data)```\n- [ ] ```atcab_counter(mode, counter_id)```\n- [ ] ```atcab_counter_increment(counter_id)```\n- [ ] ```atcab_counter_read(counter_id)```\n- [ ] ```atcab_derivekey(mode, key_id, mac)```\n- [ ] ```atcab_ecdh_base(mode, key_id, public_key)```\n- [ ] ```atcab_ecdh(key_id, public_key)```\n- [ ] ```atcab_ecdh_enc(key_id, public_key, read_key, read_key_id)```\n- [ ] ```atcab_ecdh_ioenc(key_id, public_key, io_key)```\n- [ ] ```atcab_ecdh_tempkey(public_key)```\n- [ ] ```atcab_ecdh_tempkey_ioenc(public_key, io_key)```\n- [x] ```atcab_gendig(zone, key_id, other_data)```\n- [x] ```atcab_genkey_base(mode, key_id, other_data=None)```\n- [x] ```atcab_genkey(key_id)```\n- [x] ```atcab_get_pubkey(key_id)```\n- [ ] ```atcab_hmac(mode, key_id)```\n- [x] ```atcab_info_base(mode=0)```\n- [x] ```atcab_info()```\n- [ ] ```atcab_kdf(mode, key_id, details, message)```\n- [x] ```atcab_lock(mode, crc=0)```\n- [x] ```atcab_lock_config_zone()```\n- [x] ```atcab_lock_config_zone_crc(crc)```\n- [x] ```atcab_lock_data_zone()```\n- [x] ```atcab_lock_data_zone_crc(crc)```\n- [x] ```atcab_lock_data_slot(slot)```\n- [ ] ```atcab_mac(mode, key_id, challenge)```\n- [x] ```atcab_nonce_base(mode, zero=0, numbers=None)```\n- [x] ```atcab_nonce(numbers=None)```\n- [x] ```atcab_nonce_load(target, numbers=None)```\n- [x] ```atcab_nonce_rand(numbers=None)```\n- [x] ```atcab_challenge(numbers=None)```\n- [x] ```atcab_challenge_seed_update(numbers=None)```\n- [ ] ```atcab_priv_write(key_id, priv_key, write_key_id, write_key)```\n- [x] ```atcab_random()```\n- [x] ```atcab_read_zone(zone, slot=0, block=0, offset=0, length=0)```\n- [x] ```atcab_read_serial_number()```\n- [x] ```atcab_read_bytes_zone(zone, slot=0, block=0, offset=0, length=0)```\n- [x] ```atcab_is_slot_locked(slot)```\n- [x] ```atcab_is_locked(zone)```\n- [x] ```atcab_read_config_zone()```\n- [x] ```atcab_read_enc(key_id, block, data, enc_key, enc_key_id)```\n- [ ] ```atcab_cmp_config_zone(config_data)```\n- [ ] ```atcab_read_sig(slot)```\n- [x] ```atcab_read_pubkey(slot)```\n- [ ] ```atcab_secureboot(mode, param2, digest, signature)```\n- [ ] ```atcab_secureboot_mac(mode, digest, signature, num_in, io_key)```\n- [x] ```atcab_selftest(mode, param2=0)```\n- [x] ```atcab_sha_base(mode=0, data=b'', key_slot=None)```\n- [x] ```atcab_sha(data)```\n- [ ] ```atcab_sha_hmac(data, key_slot, target)```\n- [x] ```atcab_sign_base(mode, key_id)```\n- [x] ```atcab_sign(key_id, message)```\n- [x] ```atcab_sign_internal(key_id, is_invalidate=False, is_full_sn=False)```\n- [x] ```atcab_updateextra(mode, value)```\n- [x] ```atcab_verify(mode, key_id, signature, public_key=None, other_data=None, mac=None)```\n- [x] ```atcab_verify_extern(message, signature, public_key)```\n- [ ] ```atcab_verify_extern_mac(message, signature, public_key, num_in, io_key, is_verified)```\n- [x] ```atcab_verify_stored(message, signature, key_id)```\n- [ ] ```atcab_verify_stored_mac(message, signature, key_id, num_in, io_key, is_verified)```\n- [ ] ```atcab_verify_validate( key_id, signature, other_data, is_verified)```\n- [ ] ```atcab_verify_invalidate( key_id, signature, other_data, is_verified)```\n- [x] ```atcab_write(zone, address, value=None, mac=None)```\n- [x] ```atcab_write_zone(zone, slot=0, block=0, offset=0, data=None)```\n- [x] ```atcab_write_bytes_zone(zone, slot=0, offset=0, data=None)```\n- [x] ```atcab_write_pubkey(slot, public_key)```\n- [x] ```atcab_write_config_zone(config_data)```\n- [ ] ```atcab_write_enc(key_id, block, data, enc_key, enc_key_id)```\n- [ ] ```atcab_write_config_counter(counter_id, counter_value)```\n\nHardware\n---------------------\n\nCurrently supported devices are:\n\n- [ATECC508A](http://www.microchip.com/ATECC508A)\n- [ATECC608A](http://www.microchip.com/ATECC608A)\n","funding_links":["https://www.buymeacoffee.com/damianomazp"],"categories":["Libraries"],"sub_categories":["Communications"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmazzella%2Fucryptoauthlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmazzella%2Fucryptoauthlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmazzella%2Fucryptoauthlib/lists"}