{"id":23103335,"url":"https://github.com/bok1c4/pgpkeytypedetector","last_synced_at":"2025-10-08T00:36:44.790Z","repository":{"id":260057592,"uuid":"876683276","full_name":"bok1c4/PGPKeyTypeDetector","owner":"bok1c4","description":"This includes RSA and ECC cryptographic algorithms","archived":false,"fork":false,"pushed_at":"2024-10-29T08:32:10.000Z","size":2010,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T21:32:48.696Z","etag":null,"topics":["cryptography","go","pgp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bok1c4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-10-22T11:42:56.000Z","updated_at":"2024-10-29T08:32:13.000Z","dependencies_parsed_at":"2024-10-29T10:14:22.062Z","dependency_job_id":null,"html_url":"https://github.com/bok1c4/PGPKeyTypeDetector","commit_stats":null,"previous_names":["b0kic4/pgpkeytypedetector","bok1c4/pgpkeytypedetector"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bok1c4/PGPKeyTypeDetector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bok1c4%2FPGPKeyTypeDetector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bok1c4%2FPGPKeyTypeDetector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bok1c4%2FPGPKeyTypeDetector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bok1c4%2FPGPKeyTypeDetector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bok1c4","download_url":"https://codeload.github.com/bok1c4/PGPKeyTypeDetector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bok1c4%2FPGPKeyTypeDetector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278871828,"owners_count":26060522,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cryptography","go","pgp"],"created_at":"2024-12-17T00:13:52.527Z","updated_at":"2025-10-08T00:36:44.757Z","avatar_url":"https://github.com/bok1c4.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PGP Key Type Detector\n\n## Overview\nPGP Key Type Detector is a Go-based tool designed to detect the type of PGP keys. The program can identify whether the provided key is:\n\n- **ECC Public Key**\n- **ECC Private Key**\n- **RSA Public Key** (PKIX or PKCS1 format)\n- **RSA Private Key** (PKCS1 or PKCS8 format)\n\nThe tool parses keys encoded in PEM format and detects whether the key is a public or private key and whether it's based on **ECC** or **RSA** algorithms.\n\n## Features\n- Detects **ECC** (Elliptic Curve Cryptography) keys:\n  - ECC Public Key\n  - ECC Private Key\n- Detects **RSA** (Rivest–Shamir–Adleman) keys:\n  - RSA Public Key (both PKIX and PKCS1 formats)\n  - RSA Private Key (both PKCS1 and PKCS8 formats)\n\n## Usage\n### Input\nThe tool takes PEM-encoded keys, with headers such as:\n- `-----BEGIN PUBLIC KEY-----` (for public keys)\n- `-----BEGIN PRIVATE KEY-----` (for private keys)\n\n### Output\nThe tool returns one of the following:\n- **ECC Public Key**\n- **ECC Private Key**\n- **RSA Public Key** (PKIX format or PKCS1 format)\n- **RSA Private Key** (PKCS1 format or PKCS8 format)\n\n## Example\n\n```go\nmyKeys := KeysData{\n    EcPub:  `-----BEGIN PUBLIC KEY-----\n            (Your ECC public key here)\n            -----END PUBLIC KEY-----`,\n    EcPriv: `-----BEGIN PRIVATE KEY-----\n            (Your ECC private key here)\n            -----END PRIVATE KEY-----`,\n    RsaPub: `-----BEGIN PUBLIC KEY-----\n            (Your RSA public key here)\n            -----END PUBLIC KEY-----`,\n    RsaPriv: `-----BEGIN PRIVATE KEY-----\n            (Your RSA private key here)\n            -----END PRIVATE KEY-----`,\n}\n\nkeyType, err := kd.DetectKeyType(myKeys.EcPub)\nfmt.Println(\"Detected Key Type:\", keyType)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbok1c4%2Fpgpkeytypedetector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbok1c4%2Fpgpkeytypedetector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbok1c4%2Fpgpkeytypedetector/lists"}