Git Product home page Git Product logo

peer-id-generator's Introduction

IPFS / IPNS peer ID generator

This tool generates IPFS public and private keypair until it finds public key which contains required substring. Keys are stored in local directory. If you like one of them, you can move it to ~/.ipfs/keystore/ to use it with IPFS.

Installation

go get github.com/meehow/peer-id-generator

Usage

➜ ~ peer-id-generator dupa

12D3KooWDpLVwxMacesha42mdupa3H8jU7bbJdAmsMD7iPjzrkfK

12D3KooWLhGVro7KsDUPa4FX3LpWC61xACoj7AEZg5wmz6VqDGJ9

12D3KooWMJmDUPAtjcaHo8LARo5VHQ5uSxrt8Mdi5fytiRnnfD2f

^C

➜ ~ cp 12D3KooWMJmDUPAtjcaHo8LARo5VHQ5uSxrt8Mdi5fytiRnnfD2f ~/.ipfs/keystore/dupa

➜ ~ ipfs name publish --key=dupa {ipfs-path}

Published to 12D3KooWMJmDUPAtjcaHo8LARo5VHQ5uSxrt8Mdi5fytiRnnfD2f: {ipfs-path}

Examples

In examples you can find key pairs which contain word "funny" at the end of Peer ID. They are just for demonstration purposes. Please consider these private keys as already leaked.

Benchmarks

This tool is using Ed25519 algorithm because it is able to generate keys 2500 times faster than RSA and both can work with IPFS.

goos: linux
goarch: amd64
pkg: github.com/meehow/peer-id-generator
BenchmarkRSA-4       	      10	 162383811 ns/op
BenchmarkEd25519-4   	   20000	     64165 ns/op
PASS
ok  	github.com/meehow/peer-id-generator	4.384s

peer-id-generator's People

Contributors

meehow avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.