Git Product home page Git Product logo

Comments (3)

majn avatar majn commented on June 26, 2024

I haven't actually tried to pass 1 or p-1 as key, but believe that there is code that seems to check that 2^{2048-64} <= KEY <= p - 2^{2048-64}, which also means that the key is between 1 <= KEY <= p - 1.

https://github.com/vysheng/tgl/blob/master/mtproto-utils.c#L75-L80

from tgl.

prosecco avatar prosecco commented on June 26, 2024

Thanks for the response. I'll look again.

Best,
Karthik

On 10 Nov 2015, at 20:33, mj [email protected] wrote:

I haven't actually tried to pass 1 or p-1 as key, but believe that there is code that seems to check that 2^{2048-64} <= KEY <= p - 2^{2048-64}, which also means that the key is between 1 <= KEY <= p - 1.

https://github.com/vysheng/tgl/blob/master/mtproto-utils.c#L75-L80 https://github.com/vysheng/tgl/blob/master/mtproto-utils.c#L75-L80

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

from tgl.

majn avatar majn commented on June 26, 2024

Thanks for the response. It looks like this code checks: 2^{2048-64} <= KEY <= 2^{2048}, which is not related to $p$.
If p is also in this range, the code would certainly allow $p-1$ and probably also $p$ and $p+1$ (essentially 0,1,-1 mod p)

Yeah but it checks exactly this a few lines below https://github.com/vysheng/tgl/blob/master/mtproto-utils.c#L85-L90

from tgl.

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.