Git Product home page Git Product logo

Comments (4)

laurencelundblade avatar laurencelundblade commented on June 16, 2024

Yes, the interface can change in t_cose 2.0, but we have to support the t_cose 1.0 interface in a backwards compatible mode.

Your change would make the internals of t_cose_sign simpler which is good, but it would also make the use of the two-step signing more complicated. Look at two_step_sign_example(). All the BstrWrap stuff that is in t_cose_sign_encode_start() and t_cose_sign_encode_finish() would have to be implemented by the caller making it harder to use the two-step option. Example code will help, but not completely simplify it. I also worry it will make the 1.0 compatibility more complicated.

How does this help with detached payload encrypt-then-sign? At some point there should be an encrypt-then-sign API in t_cose. It should work for detached and non-detached payloads. It would probably be the t_cose_message object/API/context.

from t_cose.

kentakayama avatar kentakayama commented on June 16, 2024

With proposed interface the caller must call QCBOREncode_BstrWrap() and QCBOREncode_CloseBstrWrap2() on two-step signing. It is certainly harder because the caller may not know that the payload should be bstr-wrapped in COSE struct.
I'll modify the interface in my forked repository as a trial, so judge that the change is appropriate.

from t_cose.

laurencelundblade avatar laurencelundblade commented on June 16, 2024

I have a pretty good idea what the calling code would look like. I also can see how the t_cose 1.0 backwards compatibility mode can be handled too.

I'm still trying to understand the benefit of this change.

I know for sure that it will simplify the internals of t_cose.

Are there use cases where it will benefit the user of t_cose? So far it just seems like it makes it harder for the user. In particular, does it make things easier for encrypt-then-sign with detached content?

from t_cose.

laurencelundblade avatar laurencelundblade commented on June 16, 2024

Fixed by baa6001

from t_cose.

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.