Introducing ZK Gesture: Giving blockchain eyes using ML and Zero Knowledge proofs. Verify transactions with unique hand patterns - Vulcan hand salute, blending the power of TensorFlow and blockchain for advanced, secure authentication.
Project Name: ZK Gesture
Concept: ZK Gesture is a Hackathon project that integrates Machine Learning (ML) and Zero Knowledge (ZK) proofs to create a novel authentication mechanisms on the blockchain. The core idea is to use hand gestures, specifically patterns like a Vulcan hand salute, as a unique factor for authenticating blockchain transactions.
Technology Stack:
Machine Learning: The project leverages TensorFlow, a popular ML framework, running in the browser to detect and analyze hand patterns. Blockchain: Integrates with blockchain technology to securely manage transaction verification. Zero Knowledge Proofs: Utilizes ZK proofs to prove computations that happened off-chain without revealing specific data about the transactions.
How It Works:
Initial Scan: A user performs a hand gesture, which is captured and set as their reference pattern. Subsequent Transactions: For future transactions, the user has to repeat the gesture. The system then compares this new pattern to the initial reference. Normalization and Verification: To simplify the ZK component, the captured points are normalized and compared with the reference points to verify a match. Advancements in ZK: The project capitalises on recent advancements in ZK proofs, allowing the verification of smaller models and making the system more efficient and robust.
Potential Use Cases:
Authentication: Similar to Face ID or Touch ID, ZK Gesture could offer a new form of biometric authentication to secure access and transactions. Blockchain Applications: The combination of ML and ZK proofs equips the blockchain with "eyes and ears," enabling it to process and authenticate unique physical patterns. Future Implications: This project paves the way for more complex and secure authentication methods in blockchain technology, expanding possibilities for user verification and transaction security.
TensorFlow in the Browser: Role: Used for real-time hand gesture recognition. Implementation: Leveraging TensorFlow.js, a JavaScript library for ML in the browser, we used the HandPose model to recognize and analyze hand patterns. The model used can also detect multiple hands and in 3D both of which are not explored in this demo. Integration: The TensorFlow model runs in the user's browser, capturing and processing hand gesture data in real-time without the need for server-side processing.
Blockchain - Aleo: Role: Provides a secure and immutable ledger for storing authentication transactions. Implementation: Aleo blockchain platform that offered smart contract with ZK capabilities Integration: The smart contracts on the blockchain handle the verification logic, ensuring that each transaction is authenticated against the user's stored hand pattern.
Zero Knowledge (ZK) Proofs: Role: Ensures privacy and security in the verification process. Implementation: The ML models produce a set pattern of points. These patterns are generated on the browser. These patterns on a 2D grid is used to generate a ZK proof that it is within the acceptable tolerance levels of the reference patterns.
Notable Hacks and Innovations
Optimization for Small Models in ZK Proofs: Traditionally, ZK proofs have been resource-intensive. ZK Gesture, optimised the process by using Tensor flow models as they are without ZK proofs on the model itself. For the demo, the output from the ML model is used to generate ZK proofs. This translates the problem from running the whole model to comparing the outputs from the model.
Normalisation Technique in Hand Pattern Recognition: To reduce the complexity of the ZK proofs, ZK-Gesture uses a normalisation technique for the hand gesture data. This involved scaling and translating the captured points to a standard, simplifying the comparison process with the reference pattern.
Hybrid On-Chain/Off-Chain Processing: ZK-Gesture uses a hybrid approach where the heavy lifting (hand gesture recognition) is done off-chain in the browser, while the verification and transaction logging occur on-chain. This balanced the load and ensured both speed and security.
In conclusion, the ZK Gesture project is an example combining blockchain, machine learning, and zero-knowledge proofs to present a viable model of authentication that can be developed further to be much more secure and reliable.