Git Product home page Git Product logo

Comments (4)

ybouilla avatar ybouilla commented on August 26, 2024

Hi Sergen, thanks for investigating.
I think the above code could gain robustness: we are doing infinte loops (while True:), but can we loop over the number of bit instead (before reaching 256 and leading to a Overflow error

        while gcd(r, self._n_modules) > 1:
            while counter < self.bits_size//8 and len(result)>=self.bits_size//8:
                h = hashlib.sha256()
                h.update(
                    int(t).to_bytes(self.bits_size // 2, "big") +
                    counter.to_bytes(1, "big")
                )
                result += h.digest()
                counter += 1
               

            r = mpz(int.from_bytes(result[-self.bits_size:], "big"))


        return r

from fedbiomed.

ybouilla avatar ybouilla commented on August 26, 2024

I tried to run only the first end-to-end test test_01_secagg_joye_libert_pytorch_experiment_basic

I got a different error:


        if len(validation) != 1 or not math.isclose(validation[0], self._secagg_random, abs_tol=0.03):
>           raise FedbiomedSecureAggregationError(
                f"{ErrorNumbers.FB417.value}: Aggregation has failed due to incorrect decryption."
            )
E           fedbiomed.common.exceptions.FedbiomedSecureAggregationError: FB417: secure aggregation error: Aggregation has failed due to incorrect decryption.

from fedbiomed.

mvesin avatar mvesin commented on August 26, 2024

The issue may be twofold:

  1. a glitch in end2end tests (immediate cause of the problem)
  2. [ ] maybe a bug in FDH.H (test if len(result) < (self.bits_size // 8): is weird) => moved to #1163

from fedbiomed.

srcansiz avatar srcansiz commented on August 26, 2024

I tried to run only the first end-to-end test test_01_secagg_joye_libert_pytorch_experiment_basic

I got a different error:


        if len(validation) != 1 or not math.isclose(validation[0], self._secagg_random, abs_tol=0.03):
>           raise FedbiomedSecureAggregationError(
                f"{ErrorNumbers.FB417.value}: Aggregation has failed due to incorrect decryption."
            )
E           fedbiomed.common.exceptions.FedbiomedSecureAggregationError: FB417: secure aggregation error: Aggregation has failed due to incorrect decryption.

Hi @ybouilla,
Thank you for testing the issue. I am going to run again this test and compare the result that I got before, something may be changed since the issue created.

from fedbiomed.

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.