Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whyrusleeping/ipfs-key
A program to generate ipfs private keys
https://github.com/whyrusleeping/ipfs-key
Last synced: 7 days ago
JSON representation
A program to generate ipfs private keys
- Host: GitHub
- URL: https://github.com/whyrusleeping/ipfs-key
- Owner: whyrusleeping
- License: mit
- Created: 2016-01-23T08:33:02.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-11-13T12:00:23.000Z (12 months ago)
- Last Synced: 2024-10-22T04:30:33.571Z (18 days ago)
- Language: Go
- Size: 14.6 KB
- Stars: 55
- Watchers: 4
- Forks: 41
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - whyrusleeping/ipfs-key - A program to generate ipfs private keys (Go)
README
# ipfs-key
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
> A tool for easily generating and reading ipfs keypairs
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Contribute](#contribute)
- [License](#license)## Installation
```
$ go get github.com/whyrusleeping/ipfs-key
```## Usage
When run, it will write the bytes of
the serialized private key to stdout. By default, a 2048 bit RSA key will be
generated. In this case the key size can be changed by specifying the `-bitsize`
option. The key type can be changed by specifying the `-type` option (RSA, Ed25519, Secp256k1 or ECDSA).```
$ ipfs-key -bitsize=4096 > my-rsa4096.key
Generating a 4096 bit RSA key...
Success!
ID for generated key: QmS5cwbxmGyPiEH3SYNgiAazG46NvogKxfx2iX6jt4ef1a
```
```
$ ipfs-key -type=ed25519 > my-ed.key
Generating a 2048 bit ed25519 key...
Success!
ID for generated key: 12D3KooWHM4kLNwS2FzN5GtG5Dfy9h7dLTRs3rtuF9NiR4mjBv3h
```
```
$ ipfs-key -key my-ed.key
Reading key at: my-ed.key
Success!
ID for ed25519 key: 12D3KooWF1TKgiqLMh14za7dWMN5RFRC1WAvgHYioksmdwuhZkzT
```
For backward compatibility, to read RSA and Ed25519 keys generated with raw(), specify the `-type rsa` or `-type ed25519` before the `-key`
```
$ ipfs-key --type rsa -key my-ed.key
Reading key at: my-ed.key
Success!
ID for rsa key: 12D3KooWF1TKgiqLMh14za7dWMN5RFRC1WAvgHYioksmdwuhZkzT
```## Contribute
PRs accepted.
## License
[MIT](LICENSE) Copyright (c) 2016 [Jeromy Johnson](http://github.com/whyrusleeping)