Giter Site home page Giter Site logo

Comments (3)

osuketh avatar osuketh commented on July 18, 2024

Add the lifted-ElGamal.
It will encrypt the 32 bits integer and might need the suited statistical algorithm for the decryption of the transfer value. Anyway, the lifted-ElGamal is not expensive rather than paillier.

from zero-chain.

osuketh avatar osuketh commented on July 18, 2024

The algorithm of Lifted-Elgamal

  • Encryption
Enc(m) = (mP + r(sP), rP)
where m: message, P: the point on the curve, s: secret key, sP: public key, r: random value
  • Decryption
(mP + rsP) - s(rP) = mP

m should be 32-bits num.

  • Homomorphic property
Enc(m) + Enc(m')
= (mP + rsP, rP) + (m'P + r'sP, r'P)
= ((m+m')P + (r + r')sP, (r + r')P)
= Enc(m + m')

from zero-chain.

osuketh avatar osuketh commented on July 18, 2024

TODO:

// TODO:
// The balance encryption validity.
// It is a bit complicated bacause we can not know the randomness of balance.
// { (current_balance)G - (value)G } + (rbar - random)pk_d_sender
// == (remaining_balance)G + (ivk){ (rbar)G - (random)G }
// rbar is the current_balance randomness
// Enc_sender(sender_balance).cl - Enc_sender(value).cl
// == (remaining_balance)G + ivk(Enc_sender(sender_balance).cr - Enc(random))

from zero-chain.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.