GithubHelp home page GithubHelp logo

Comments (3)

valeriosetti avatar valeriosetti commented on May 31, 2024 1

Checking test_suite_pk.function it seems to me that actually performs mbedtls_pk_check_pair() with one opaque PK context and one non-opaque one. So if I'm not wrong the thing we're missing is a test in which both keys are opaque.

PS = Also the last line of the description doesn't hold any more, right?

from mbedtls.

valeriosetti avatar valeriosetti commented on May 31, 2024 1

Edit to the previous comment. mbedtls_pk_check_pair is meant to check a private/public pair as the name suggests, but as far as I know opaque keys can only wrap key-pairs not public keys only. In other words it's OK to run check_pair between an opaque and a non-opaque context (as mbedtls_pk_check_pair in test_suite_pk.function is doing), but it's not possible to run check_pair between 2 opaque contexts. Am I wrong?

from mbedtls.

mpg avatar mpg commented on May 31, 2024 1

PS = Also the last line of the description doesn't hold any more, right?

Agreed, edited the description accordingly.

but it's not possible to run check_pair between 2 opaque contexts.

Agreed too.

Checking test_suite_pk.function it seems to me that actually performs mbedtls_pk_check_pair() with one opaque PK context and one non-opaque one.

Looking at the code, that's supposed to work for ECC keys but not for RSA keys. So perhaps all that's left to do is:

  • document that opaque RSA keys can't be used with check_pair() - probably an addition to #8937?
  • perhaps also add a test that calling check_pair() on a opaque RSA keys indeed fails with an appropriate error (as opposed to crashing or doing something silly)?

from mbedtls.

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.