Giter Site home page Giter Site logo

Comments (14)

sudssm avatar sudssm commented on August 28, 2024

close your eyes, plug your nose, say three hail marys, and the demon will go away

from daruma.

sudssm avatar sudssm commented on August 28, 2024

Did you get all of these at the same time? If so, I think the shared bootstrap object (the same across all those tests) might be at fault - perhaps there's something I didn't think enough about. Will take a look, thanks for noticing

from daruma.

DoronShapiro avatar DoronShapiro commented on August 28, 2024

Yes, all at once

from daruma.

DoronShapiro avatar DoronShapiro commented on August 28, 2024

Got them again:

________________________________________________________________ test_corrupt_k_but_not_fail _________________________________________________________________

    def test_corrupt_k_but_not_fail():
        BM = BootstrapManager(providers, 3)
        BM.distribute_bootstrap(bootstrap)

        providers[0].put(BootstrapManager.BOOTSTRAP_THRESHOLD_FILE_NAME, "4")
        providers[1].put(BootstrapManager.BOOTSTRAP_THRESHOLD_FILE_NAME, "4")
        providers[2].put(BootstrapManager.BOOTSTRAP_THRESHOLD_FILE_NAME, "4")
        providers[3].put(BootstrapManager.BOOTSTRAP_THRESHOLD_FILE_NAME, "4")

        with pytest.raises(exceptions.OperationFailure) as excinfo:
>               BM.recover_bootstrap()

managers/tests/test_bootstrap_manager.py:141:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
managers/BootstrapManager.py:98: in recover_bootstrap
    bootstrap = Bootstrap.parse(string)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

string = 'f\xf6\xe4\xfa\x944\x95hS\xf66\xc3\xf0\xca\xf9~\xfc\x8c\xebrH\xf9/\x00\x060\xa7\x13c\xd3\xe845A373C502BD474F8B8091E2E253EF89\x00\x00\x00\x02'

    @staticmethod
    def parse(string):
>       key, manifest_name, file_reconstruction_threshold = struct.unpack(Bootstrap.STRUCT_FORMAT, string)
E       error: unpack requires a string argument of length 68

managers/BootstrapManager.py:35: error

from daruma.

sudssm avatar sudssm commented on August 28, 2024

Ran into this. This is actually a bug with @michsoch's secret sharing reconstruct.
There are cases where I share a string of length 68, but get back a string of length 67.
I thought that this problem was solved already, by the magic prepend that michelle was doing - thoughts?

from daruma.

sudssm avatar sudssm commented on August 28, 2024

Ah ha! Specifically, if the secret starts with "*" (a star), when reconstructed, the star vanishes!
@michsoch

from daruma.

michsoch avatar michsoch commented on August 28, 2024

hmm...distinctly recall testing for that particular case
will investigate and get back to you

from daruma.

michsoch avatar michsoch commented on August 28, 2024

so if anything, the prepend "magic" is the issue since what it prepends with is a "*" (star) - I tested for leading stars in the serialization code and am trying to recreate the issue with sharing and reconstruction but no luck yet in creating a failing test case

from daruma.

sudssm avatar sudssm commented on August 28, 2024

at some point i'll demo the error in person

On Mon, Mar 21, 2016 at 10:25 PM michsoch [email protected] wrote:

so if anything, the prepend "magic" is the issue since what is prepends
with is a "*" (star) - I tested for leading stars in the serialization code
and am trying to recreate the issue with sharing and reconstruction but no
luck yet in creating a failing test case


You are receiving this because you were assigned.

Reply to this email directly or view it on GitHub
#24 (comment)

from daruma.

michsoch avatar michsoch commented on August 28, 2024

can you send me code that breaks?

from daruma.

michsoch avatar michsoch commented on August 28, 2024

instructions for reproduction would be very helpful - I've since rewritten a lot of the code where this issue is likely coming from so it might be a solved problem but I would like to verify that the test fails on old code and passes on the new iteration

from daruma.

sudssm avatar sudssm commented on August 28, 2024
from robustsecretsharing.schemes.sss import share_secret, reconstruct_secret
shares = share_secret(5, 3, 4, "*123")
reconstruct_secret(5, 4, shares)

from daruma.

sudssm avatar sudssm commented on August 28, 2024

this seems to work with the latest copy of the library, so the problem should be resolved upon integration of rss. Resolved.

from daruma.

michsoch avatar michsoch commented on August 28, 2024

this should be resolved now that integrate_rss has been merged in
will mark as closed if no one sees it for a while...

from daruma.

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.