Giter VIP home page Giter VIP logo

Comments (3)

pkern avatar pkern commented on July 28, 2024

An alternative we discussed is updating the protocol to remove this option and thus making it simpler. This was a "you would not need configuration" attempt, but one that would rely on smart key (re)generation, requiring knowledge of all prior public keys.

from glome.

burgerdev avatar burgerdev commented on July 28, 2024

The more I think about this, the more I come to the conclusion that the implementation is correct. The protocol specifies

7-bit service key prefix and message tag prefix (of any length, including 0)
[...]
if no index found [the service key prefix] will be matched with the public key

which is, granted, not very precise. But the 7 least significant bits of a value stored in little-endian format can ostensibly be called a prefix. More elegant would have been to take the 7 least significant bits of the most significant byte (exploiting the reserved high-bit of x25519 public keys), but I don't think we'd gain much from changing the implementation that way. If you agree, I'd say we adjust the protocol spec to say what the implementation does and close this issue.

from glome.

pkern avatar pkern commented on July 28, 2024

I think you are correct. In retrospect I confused myself. Because the top bit is always zero in the public key anyway, I think this actually makes more sense than a bit shift.

from glome.

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.