Giter VIP home page Giter VIP logo

tlock-rs's Issues

Idiomatic code & usage

The code is not so idiomatic for rust cryptography code:

  • Unecessary Vecs abound. Arkworks needs alloc anyways, but Vecs are still jarring, and likely leave secrets in the heap, where stack usage tends to whipe them for free.
  • serde is used, which is controversial: 1, 2, 3.

Around the Vecs: Why does the GAffine enum exist? Is drand producing curve points on both G1 and G2? I suppose drand must do so, since you provide hashes to both G1 and G2, but why does drand do this?

Also..

If you want time lock encryption, then you often want proofs of correctness too. It's extremely complext doing so once an AEAD enters the picture, so likely people employ a simpler trick: hash the pairing to create another secret key usk for which you reveal its public key upk early, reveal their secret r for early decryption, and retroactively invalidate participation in the protocol if upk does not match the tlock pairing output usk, as derived either from r or the tlock expiring. I realize this is not what the drand tlock paper does, but it's the cheapest proofs of correctness for those who require one.

As is, it's maybe easier if drand tlock users fork and/or re-implement this, using their specific situation, so maybe the easiest solution to all of this is simply add a few comments to the code that reference whatever spec drand or whatever is working off here? In particular how the G1 and/or G2 evaluation comes from drand.

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.