Code Monkey home page Code Monkey logo

weight-4-polynomial-finder's Introduction

Weight-4 Polynomial Multiple Finder

Finding multiples of polynomials over 𝔽2

The problem of finding a low-weight multiple of a polynomial is of great importance in the field of cryptography. Some applications are distinguishing and correlations attacks on stream ciphers. Another area is finite-field arithmetic.

We define problem as follows. Given a polynomial P(x), find another polynomial u(x) such that the resulting product has low weight (or consists of few terms).

It is not known exactly how hard the problem over 𝔽2 is, but it is believed to be hard. One simple reduction is to represent the polynomial as a linear code and finding a minimum-weight codeword using information-set decoding. Other methods such as time--memory trade-offs are applicable as well as k-sum algorithms. Also memory-less constructions are possible. Such an algorithm is possible by defining two functions f and g, that act in any input as a random oracle to ℤm, where m is close to the degree of K(x). Then, a cycle-finding algorithm can be run for the recursion y = xf(y) + xg(y). When the two runners collide, there are two values y and y' such that xf(y) + xg(y) = xf(y') + xg(y') which gives the exponents for the multiple K(x) if yy'.

For the case w = 4, a 4-sum algorithm (generalized-birthday algorithm) is used. By extending the range from 2d/3 to 2d/3 + α, the probability increases considerably. To see this, assume that K(x) = xi + xj + xk + xl has degree m = 2d/3. By the extension of the range, there are N = 2d/3 + α - 2d/3 = 2d/3 ( 2α - 1) shifts of the form xi K(x) in this set. Using a mask (defined as the function φ) of weight d/3, the probability that φ (xi + xj) = 0 is 2-d/3, and φ (xk + xl) = 0 follows by definition. Since this is repeated for all N shifts, the probability that one passes through the filter is overwhelmingly large.

Implementation

The implementation is a threaded and scalable to up arbitrarily many cores. It is also constructed in a way such that mutexes are not needed.

Results

Origin Polynomial Multiple
Bluetooth Core E0 x97 + x92 + x89 + x80 + x76 + x73 + x69 + x68 + x64 + x61 + x59 + x58 + x57 + x56 + x55 + x54 + x53 + x51 + x49 + x44 + x43 + x41 + x39 + x36 + x35 + x34 + x32 + x31 + x30 + x21 + x19 + x15 + x13 + x9 + x5 + x3 + 1 x12647431389 + x8008354628 + x1277498415 + 1, x12671067191 + x6590666154 + x1306461382 + 1
LILI-128 x89 + x83 + x80 + x55 + x53 + x42 + x39 + x + 1 x1243366916 + x210123252 + x139501803 + 1
Grain x80 + x67 + x57 + x42 + x29 + x18 + 1 x659716151 + x103284222 + x1438988 + 1

weight-4-polynomial-finder's People

Contributors

klondi avatar grocid avatar 0xb0bb avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

Forkers

klondi

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.