GithubHelp home page GithubHelp logo

Comments (7)

thaidn avatar thaidn commented on July 19, 2024

Quan made this change, so I'll let him decide here.

My two cents:

I think we want to be compatible with RFC 7748 because it's the standard that we believe all implementations should follow.

I'm not sure how this would break compatibility though because these keys should never appear in normal computations.

Also what's the benefit for providing a way to fingerprint Tink and other implementations?

from tink.

thaidn avatar thaidn commented on July 19, 2024

For future reference:

The masking is done at https://github.com/google/tink/blob/master/java/src/main/java/com/google/crypto/tink/subtle/Curve25519.java#L347.

It makes the public key malleable. If someone uses this to implement ECIES, but doesn't include the ephemeral public key in the KDF, the ciphertext is malleable.

from tink.

NeilMadden avatar NeilMadden commented on July 19, 2024

Do you have a reference I could read for ciphertext malleability?

In our intended application we will be including both public keys in the KDF as a general best-practice, but I wasn't aware that failure to do that might render the ciphertext malleable.

from tink.

thaidn avatar thaidn commented on July 19, 2024

Hi Neil,

ECIES ciphertext consists an ephemeral public key. With the masking, someone can flip the last bit of the last byte of the ephemeral public key to obtain another valid ciphertext.

from tink.

NeilMadden avatar NeilMadden commented on July 19, 2024

OK, that makes sense. In our usage the ephemeral public key is also associated data to the AEAD used to encrypt the payload, so I believe that should prevent that.

from tink.

thaidn avatar thaidn commented on July 19, 2024

Quan, should we do anything here?

from tink.

cryptosubtlety avatar cryptosubtlety commented on July 19, 2024

I think it's a benign difference between libraries, so I will close it without making any change.

from tink.

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.