vanity

package module
v0.2.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2019 License: MIT Imports: 5 Imported by: 0

README

= vanity-monero
Equim <https://github.com/Equim-chan[@Equim-chan]>

image:https://img.shields.io/circleci/project/github/Equim-chan/vanity-monero.svg[CircleCI, link=https://circleci.com/gh/Equim-chan/vanity-monero]
image:https://img.shields.io/github/release/Equim-chan/vanity-monero.svg[Release, link=https://github.com/Equim-chan/vanity-monero/releases/latest]
image:https://img.shields.io/badge/godoc-reference-5272B4.svg[Godoc, link=https://godoc.org/ekyu.moe/vanity-monero]
image:https://goreportcard.com/badge/github.com/Equim-chan/vanity-monero[Go Report Card, link=https://goreportcard.com/report/github.com/Equim-chan/vanity-monero]
image:https://img.shields.io/github/license/Equim-chan/vanity-monero.svg[License, link=https://github.com/Equim-chan/vanity-monero/blob/master/LICENSE]

vanity-monero is a tiny CLI tool that generates vanity address for CryptoNote currencies. Currently only Monero main net and test net are supported.

== Features
* Prefix matching from 1st or 3rd index of address string.
* Regex matching at any position.
* Multi-language mnemonic seeds generation.
* Faster generation when there is only spend key that is needed in a specific pattern.
* Support https://en.bitcoin.it/wiki/Split-key_vanity_address[split-key vanity address] generation, which makes scaled vanity mining potential.

== Build
=== Requirements
* git 2.17.1 or above
* Go 1.11 or above
* dep v0.4.1 or above (optional)

[source,shell]
----
$ go get -u ekyu.moe/vanity-monero/cmd/vanity-monero
$ $GOPATH/bin/vanity-monero
----

=== Pre-built Binary
Although you can view the https://github.com/Equim-chan/vanity-monero/releases[release] page for handy pre-built binaries, it's highly recommended to build it on your own! Go is really easy to build.

== Guides
=== Best Practice Regarding to Security
Since this tool support split-key mode, it's better to generate partial private keys in https://tails.boum.org/[Tails] and lock them in the persistent volume at first, then copy their corresponding partial public keys to a seperate machine, such as VPS, or just your routine Windows. It doesn't matter if that seperate machine is trusted or not. After that, set your patterns and keep it running until the result comes out. Finally, copy the generated partial private keys to Tails and join them altogether to compose the final private keys.

It is cryptographically guranteed that the final address will match your pattern, and the final private keys will not be disclosed to the untrusted compute party.

== Donation
If you love this idea, maybe you can consider buying me a cup of coffee at

XMR:: `4777777jHFbZB4gyqrB1JHDtrGFusyj4b3M2nScYDPKEM133ng2QDrK9ycqizXS2XofADw5do5rU19LQmpTGCfeQTerm1Ti`
DOGE:: `DEqqqq8wENdASvWr3QYbpx9RNxhbX4zYHr`
BTC:: `1Eqqqq9xR78wJyRXXgvR73HEfKdEwq68BT`

Thanks!

=== Proof
Message:: https://github.com/Equim-chan/vanity-monero/raw/master/msg.txt[msg.txt]

Signature:: `SigV1hcoEk7kbnjS6rd1y5nCE797e4wqPSTpcTVgCCM2pUg6cRm9fR5Ae5p9Ur2TWeZ6gBbPPhdZQ2n9FC7QwbhU4vovq`

== External Links
* https://www.reddit.com/r/Monero/comments/8o8wdz/i_just_wrote_a_vanity_address_generator_for_monero/[Discussion on Reddit]

== License
https://github.com/Equim-chan/vanity-monero/blob/master/LICENSE[MIT]

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MoneroMainNetwork = Network{0x12}
	MoneroTestNetwork = Network{0x35}
	GraftMainNetwork  = Network{0x5a}
)

Functions

func EstimatedDifficulty

func EstimatedDifficulty(prefix string, caseSensitive, includeNetwork bool) uint64

EstimatedDifficulty estimates the difficulty to generate a vanity address with given prefix

func IsValidPrefix

func IsValidPrefix(prefix string, network Network, initIndex int) bool

IsValidPrefix checks if a given prefix is valid as per the given network.

func NeedOnlySpendKey

func NeedOnlySpendKey(prefix string) bool

NeedOnlySpendKey estimates if the generation of vanity address with given prefix can be done with brute force only the spend key.

Types

type Key

type Key struct {
	SpendKey, ViewKey *[32]byte
}

Key consists of a ed25519 256-bit SpendKey and a ViewKey. In order to make the mnemonic seeds work, ViewKey is actually derived from SpendKey with Keccak256, also leading to SpendKey serving as the seed.

func HalfKeyFromSeed

func HalfKeyFromSeed(seed *[32]byte) *Key

HalfKeyFromSeed construsts a half size of Key (i.e. only spend key) with given seed. This should only be used for vanity address generation, which it boosts up the generation speed.

func KeyFromSeed

func KeyFromSeed(seed *[32]byte) *Key

KeyFromSeed construsts a Key with given seed.

func (*Key) Add

func (k1 *Key) Add(k2 *Key) *Key

Add adds k2 to k1 in ellipse curve sense (scalar add), returning the sum.

func (*Key) Address

func (k *Key) Address(network Network) string

Address encodes network, public spend key and view key in base58 format.

func (*Key) AddressWithAdditionalPublicKey

func (k *Key) AddressWithAdditionalPublicKey(network Network, spendPub, viewPub *[32]byte) string

AddressWithAdditionalPublicKey adds extra spendPub and viewPub to k in an ellipse curve sense (point add), returning the base58 encoded address of the sum.

func (*Key) HalfAddress

func (k *Key) HalfAddress(network Network) string

HalfAddress encodes network and spend key only. This should only be used for vanity.

func (*Key) HalfAddressWithAdditionalPublicKey

func (k *Key) HalfAddressWithAdditionalPublicKey(network Network, spendPub *[32]byte) string

HalfAddressWithAdditionalPublicKey adds extra spendPub to k in an ellipse curve sense (point add), returning the base58 encoded address of the sum.

func (*Key) HalfToFull

func (k *Key) HalfToFull()

HalfToFull transfroms a Key construsted by HalfKeyFromSeed to a full key. Basically, it triggers the derivation of its view key from spend key.

func (*Key) PublicSpendKey

func (k *Key) PublicSpendKey() *[32]byte

func (*Key) PublicViewKey

func (k *Key) PublicViewKey() *[32]byte

func (*Key) Seed

func (k *Key) Seed() *[32]byte

type Network

type Network []byte

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL