{"id":27386192,"url":"https://github.com/ubavic/srb-id-pkcs11","last_synced_at":"2026-04-06T14:04:14.900Z","repository":{"id":284003595,"uuid":"953526116","full_name":"ubavic/srb-id-pkcs11","owner":"ubavic","description":"Open source PKCS#11 module for Serbian ID cards","archived":false,"fork":false,"pushed_at":"2026-03-25T18:44:41.000Z","size":200,"stargazers_count":65,"open_issues_count":6,"forks_count":8,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-03-26T19:24:53.173Z","etag":null,"topics":["pcsclite","pkcs11","public-key-cryptography","serbia","smart-card","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubavic.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-23T15:16:17.000Z","updated_at":"2026-03-25T18:44:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"b64b79f1-c54d-4aa6-a1e9-961e0e122fa2","html_url":"https://github.com/ubavic/srb-id-pkcs11","commit_stats":null,"previous_names":["ubavic/srb-id-pkcs11"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/ubavic/srb-id-pkcs11","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubavic%2Fsrb-id-pkcs11","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubavic%2Fsrb-id-pkcs11/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubavic%2Fsrb-id-pkcs11/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubavic%2Fsrb-id-pkcs11/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubavic","download_url":"https://codeload.github.com/ubavic/srb-id-pkcs11/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubavic%2Fsrb-id-pkcs11/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31475207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T08:36:52.050Z","status":"ssl_error","status_checked_at":"2026-04-06T08:36:51.267Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["pcsclite","pkcs11","public-key-cryptography","serbia","smart-card","zig"],"created_at":"2025-04-13T17:17:55.142Z","updated_at":"2026-04-06T14:04:14.888Z","avatar_url":"https://github.com/ubavic.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PKCS#11 module for Serbian ID\n\nThis is an open source [PKCS#11 v2.40](https://docs.oasis-open.org/pkcs11/pkcs11-base/v2.40/pkcs11-base-v2.40.html) module (middleware) for Serbian ID smart cards. It is designed for smart cards produced by Gemalto and aims to support the functionality required for authenticating and signing in to official state portals (like [eUprava](https://euprava.gov.rs/) or [ePorezi](https://eporezi.purs.gov.rs/user/login.html)).\n\nFor reading document data from Serbian ID cards, check the [Baš Čelik](https://github.com/ubavic/bas-celik) software and it's [wiki](https://github.com/ubavic/bas-celik/wiki) (on Serbian).\n\n## Project status\n\nThe module should support all use cases of MUP certificates for end users.\n\nThe module supports the `CKM_MD5`, `CKM_SHA_1`, `CKM_SHA256`, `CKM_SHA384`, and `CKM_SHA512` digest algorithms (implemented in software, as it is in the original module).\nA random number generator is implemented on the token itself.\nSigning and verification are supported for the `CKM_RSA_PKCS`, `CKM_MD5_RSA_PKCS`, `CKM_SHA1_RSA_PKCS`, `CKM_SHA256_RSA_PKCS`, `CKM_SHA384_RSA_PKCS`, and `CKM_SHA512_RSA_PKCS` mechanisms.\nEncryption and decryption are implemented via `CKM_RSA_X_509` and `CKM_RSA_PKCS`.\nGeneral session and token management functions are implemented.\n\nFunctions intended for security officers (`CKU_SO`) are not planned for implementation at this stage. They are not required for end users, and omitting them reduces code complexity.\n\n## Usage on Linux\n\nTo use this module, you need to have the `pcscd` service enabled, and the `ccid` driver installed.\n\nDownload the latest `.so` file from [Releases](https://github.com/ubavic/srb-id-pkcs11/releases) and copy it to a permanent location (for example: `/usr/lib/` or `~/lib/`).\n\nIf you use Firefox, add a new PKCS#11 module using the **Privacy \u0026 Security** settings in the browser ([documentation](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/pkcs11)). For the *module filename*, set the path to the `.so` file you just downloaded. After restarting Firefox, you can use the module for signing in on websites.\n\nChrome does not allow loading a PKCS#11 module through the browser settings. Instead, you must use `modutil` to add a module to the NSS database. This database is most likely located at `~/.pki/nssdb/`. Make sure you don't use `~` in paths, and make sure you close all browsers you have opened. For example:\n\n```bash\nmodutil -dbdir sql:.pki/nssdb/ -add \"Srb Id PKCS11\" -libfile PATH_TO_SO\n```\n\nAfter starting Chrome, you will be able to use the module.\n\nOther programs, like Okular, usually use NSS databases located in `~/.pki` or `~/.mozilla`.\n\nNote that Snap/Flatpak applications (including browsers) can have issues loading module, and additional configuration may be required.\n\n## Usage on macOS\n\nDownload the latest `.dylib` file from [Releases](https://github.com/ubavic/srb-id-pkcs11/releases) and copy it to a permanent location. There are separate `dylib` files for Intel (x64) and ARM Macs.\n\nIn Firefox, add a new PKCS#11 module using the **Privacy \u0026 Security** settings in the browser ([documentation](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/pkcs11)). For the *module filename*, set the path to the `.dylib` file you just downloaded. After restarting Firefox, you can use the module for signing in.\n\nIf your system’s security settings prevent downloaded `.dylib` files from executing, refer to Apple’s [official documentation](https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unknown-developer-mh40616/mac) for instructions on enabling the use of unsigned libraries. Alternatively, you may install Zig and build the project locally.\n\n## Compilation\n\nOn Linux, ensure that the [PCSC Lite](https://pcsclite.apdu.fr/) (development) library (`libpcsclite.so`) is installed on your system. Most Linux package managers provide this package. Also install `ccid` driver, and enable `pcscd` service.\n\nOn Windows and macOS, PC/SC libraries should already be installed, and the service enabled by default.\n\nBuild the project with:\n\n```\nzig build\n```\n\n## Warranty Disclaimer\n\nThis software is provided *as is*, without any warranty of any kind. Use of this module is at your own risk, and it may potentially damage your token.\n\n## License\n\nThe code is released under the [Unlicense](LICENSE). You are free to do whatever you want with the code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubavic%2Fsrb-id-pkcs11","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubavic%2Fsrb-id-pkcs11","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubavic%2Fsrb-id-pkcs11/lists"}