A fully decentralized & secure file storage system combining AES encryption, RSA key wrapping, IPFS for file storage, and Ethereum smart contracts for metadata β wrapped in a modern Streamlit Web App.
This project implements a fully decentralized encrypted file vault, enabling secure file upload, storage, and retrieval using:
- AES-256 encryption for file content
- RSA-2048 OAEP for encrypting the AES key
- IPFS for decentralized storage of encrypted files
- Ethereum Blockchain (Ganache) for storing metadata
- Streamlit UI for user-friendly interaction
User (Streamlit UI)
β
βΌ
AES Encrypt File β RSA Encrypt AES Key
β
βΌ
Upload Encrypted File β IPFS
β
βΌ
Store metadata on Ethereum:
β’ filename
β’ SHA256 hash
β’ IPFS CID
β’ RSA-encrypted AES key
β
βΌ
Retrieve (CID) β Recompute Hash β Blockchain Lookup
β
βΌ
RSA Decrypt AES Key β AES Decrypt File β Download- AES-256 CBC file encryption
- RSA-2048 key encryption
- Encrypted files stored on IPFS
- Metadata stored on blockchain
- Tamper-proof and censorship-resistant
- Sidebar navigation
- Upload β Encrypt β IPFS β Blockchain
- View all encrypted files
- One-click decrypt & download
- Clean dark-themed UI
- Retrieve files using IPFS CID
- Hash auto-computed for blockchain lookup
- Fully automated decryption flow
EncryptedVault/
β
βββ crypto_utils/
β βββ streamlit_app.py
β βββ ipfs_uploader.py
β βββ aes_encryption.py
β βββ aes_hybrid_blockchain_multithread.py
β βββ public.pem
β βββ private.pem
β
βββ blockchain/
β βββ FileVaultWithIPFS.sol
β
βββ test_files/Create a requirements.txt:
streamlit==1.32.0
web3==6.11.4
requests==2.31.0
pycryptodome==3.20.0
pathlib==1.0.1Install using:
pip install -r requirements.txtgit clone <your_repo_url>
cd EncryptedVaultpython -m venv encry
encry\Scripts\activate # Windows
source encry/bin/activate # Linux/Macpip install -r requirements.txtEnsure RPC:
http://127.0.0.1:7545
Deploy FileVaultWithIPFS.sol using Remix, copy contract address into:
CONTRACT_ADDRESS = "0xYourContractAddressHere"openssl genrsa -out private.pem 2048
openssl rsa -in private.pem -pubout > public.pemUpdate ipfs_uploader.py:
PINATA_API_KEY = "your_api_key"
PINATA_SECRET_API_KEY = "your_secret_key"streamlit run crypto_utils/streamlit_app.pyThen open:
http://localhost:8501
- Select file
- AES encrypt
- RSA wrap AES key
- Upload encrypted file to IPFS
- Store metadata on blockchain
- Load blockchain events
- View all encrypted files & CIDs
- Select file
- App retrieves CID
- Computes correct SHA256
- Fetches blockchain record
- Decrypts and downloads file
| Component | Implementation |
|---|---|
| File Encryption | AES-256-CBC |
| Key Encryption | RSA-2048 OAEP |
| Integrity Check | SHA256 |
| Storage | IPFS (Pinata) |
| Metadata | Ethereum Blockchain |
| UI | Streamlit |
- Multi-user RSA sharing
- Preview thumbnails for images/videos
- Local IPFS node integration
- Folder batch encryption
- User authentication / password-protected keys
MIT License
Developed using:
- Python
- Streamlit
- Solidity
- Web3.py
- IPFS
- AES/RSA cryptography