Friday 30 October 2026 08:45:17 GMT+01:00

Netcrook

HomeManifesto
News
Techcrook
Geocrook
WikicrookTeamAppContact
EnglishItaliano

WIKICROOK

HMAC secret

A shared cryptographic key used to sign some JWTs; weak or reused secrets increase attack risk.

An HMAC secret is a cryptographic key shared by the systems that create and verify a message authentication code. In some JWTs, the issuer uses this key to sign the token, and a verifier uses the same key to check that the signature is valid and the token has not been altered.

The secret must be unpredictable, protected, and managed carefully. If it is weak, attackers may be able to guess it offline using a captured token; if it is reused or exposed, they may be able to forge tokens accepted by services that trust that key. Defenses include using strong randomly generated secrets, limiting access, rotating keys when needed, and enforcing strict JWT algorithm and claim checks. A valid signature alone does not prove that a token is appropriate for a particular service.

← WIKICROOK index