Giter Club home page Giter Club logo

Comments (4)

bifurcation avatar bifurcation commented on May 19, 2024

This is a very good point. I think the simplest thing to do here may be to just use the JOSE signature scheme, with the nonce as a protected header parameter. With that, the input the signature algorithm for a given nonce and payload would be:

base64("{\"nonce\":base64(nonce)}) || . || base64(payload)

This is especially appealing now that JWS has a simpler syntax for JSON-formatted objects. With that, a JWS would be nearly as simple as what's there today.
https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-36#section-7.2.2

Could you please file the "different key pair" issue as a separate issue?

from acme-spec.

taralx avatar taralx commented on May 19, 2024

JOSE protected header seems like overkill. Restricting nonces to 16 bytes doesn't sound particularly future-proof. What about prepending the nonce length?

from acme-spec.

frasertweedale avatar frasertweedale commented on May 19, 2024

Switching to JWS does solves this problem and would not require fixing the nonce length. An alternative to including the nonce in the JWS Protected Header is to make the signature payload a (stringified) JSON object that includes the "nonce" key+value as well as the other values being signed over. This would avoid other attacks of the kind described by @agl. If the signature is valid, it is a simple matter for the server to decode the payload and check that the nonce and other inputs match expected values.

Heck, you could even sign the whole response object if you wanted (minus those bits that are part of the signature construction).

It is a sensible move anyway - why devise a new signature scheme instead of using an existing one? I don't buy the argument that it is overkill.

from acme-spec.

martinthomson avatar martinthomson commented on May 19, 2024

The use of JWS is sufficient to address this problem.

from acme-spec.

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.