Giter Club home page Giter Club logo

tlock-js's People

Contributors

anomalroil avatar cluelessuk avatar melynx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tlock-js's Issues

Ability to submit lock without revealing the time it can be decryted

In my use case, the encryptor do not want the decryptor to know when decryption is possible. This is because in my use case, the timing needs to remains secret.

To avoid the decryptor to check the decryption at every epoch, one idea is that encryptor will provide the decryptor the minutes (and seconds) to check but will not tell the day/hour.

See conversation slack :

wighawag:
hey got a question on tlock. Is the decryption time public ?
if it is public by default, is there a way to ensure that only the one encrypting know when decryption will be possible ? (edited) 
Will Scott
you could not include the decryption time with the encrypted blob, but it would be up to recipients to trial-decrypt every epoch
wighawag
Nice, is the tlock-js library supporting that option easily ?

The idea is that for my use case, decryptor will be able  to try every hour
Will Scott
would you know that you are only encrypting at an hour granularity, or could encryption still be at any epoch?
Patrick McClurg (Protocol Labs)
right now tlock-js doesn’t enable this super easily - during encryption, the roundNumber is encoded into the AGE args and then used for retrieving the beacon during decryption time.It wouldn’t be super hard to make a fork though - you could e.g. put a round number of -1 and remove the bounds check, and change decryption to check every hour when the round number is negative

ofc it will not be compatible with the other tlock libs, but it sounds like that’s not a big deal for your use case!
wighawag:
@Will Scott, yes, basically, one idea is that the encryptor will be telling the minute (and seconds) the decryption will be ready but not the hour

@Patrick McClurg (Protocol Labs) I ll create an issue in tlock-js as I think it is a valid use case for it
Will Scott
makes sense. having a coarser quantization seems useful in not making decryptors do way too much work

If tlock-js could left out the decrypting time, application could provide their own mechanism

Can't resolve tlock-js

I'm currently trying to use tlock-js for a small project I'm working on, but I'm unable to get the module installed correctly (getting a module not found: can't resolve tlock-js error). Are there any additional parameters I should be aware of beyond those listed on the npmjs page in order to use tlock-js?

Get Round from AGE Ciphertext

Is there an easy way to get the round that a ciphertext is encrypted until using just the ciphertext?

Ex: I send the AGE ciphertext to someone without telling them when the ciphertext is decryptable, but I want them to be able to trivially recover it

Node compatibility

I think there may be some issues running this in pure node due to its use of fetch. There's text in the readme to that effect, but it would be good to actually test it and remedy any issues that arise.

Details on the Approximation of time

Hi,

Reading the doc it says about timeForRound:

timeForRound

Given a NetworkInfo object, it calculates the approximate time the given round will be emitted at (approximate because the network must work together to create the randomness).

It would be great if it gave also worst case scenario in both direction or even better a probability distribution on a range of time, so applications can predict accordingly.

I also could not find what to expect on the mainnet, Is it a one minute kind of difference we can expect or a lot more ?
Thanks

vite: "The package may have incorrect main/module/exports specified in its package.json."

tlock-js is incompatible with vite and I suspect the error message from vite is correct and tlock-js must not follow modern export convention

Repro : https://github.com/wighawag/vite-tlock-js

pnpm i
pnpm dev

then navigate to the page and see error in console

Failed to resolve entry for package "tlock-js". The package may have incorrect main/module/exports specified in its package.json.
18:11:22 [vite] Internal server error: Failed to resolve entry for package "tlock-js". The package may have incorrect main/module/exports specified in its package.json.
  Plugin: vite:import-analysis
  File: /home/wighawag/dev/github.com/bug-reproduction/vite-tlock-js/src/tlock.ts
      at packageEntryFailure (file:///home/wighawag/dev/github.com/bug-reproduction/vite-tlock-js/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:23382:11)
      at resolvePackageEntry (file:///home/wighawag/dev/github.com/bug-reproduction/vite-tlock-js/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:23379:5)
      at tryNodeResolve (file:///home/wighawag/dev/github.com/bug-reproduction/vite-tlock-js/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:23113:20)
      at Context.resolveId (file:///home/wighawag/dev/github.com/bug-reproduction/vite-tlock-js/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:22874:28)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Object.resolveId (file:///home/wighawag/dev/github.com/bug-reproduction/vite-tlock-js/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:42847:32)
      at async TransformContext.resolve (file:///home/wighawag/dev/github.com/bug-reproduction/vite-tlock-js/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:42575:23)
      at async normalizeUrl (file:///home/wighawag/dev/github.com/bug-reproduction/vite-tlock-js/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:40500:34)
      at async file:///home/wighawag/dev/github.com/bug-reproduction/vite-tlock-js/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:40651:47
      at async Promise.all (index 0)

Add a tlock user agent

Add a tlock user agent to the HTTP requests so that we can gain some insight into who is using drand for timelock

Question: Is it possible to do it the other way around?

Newbie to drand here and possibly a dumb question.

Could I please check if it's possible to do it the other way around? I need the cipher text to be able to decrypted anytime until it reaches the specified expiry time

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.