so I am working on a software that will have to eventually communicate with one or more servers. I am experimenting on implementing Json Web Tokens for specific parts of this communication (basically not for authentification, they will be access tokens mostly).
For some reasons, I would want to include sensitive data as a part of the payload (not highly sensitive, more like infos that are better not be shown for privacy reasons, but not critical for the application integrity).
After reading the JWE specs, and considering the available time i have to do this, i would like to spare the task of building a proper JWE for the moment, and just use a custom function to encrypt the payload before creating the JWS. A proper JWE would be then delayed until next version of the software.
Is it totally to be avoided? Can i use this as a temporary solution? Or is it rather a sign of bad desing of my communication ways?
EDIT - I preferred editing this topic, as the new question is closely related to the first one, but a bit more precise and specific:
I went on with proper security specifications and tests with it. Now that i came up with what seems to be a good encryption solution, and read quite a lot more on the subject, it seems that the approach I started to work with would be valid: it is stated in many places that encryption does not cover the content integrity, so that the message must go through a MAC (after encryption).
_So, let's take the initial question in the inverse order: now that i have a properly encrypted message, and then need to MAC it, is a JWS built with the HMAC algorithm a valid MAC? Or is it just language abuse to call it a HMAC JWS?