Coder Social home page Coder Social logo

Comments (2)

BobWall23 avatar BobWall23 commented on June 3, 2024

The math appears to work for values in F_p^12, but for the encryption to be secure, the values that you encrypt must be elements of G_T. The pairing operation at the heart of the proxy reencryption algorithm requires the input to be in GT.

The client should use the SDK to generate the plaintext (by calling gen_plaintext), derive the symmetric key from it (by calling derive_symmetric_key), encrypt the plaintext (by calling encrypt), then encrypt the actual data using the symmetric key and an algorithm like AES256-GCM. The encryption of the plaintext requires that it is an element of GT, and it is less efficient for the client to generate an arbitrary symmetric key and work backward from that to produce an element of GT.

The gen_plaintext actually does choose a random element in F_p^12, then performs a "final exponentiation" step that yields an element in GT. We initially tried choosing a random value in Fp and just multiplying a seed value in GT by that value to obtain a random element of GT, but that actually takes more time to compute than the final exponentiation.

from recrypt-rs.

BobWall23 avatar BobWall23 commented on June 3, 2024

@dandelionzbx Hopefully this answers your question - we will close this. Re-open or open another issue if you have additional questions.

from recrypt-rs.

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.