Ether-Link
A lightweight Rust library focused on enabling secure communication between Ethereum address owners. Ether-Link provides simple yet powerful tools for Ethereum key management, message signing, and signature verification - allowing Ethereum wallet owners to securely exchange authenticated messages.
Core Focus
Ether-Link is specifically designed to facilitate:
- Secure Communication between Ethereum address owners
- Identity Verification using cryptographic signatures
- Message Authentication ensuring only valid Ethereum address owners can participate
- Decentralized Trust leveraging Ethereum's cryptographic primitives
Features
- Key Management: Generate new Ethereum key pairs with compressed and uncompressed public keys
- Address Derivation: Deterministically generate Ethereum addresses from public keys
- Message Signing: Sign messages using Ethereum's standard signing format
- Signature Verification: Verify message signatures against Ethereum addresses
- Timestamped Messages: Automatic timestamp inclusion to prevent replay attacks
Upcoming Features (Next Version)
- Message Encryption: End-to-end encryption for messages between Ethereum addresses
- ECIES (Elliptic Curve Integrated Encryption Scheme) implementation
- Ability to encrypt messages that only specific Ethereum addresses can decrypt
- Support for both text and binary data encryption
- Simple API for encrypt/decrypt operations using existing key pairs
- Batch Operations: Ability to sign or verify multiple messages efficiently
- Extended Compatibility: Support for additional Ethereum signature standards and wallets
Installation
Add this to your Cargo.toml:
[]
= "0.0.3"
Usage Examples
Secure Communication Flow
Ether-Link enables a simple communication pattern between Ethereum address owners:
- Sender signs a message with their Ethereum private key
- Recipient verifies the signature using the sender's Ethereum address
- Communication is authenticated without requiring password exchange or central authorities
Generating a New Key Pair
use Wallet;
Signing a Message
use Wallet;
async
Verifying a Signature
use EthereumSignature;
use Value;
Key Components
Wallet: Core structure for generating and managing Ethereum key pairssign_message(): Async method to sign messages with timestamps for securityEthereumSignature: Structure to verify signed messages against Ethereum addresses
Applications
- Decentralized Identity: Authenticate users by their Ethereum addresses
- Secure Messaging: Build messaging systems where sender identity is cryptographically verified
- dApp Authentication: Implement authentication flows without passwords
- Smart Contract Interaction: Sign messages intended for on-chain verification
- Wallet-to-Wallet Communication: Enable direct secure messaging between wallet owners
Security Notes
- Private keys are stored in memory as hex strings. Handle with appropriate security measures
- The library adds timestamps to signed messages by default to prevent replay attacks
- Always verify signatures against known addresses before trusting signed messages
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request