{"id":27867460,"url":"https://github.com/android/keyattestation","last_synced_at":"2025-05-04T22:43:58.021Z","repository":{"id":290638428,"uuid":"864209764","full_name":"android/keyattestation","owner":"android","description":"Kotlin library for evaluating Android Key Attestation certification chains.","archived":false,"fork":false,"pushed_at":"2025-04-29T20:30:48.000Z","size":107,"stargazers_count":33,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-29T21:32:59.034Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://developer.android.com/privacy-and-security/security-key-attestation","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/android.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2024-09-27T17:43:56.000Z","updated_at":"2025-04-29T20:30:52.000Z","dependencies_parsed_at":"2025-04-29T21:44:04.189Z","dependency_job_id":null,"html_url":"https://github.com/android/keyattestation","commit_stats":null,"previous_names":["android/keyattestation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android%2Fkeyattestation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android%2Fkeyattestation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android%2Fkeyattestation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android%2Fkeyattestation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/android","download_url":"https://codeload.github.com/android/keyattestation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252411759,"owners_count":21743602,"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":[],"created_at":"2025-05-04T22:43:56.750Z","updated_at":"2025-05-04T22:43:58.013Z","avatar_url":"https://github.com/android.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Android Key Attestation Verifier\n\nA Kotlin library for verifying Android key attestation certificate chains.\n\n## Usage\n\n```kotlin\n// Create a verifier with trust anchors, revocation info, and time source\nval verifier = Verifier(\n  { setOf(TrustAnchor(rootCertificate, null)) },  // Trust anchors source\n  { setOf\u003cString\u003e() },                            // Revoked serials source\n  { Instant.now() }                               // Time source\n)\n\n// Verify an attestation certificate chain with challenge\nval result = verifier.verify(certificateChain, challenge)\n\n// Handle the verification result\nwhen (result) {\n  is VerificationResult.Success -\u003e {\n    // Access verified information\n    val publicKey = result.publicKey\n    val securityLevel = result.securityLevel\n    val verifiedBootState = result.verifiedBootState\n    val deviceInformation = result.deviceInformation\n  }\n  is VerificationResult.ChallengeMismatch -\u003e // Handle challenge mismatch\n  is VerificationResult.PathValidationFailure -\u003e // Handle validation failure\n  is VerificationResult.ChainParsingFailure -\u003e // Handle parsing failure\n  is VerificationResult.ExtensionParsingFailure -\u003e // Handle extension parsing issues\n  is VerificationResult.ExtensionConstraintViolation -\u003e // Handle constraint violations\n}\n```\n\n## Building\n\n```bash\n./gradlew build\n```\n\n## Testing\n\n```bash\n./gradlew test\n```\n\n## Roots\n\nAndroid Key Attestation root certificates are documented\n[here](https://developer.android.com/privacy-and-security/security-key-attestation#root_certificate).\n\n## Getting Revoked Serials\n\nThe revoked serials may be retrieved from https://android.googleapis.com/attestation/status.\n\nSee [here](https://developer.android.com/privacy-and-security/security-key-attestation#certificate_status)\nfor more information about the format of the data.\n\n## License\n\nThis project is licensed under the Apache License 2.0 - see the\n[LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroid%2Fkeyattestation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandroid%2Fkeyattestation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroid%2Fkeyattestation/lists"}