Generate vanity commit hashes
Go to file
Anna fae0578386
chore(config): add meaningful example strings
2023-08-31 02:18:38 -04:00
src fix: check correct nibble values for alphabetic nibbles 2023-08-31 01:18:23 -04:00
.gitignore chore: initial commit 2023-08-30 03:11:48 -04:00
Cargo.lock chore: update lockfile 2023-08-31 02:10:23 -04:00
Cargo.toml feat: improve pgp speed and offer even more improvements 2023-08-31 01:54:29 -04:00
LICENCE chore: initial commit 2023-08-30 03:11:48 -04:00
README.md chore(readme): fix typo 2023-08-31 01:55:21 -04:00
config.example.toml chore(config): add meaningful example strings 2023-08-31 02:18:38 -04:00

README.md

git-vain

Generate vanity commit hashes quickly.

Supports:

  • pgp signing (via gpg-agent or sequoia)
  • integration with system key store for saving pgp passwords (sequoia only)
  • arbitrary commits from history
  • various methods (date increment/decrement, random text, counter text, header)
  • multithreading
  • config file for saving common options

Performance

Performance depends on hardware, method, and number of threads. The tests below were performed on Framework Laptop (A6) with an 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz. Each method was tested attempting to generate the prefix deadbeef for 30 seconds using one thread.

  counter: 163,504,123 hashes (5,461,682.8102/s)
   header: 124,617,875 hashes (4,150,993.2260/s)
   random: 110,886,440 hashes (3,715,452.2177/s)
increment: 107,137,532 hashes (3,573,438.8338/s)
 sequoia*:     864,486 hashes (   28,923.1870/s)
  sequoia:     339,407 hashes (   11,403.6102/s)
gpg-agent:         353 hashes (       11.7519/s)

The asterisked sequoia is using the crypto-rust feature.

PGP performance

Signing commits drastically reduces the speed at which git-vain operates. By default, OpenSSL is used as the cryptography backend. For a moderate speedup (see table above), you can use the RustCrypto libraries as the cryptography backend instead. See the warnings below from sequoia.

As of this writing, the RustCrypto crates are not recommended for general use as they cannot offer the same security guarantees as more mature cryptographic libraries.

Some cryptographic backends can not guarantee that cryptographic operations require a constant amount of time. This may leak secret keys in some settings.

The author cannot think of a scenario in which a timing attack would matter for git-vain, but these warnings are worth acknowledging.

To use the RustCrypto libraries instead, compile with cargo build --release --no-default-features --features crypto-rust.