title: Using JWS for digital signature with content encryption
body: <p>I am creating a system that acts as a mediator between two entities. A sender initiates a request, my system creates a payload, then forwards it to a recipient which has the identity details of the sender (plus extra things).</p>
  <p>I need to ensure of 2 things.</p>
  <ul>
  <li>The payload is verified from my system (digital signing)</li>
  <li>Only a particular recipient can accept and read it (encrypting).</li>
  </ul>
  <p>To achieve this I am thinking of encrypting the content using the recipient's public key. Since I don't have their private key, I cannot just sign it. I can then use my private key to sign it so the recipient can verify the payload. Basically a JWS with encrypted content.</p>
  <p>This means that the recipient can verify the digital signature and then be the only person to decrypt and use the content.</p>
  <p>Should JWS be used like this? I know JWE exists but then I cannot digitally sign it.
  Is there another standard I should be using?</p>
  <p>In the future, I would also like the sender to have a signature in the payload so the recipient can ultimately verify my system and the sender.</p>
  <p>I've also been researching DIDs in which I can act as a controller. However, I am still understanding this so not too clear if this would solve my problem</p>