Giter Club home page Giter Club logo

Comments (7)

jot2re avatar jot2re commented on August 25, 2024 1

Right, but it only shows the generation from a PRG seed. It does not validate the safety as you also write. (Because they are not safe).
It is crucial to always use safe parameters, as otherwise the discrete log assumption might not be hard and the security of the entire system falls to the ground.
If the primes in this standard are safe then please use them. Even better than generating them ourselves. But please verify they are safe! The standard does not mention safe or Sophie Germain (other term for safe primes)

from fresco.

jot2re avatar jot2re commented on August 25, 2024

For example consider adding the following test:

@Test
  public void validateParameters() {
    BigInteger subgroupSize = staticSpec.getP().subtract(BigInteger.ONE).divide(BigInteger.valueOf(2));
    assertEquals(BigInteger.ZERO,
        staticSpec.getP().subtract(BigInteger.ONE).remainder(BigInteger.valueOf(2)));
    assertTrue(subgroupSize.isProbablePrime(80));
  }

from fresco.

Quacktiamauct avatar Quacktiamauct commented on August 25, 2024

The parameters for NoarPinkas OT seems to be defined in https://github.com/aicis/fresco/blob/87ce7366ce577f66034e7ae5db457a8d65ab3535/tools/ot/src/main/java/dk/alexandra/fresco/tools/ot/base/DhParameters.java, which is also used in ChouOrlandi based on BigIntegers (since it also used DH at its core).

from fresco.

jot2re avatar jot2re commented on August 25, 2024

Yes, exactly. I checked the parameters and P is not a safe prime. Computing and making an automated test for validating security of the parameters, is what this task is about.

from fresco.

Quacktiamauct avatar Quacktiamauct commented on August 25, 2024

But in this case, should we generate a random pair of p and g or should we switch over to a static safe pair, i.e. https://www.ietf.org/rfc/rfc3526.txt since finding safe primes is a slow process? In either case the static unsafe pair should be changed.

from fresco.

Quacktiamauct avatar Quacktiamauct commented on August 25, 2024

Also, it seems like the DH parameters are tested here () actually, however it fails the sanity check for being a safe prime, as you described earlier.
https://github.com/aicis/fresco/blob/master/tools/ot/src/test/java/dk/alexandra/fresco/tools/ot/base/TestDhParameters.java

from fresco.

Quacktiamauct avatar Quacktiamauct commented on August 25, 2024

Fixed in 2ce267e

from fresco.

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.