Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow round number to not be included #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wighawag
Copy link

@wighawag wighawag commented Sep 2, 2022

This is important for use case that do not want to make the round number public right away

fixes: #5

This is important for use case that do not want to make the round number public right away
@AnomalRoil
Copy link
Member

We won't support this by default I think, unless we have a good usecase for it.

What's your usecase @wighawag ?

@wighawag
Copy link
Author

wighawag commented Feb 8, 2023

@AnomalRoil the feature is crucial for commit+reveal scheme where knowing the time of reveal would allow someone to guess the information being encrypted.

This is the case for my game https://conquest.game and any game using that feature

For example in conquest, if you send some fleet and people know the time of reveal, they can suddenly know that the destination planet must be in a specific radius.

@wighawag
Copy link
Author

wighawag commented Jun 15, 2023

Hi @AnomalRoil I am now working on my use-case that will use drand and tlock-js

I would like to know if you intend to support the feature this PR implements. This is a required feature for me and don't see a reason why the round number MUST be included.

Furthermore as mentioned, for some use-case, including the number can reveal information you might not want to.

@CluEleSsUK
Copy link
Contributor

If we were to do this change, my suggestion would be that we provide a round number of 0 when encrypting. This should make it eas to support in the go CLI.
As for decryption, I'm not sure what the best practice would be.

We could provide a client that requests every round sequentially and tries to decrypt, but this would a) be expensive to run b) cost us a lots of money for beacon retrieval from our API.
Decryption could take an expected time range or only try rounds from now onwards, but these both have limitations too.
Decryption could take an Array<RandomnessBeacon> and users could retrieve and cache the beacons out of band, but this would preclude listening for future beacons to decrypt.

A final consideration is that we want the solution to be hard to misuse - if users start accidentally creating ciphertexts for round 0 or pulling every beacon in the universe for something they should know the round for, we're gonna have a bad time

@wighawag
Copy link
Author

Re decryption, the idea is that the user of tlock-js would take care of it

For my use case, the player would provide a period value of x rounds, for example it could be 1 hours worth of round and so the service decrypting would only need to make an attempt once an hour.

@CluEleSsUK
Copy link
Contributor

CluEleSsUK commented Jun 16, 2023

I see - so a way to set the round stanza to 0 on encryption and pass an arbitrary beacon for decryption would do the job?

@wighawag
Copy link
Author

yes, that should do

Else I wondering if we could have a lower level api that do not use the armor part ?

@CluEleSsUK
Copy link
Contributor

CluEleSsUK commented Jun 19, 2023

Could easily add a flag to timelockEncrypt to make armor optional! Decryption works with armored and unarmored out of the box

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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