Skip to content

A secure Rust implementation for generating Ethereum private keys and addresses. Implements the official Ethereum address algorithm with EIP-55 checksum encoding.

Notifications You must be signed in to change notification settings

grep-o/generate-private-key

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ethereum Address Generator

A secure Rust implementation for generating Ethereum private keys and addresses. Implements the official Ethereum address algorithm with EIP-55 checksum encoding.

Quick Start

Pre-built Binary (Mac M2)

A pre-built binary for Apple Silicon (M1/M2) is available in the bin directory. To use it:

  1. Clone this repository
  2. Navigate to the bin directory
  3. Make the binary executable and run:
chmod +x generate-private-key
./generate-private-key

Building from Source

If you need to build for a different platform or want to compile from source:

Dependencies

[dependencies]
rand = "0.8"
secp256k1 = "0.28"
tiny-keccak = { version = "2.0", features = ["keccak"] }
hex = "0.4.3"

Build

cargo build --release

The executable will be available at target/release/generate-private-key

Features

  • Cryptographically secure private key generation
  • Secp256k1 public key derivation
  • Keccak-256 hashing for address generation
  • EIP-55 compliant checksum addresses
  • Support for importing existing private keys

Usage

The program will output:

  • A new private key (keep this secret!)
  • The corresponding Ethereum address

Security

  • Uses OsRng for secure random number generation
  • Validates private keys against the secp256k1 curve order
  • Implements address checksum for error detection
  • Full test coverage including official test vectors

Testing

cargo test

License

MIT

About

A secure Rust implementation for generating Ethereum private keys and addresses. Implements the official Ethereum address algorithm with EIP-55 checksum encoding.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages