Comments (7)
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.
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.
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.
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.
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.
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.
Fixed in 2ce267e
from fresco.
Related Issues (20)
- LessThanOrEquals needs a sanity check on bitlength? HOT 1
- Infinite recursion issue with OddEvenMerge when input size is greater than four HOT 1
- arithmetic computation in Galois field? HOT 3
- Easier separation of SPDZ online/offline phase
- Maven fails at spdz dependency HOT 2
- Move MiMC to a lib module
- Move LP and DEA to modules HOT 1
- Proper seperation of tests
- Does the project include conversion between arithmetic and Boolean shares? HOT 1
- Base NaorPinkasOT Optimization with Elliptic Curves HOT 2
- comparsion protocol
- Remove deprecated comparisons
- HL17 baseOt implementation HOT 2
- Handle security issue with OT extension HOT 1
- Ensure that no issues with error logging or lacking curve checks remain HOT 1
- Connections not closed on error HOT 1
- Add GitHub actions
- Construction of a FieldElement from a BigInteger fails if the BigInteger is too big HOT 2
- Network ends in infinite loop if no message is received HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fresco.