{"id":29599460,"url":"https://github.com/codenlighten/bsv-elliptic-fix","last_synced_at":"2025-07-20T11:07:02.447Z","repository":{"id":282777873,"uuid":"949620233","full_name":"codenlighten/bsv-elliptic-fix","owner":"codenlighten","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-16T21:24:47.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T22:25:11.911Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/codenlighten.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":"2025-03-16T21:04:10.000Z","updated_at":"2025-03-16T21:24:50.000Z","dependencies_parsed_at":"2025-03-16T22:25:20.687Z","dependency_job_id":"1775f496-258d-4c5e-973e-a79156919e4c","html_url":"https://github.com/codenlighten/bsv-elliptic-fix","commit_stats":null,"previous_names":["codenlighten/bsv-elliptic-fix"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codenlighten/bsv-elliptic-fix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenlighten%2Fbsv-elliptic-fix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenlighten%2Fbsv-elliptic-fix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenlighten%2Fbsv-elliptic-fix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenlighten%2Fbsv-elliptic-fix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codenlighten","download_url":"https://codeload.github.com/codenlighten/bsv-elliptic-fix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenlighten%2Fbsv-elliptic-fix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266112314,"owners_count":23878022,"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-07-20T11:07:01.726Z","updated_at":"2025-07-20T11:07:02.430Z","avatar_url":"https://github.com/codenlighten.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BSV Key Management System\n\nA comprehensive Bitcoin SV (BSV) key management system with support for key generation, signing, encryption, hashing, and Shamir Secret Sharing.\n\n## Features\n\n### Key Generation\n- 24-word mnemonic generation using secure entropy\n- BIP44 hierarchical deterministic key derivation\n- Multiple key types with standard paths:\n  - Identity (m/44'/236'/0'/0/0)\n  - Financial (m/44'/0'/0'/0/0)\n  - Contractual (m/44'/236'/1'/0/0)\n  - Property (m/44'/236'/2'/0/0)\n  - Document (m/44'/236'/3'/0/0)\n  - Privacy (m/44'/236'/4'/0/0)\n- Deterministic key generation (same mnemonic produces same keys)\n\n### Signing\n- ECDSA signatures\n  - Returns DER-encoded signatures\n  - Verification using public key\n- EdDSA signatures\n  - Uses Ed25519 curve\n  - Returns 128-character hex signatures\n  - Verification using WIF key\n- Comprehensive error handling\n\n### Hashing\n- SHA256\n- SHA512\n- Double SHA256 (Bitcoin's hash)\n- HASH160 (RIPEMD160(SHA256))\n- Hash verification support\n\n### Encryption\n- AES encryption/decryption\n- Password-based key derivation\n- Support for both string and JSON data\n- Secure salting\n\n### Shamir Secret Sharing\n- Split secrets into configurable shares\n  - Minimum 2 shares required\n  - Configurable threshold (\u003e= 2 and \u003c= total shares)\n  - Returns hex-encoded shares\n- Combine shares to recover secrets\n  - Validates hex format of shares\n  - UTF-8 validation for reconstructed secrets\n  - Error handling for invalid combinations\n\n## Web Interface\nThe system includes a modern web interface built with Tailwind CSS that provides access to all functionality:\n- Key generation with mnemonic display\n- Signing interface for both ECDSA and EdDSA\n- Hash computation with multiple algorithms\n- Encryption/decryption tools\n- Shamir Secret Sharing with dynamic share management\n\n## Security Features\n- Input validation across all operations\n- Secure random number generation\n- Error handling for all cryptographic operations\n- Protection against invalid share combinations\n- Hex and UTF-8 validation for shares and secrets\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone \u003crepository-url\u003e\n```\n\n2. Install dependencies:\n```bash\nnpm install\n```\n\n3. Start the server:\n```bash\nnode index.js\n```\n\n4. Access the web interface at http://localhost:3000\n\n## API Endpoints\n\n### Key Management\n- POST /keys/generate - Generate new keys with mnemonic\n- POST /keys/from-mnemonic - Recover keys from mnemonic\n\n### Signing\n- POST /sign/ecdsa - Sign data using ECDSA\n- POST /sign/eddsa - Sign data using EdDSA\n\n### Hashing\n- POST /hash - Compute hash with specified algorithm\n\n### Encryption\n- POST /encrypt - Encrypt data\n- POST /decrypt - Decrypt data\n\n### Shamir Secret Sharing\n- POST /shamir/split - Split a secret into shares\n- POST /shamir/combine - Combine shares to recover secret\n\n## Testing\nThe system includes comprehensive test suites for all components:\n- Key generation and derivation tests\n- Signature creation and verification tests\n- Hash function tests\n- Encryption/decryption tests\n- Shamir Secret Sharing tests with BSV-specific scenarios\n\n## Security Considerations\n1. Always use secure entropy for key generation\n2. Store mnemonics and keys securely\n3. Use appropriate thresholds for Shamir Secret Sharing\n4. Validate all inputs and outputs\n5. Handle errors appropriately\n\n## Dependencies\n- bsv: Bitcoin SV library\n- crypto-js: For AES encryption\n- shamirs-secret-sharing: For Shamir Secret Sharing\n- express: Web server\n- cors: Cross-origin resource sharing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenlighten%2Fbsv-elliptic-fix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodenlighten%2Fbsv-elliptic-fix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenlighten%2Fbsv-elliptic-fix/lists"}