git-vain/README.md

51 lines
1.9 KiB
Markdown
Raw Normal View History

2023-08-30 07:11:48 +00:00
# git-vain
Generate vanity commit hashes quickly.
Supports:
- pgp signing (via gpg-agent or sequoia)
2023-08-31 01:28:46 +00:00
- integration with system key store for saving pgp passwords (sequoia only)
2023-08-30 07:11:48 +00:00
- arbitrary commits from history
2023-08-31 01:28:46 +00:00
- various methods (date increment/decrement, random text, counter text, header)
2023-08-30 07:11:48 +00:00
- multithreading
2023-08-31 01:28:46 +00:00
- config file for saving common options
2023-08-31 04:23:02 +00:00
## 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)
2023-08-31 04:23:02 +00:00
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)
2023-08-31 04:23:02 +00:00
```
<small>The asterisked sequoia is using the `crypto-rust` feataure.</small>
## 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`.