Over the years, I have come across this scenario several times. You have a bunch of user-related data that you want to send from one application to another. The second application is expected to “trust” this “token” and use the data in it. A timestamp is included in the token to prevent theft / reuse of the attack. For some reason (don't worry about it here), a proprietary solution was chosen rather than an industry standard such as SAML.
It seems to me that digital data signing is what you want here. If the data should be kept secret, you can also encrypt it.
But what I see a lot is that developers will use symmetric encryption, for example. AES. They suggest that, in addition to being “secret”, encryption also provides 1) message integrity and 2) trust (source authentication).
May I suspect that there is an internal weakness here? By default, this works if the symmetric key is managed properly. Without this key, of course, I don’t know how to change the encrypted token, or launch some kind of cryptographic attack after intercepting several tokens. But can a more sophisticated attacker use something here?
security authentication encryption digital-signature token
Michael lucas
source share