{"id":16985863,"url":"https://github.com/r4gus/candy-stick","last_synced_at":"2025-07-11T23:34:11.231Z","repository":{"id":118775962,"uuid":"542284138","full_name":"r4gus/candy-stick","owner":"r4gus","description":"CTAP2 authenticator implementation in Zig","archived":false,"fork":false,"pushed_at":"2023-02-21T20:15:25.000Z","size":8227,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T03:36:59.336Z","etag":null,"topics":["authentication","authenticator","ctap","ctap2","fido","fido2","zig","ziglang"],"latest_commit_sha":null,"homepage":"","language":"C","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/r4gus.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,"zenodo":null}},"created_at":"2022-09-27T20:50:58.000Z","updated_at":"2023-02-21T16:08:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"c72337e9-94be-41df-a284-87e3f587b854","html_url":"https://github.com/r4gus/candy-stick","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/r4gus/candy-stick","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r4gus%2Fcandy-stick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r4gus%2Fcandy-stick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r4gus%2Fcandy-stick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r4gus%2Fcandy-stick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r4gus","download_url":"https://codeload.github.com/r4gus/candy-stick/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r4gus%2Fcandy-stick/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264913677,"owners_count":23682690,"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":["authentication","authenticator","ctap","ctap2","fido","fido2","zig","ziglang"],"created_at":"2024-10-14T02:44:19.048Z","updated_at":"2025-07-11T23:34:11.224Z","avatar_url":"https://github.com/r4gus.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Candy Stick\n\nThere have been some API changes to the fido2 library, i.e., this project will currently not compile. Please see [candy-stick-nrf](https://github.com/r4gus/candy-stick-nrf) for a working example.\n\nCTAP2 firmware\n\n```\nsrc/\n  |-ctaphid/\n  | |-response.zig  (for generating CTAPHID response packets)\n  | |-misc.zig      (helper functions and constants)\n  | |-commands.zig  (CTAPHID commands)\n  |-zigusb.zig      (entry point and USB callbacks)\n```\n\n## Build\n\nTo build the project you must have installed the [Zig](https://ziglang.org/) compiler on your system.\n\nYou also need the `arm-none-eabi` build tools. \n\n### Arch\n\n```\nsudo pacman -S arm-none-eabi-gcc arm-none-eabi-newlib\n```\n\n### Ubuntu\n\n```\nsudo apt install gcc-arm-none-eabi\n```\n\n\u003e **NOTE**: Without `*-newlib` (Arch) you'll get the `fatal error: stdint.h: No such file or directory\n # include_next \u003cstdint.h\u003e` error.\n\nAlso make sure that you've `git` installed. Then just run `./build` from the root directory.\n\n## Flash\n\nTo flash the firmware install [edbg](https://github.com/ataradov/edbg) and then just run `./flash` from the \nroot directory.\n\n\u003e Note: This project targets the SAM E51 Curiosity Nano, i.e. the\n\u003e ATSAME51J20A (ARM Cortex-M4F) chip.\n\n## Tools\n\nTo use the tools you need to install `libfido2`.\n\n### Arch\n\n```\nsudo pacman -S libfido2\n```\n\n### Ubuntu\n\n```\n$ sudo apt install libfido2-1 libfido2-dev libfido2-doc fido2-tools\n```\n\n### Build from source\n```\ngit clone https://github.com/Yubico/libfido2.git\ncd libfido2\ncmake -B build\nmake -C build\nsudo make -C build install\n```\n\n## Important Notes\n\n* The `ztap` library doesn't sort keys automatically (due to a bug when calling the Zig sort function - program hangs). One must make sure that the returned CBOR is in CTAP canonical CBOR encoding form, e.g. the keys have to be sorted in a specific way. Otherwise libraries like libfido2 will complain.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr4gus%2Fcandy-stick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr4gus%2Fcandy-stick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr4gus%2Fcandy-stick/lists"}