Skip to content

Securing confidential data in database using ZKML based cryptographic approach with auto encoder based encoding

Notifications You must be signed in to change notification settings

kausthub-kannan/Ziphr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ziphr

Securing confidential data in a database using a ZKML-based cryptographic approach with auto-encoder-based encoding

ziphr

Working

  1. The confidential data is encoded using Seq2Seq model
  2. The decoder of the model is loaded on the on-premise software.
  3. ZKML is used to generate a compiled model from the decoder model which is used to generate proof using the prover mechanism. The provers generate a ZK proof. The proof is generated such that the weights of the model are hashed + zk-hashed with the encoded inputs zk-hashed in the proof with the help of a proving key generated in the setup phase.
  4. When the verifier receives the proof, it tries to impose challenges with a verification key generated in the setup phase. If the weights of the model are authentic and the proof is generated with the true proving key, in that case, it responds with the encoded data from the database. The verifier is hosted as an edge function in the database.
  5. Finally, the client receives the encoded data decoded using the on-premise model. The secure system ensures that the receiver has to use the right model with a true proving key.

Local Setup

Clone the repository and install the required packages using poetry and follow the below steps:

  1. Setup ZKML using ezkl:
python zkml/setup/ezkl_setup.py 
  1. Run Client (Streamlit):
streamlit run main.py
  1. Run Verifier Server (FastAPI):
# Run the verifier server on cloud
uvicorn verifier:app --reload

# Note: Run the below command for developer mode
fastapi dev zkml/verifier/verifier.py

About

Securing confidential data in database using ZKML based cryptographic approach with auto encoder based encoding

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages