{"id":13465676,"url":"https://github.com/bitcoinjs/bip38","last_synced_at":"2025-04-12T22:36:28.486Z","repository":{"id":14564768,"uuid":"17280650","full_name":"bitcoinjs/bip38","owner":"bitcoinjs","description":"BIP38 is a standard process to encrypt Bitcoin and crypto currency private keys that is less susceptible to brute force attacks thus protecting the user.","archived":false,"fork":false,"pushed_at":"2023-12-23T06:02:38.000Z","size":937,"stargazers_count":215,"open_issues_count":9,"forks_count":99,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-04-09T01:36:34.487Z","etag":null,"topics":["bip38","bitcoin","bitcoinjs","encryption","javascript","scrypt"],"latest_commit_sha":null,"homepage":"http://cryptocoinjs.com/modules/currency/bip38/","language":"JavaScript","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/bitcoinjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2014-02-28T08:55:01.000Z","updated_at":"2025-04-06T19:50:27.000Z","dependencies_parsed_at":"2024-01-15T03:41:13.210Z","dependency_job_id":null,"html_url":"https://github.com/bitcoinjs/bip38","commit_stats":{"total_commits":161,"total_committers":14,"mean_commits":11.5,"dds":0.6024844720496895,"last_synced_commit":"5af12b99017fbe9658a390f7dfb5bd825e4ff613"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinjs%2Fbip38","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinjs%2Fbip38/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinjs%2Fbip38/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinjs%2Fbip38/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitcoinjs","download_url":"https://codeload.github.com/bitcoinjs/bip38/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248182077,"owners_count":21060893,"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":["bip38","bitcoin","bitcoinjs","encryption","javascript","scrypt"],"created_at":"2024-07-31T15:00:33.724Z","updated_at":"2025-04-12T22:36:28.466Z","avatar_url":"https://github.com/bitcoinjs.png","language":"JavaScript","readme":"# bip38\n\n[![build status](https://secure.travis-ci.org/bitcoinjs/bip38.svg)](http://travis-ci.org/bitcoinjs/bip38)\n[![Coverage Status](https://img.shields.io/coveralls/cryptocoinjs/bip38.svg)](https://coveralls.io/r/cryptocoinjs/bip38)\n[![Version](http://img.shields.io/npm/v/bip38.svg)](https://www.npmjs.org/package/bip38)\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\nA JavaScript component that adheres to the [BIP38](https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki) standard to secure your crypto currency private keys. Fully compliant with Node.js and the browser (via Browserify).\n\n\n## Why?\nBIP38 is a standard process to encrypt Bitcoin and crypto currency private keys that is impervious to brute force attacks thus protecting the user.\n\n\n## Package Info\n- homepage: [http://cryptocoinjs.com/modules/currency/bip38/](http://cryptocoinjs.com/modules/currency/bip38/)\n- github: [https://github.com/cryptocoinjs/bip38](https://github.com/cryptocoinjs/bip38)\n- tests: [https://github.com/cryptocoinjs/bip38/tree/master/test](https://github.com/cryptocoinjs/bip38/tree/master/test)\n- issues: [https://github.com/cryptocoinjs/bip38/issues](https://github.com/cryptocoinjs/bip38/issues)\n- license: **MIT**\n- versioning: [http://semver-ftw.org](http://semver-ftw.org)\n\n\n## Usage\n\n### Installation\n\n    npm install --save bip38\n\n\n### Async methods\n\nAsync methods are available, but using them will be slower, but free up the event loop in intervals you choose.\n\nFor benchmark results, please see the section in the README of the [scryptsy](https://github.com/cryptocoinjs/scryptsy/tree/395c3b09b21e06ea4a6cc2933e046c0984a414c5#benchmarks) library. Increasing the interval will decrease the performance hit, but increase the span between event loop free ups (UI drawing etc.) promiseInterval is the last optional parameter after scryptParams. There is no recommendation currently, as the performance trade off is app specific.\n\n### API\n### encrypt(buffer, compressed, passphrase[, progressCallback, scryptParams])\n\n``` javascript\nvar bip38 = require('bip38')\nvar wif = require('wif')\n\nvar myWifString = '5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR'\nvar decoded = wif.decode(myWifString)\n\nvar encryptedKey = bip38.encrypt(decoded.privateKey, decoded.compressed, 'TestingOneTwoThree')\nconsole.log(encryptedKey)\n// =\u003e '6PRVWUbkzzsbcVac2qwfssoUJAN1Xhrg6bNk8J7Nzm5H7kxEbn2Nh2ZoGg'\n```\n\n\n### decrypt(encryptedKey, passphrase[, progressCallback, scryptParams])\n\n``` javascript\nvar bip38 = require('bip38')\nvar wif = require('wif')\n\nvar encryptedKey = '6PRVWUbkzzsbcVac2qwfssoUJAN1Xhrg6bNk8J7Nzm5H7kxEbn2Nh2ZoGg'\nvar decryptedKey = bip38.decrypt(encryptedKey, 'TestingOneTwoThree', function (status) {\n  console.log(status.percent) // will print the percent every time current increases by 1000\n})\n\nconsole.log(wif.encode(0x80, decryptedKey.privateKey, decryptedKey.compressed))\n// =\u003e '5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR'\n```\n\n\n# References\n- https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki\n- https://github.com/pointbiz/bitaddress.org/issues/56 (Safari 6.05 issue)\n- https://github.com/casascius/Bitcoin-Address-Utility/tree/master/Model\n- https://github.com/nomorecoin/python-bip38-testing/blob/master/bip38.py\n- https://github.com/pointbiz/bitaddress.org/blob/master/src/ninja.key.js\n","funding_links":[],"categories":["Complementing Libraries","List of content","Cryptocurrencies"],"sub_categories":["Running the test suite","BIPs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoinjs%2Fbip38","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitcoinjs%2Fbip38","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoinjs%2Fbip38/lists"}