Secure, encrypted log archiving using IPFS and blockchain-backed immutability.
LogPin is a Python-based pipeline that:
- Encrypts system/application logs and saves them as PDF.
- Uploads the encrypted PDF to IPFS for decentralized, permanent storage.
- Stores the IPFS CID (hash) on the blockchain to ensure immutability and verifiable proof of existence.
This project is designed for research and practical applications where logs need to be:
- Securely stored
- Tamper-proof
- Decentralized and recoverable
- Encryption-first: Logs are encrypted before upload for data privacy.
- Decentralized storage: Uses IPFS to store logs permanently.
- Immutable hash storage: Stores the IPFS CID on the blockchain for tamper-proof, verifiable logging.
- Python-powered: Easy to understand, modify, and extend.
- Python (processing, encryption, IPFS upload, blockchain interaction)
- IPFS (via Pinata)
- Blockchain (Sepolia Ethereum testnet currently)
- PDF Encryption (
PyPDF2,reportlab)
LogPin/
β
βββ log_encryptor.py # Encrypts and generates PDF from logs
βββ ipfs_uploader.py # Uploads encrypted PDFs to IPFS
βββ blockchain_pusher.py # Stores CID/hash on blockchain
βββ requirements.txt # Dependencies
βββ README.md # Documentation
1 Clone the repository:
git clone https://github.com/yourusername/LogPin.git
cd LogPin2 Install dependencies:
pip install -r requirements.txt3 Set up environment variables:
Create a .env file:
PINATA_API_KEY=your_pinata_key
PINATA_SECRET_API_KEY=your_pinata_secret
BLOCKCHAIN_RPC_URL=https://sepolia.infura.io/v3/your_project_id
PRIVATE_KEY=your_wallet_private_key
4 Run the pipeline:
python log_encryptor.py
python ipfs_uploader.py
python blockchain_pusher.py- Secure ransomware-resistant log storage
- Forensics-ready system/application log archiving
- Decentralized log management for distributed environments
- Academic/research blockchain + IPFS data integrity projects
Contributions are welcome! Feel free to open issues or pull requests to add features, fix bugs, or improve documentation.
MIT License. See LICENSE for details.
If you find this project useful, consider β starring the repo.
For queries, open an issue on GitHub or reach out at [email protected].