Skip to content
Free since 2015. Built for the engineers who keep things running.

cat /articles/hmac-and-macs-the-inner-workings-of-jwts.md

Security

HMAC and MACs – The Inner Workings of JWTs

HMACs and MACs are authentication codes and are often the backbone of JWT authentication systems. Let’s take a look at how they work. MACs are exactly what they sound like; small codes that allow receivers of messages to know who the sender was (authentication).

qvault.io05 Aug 2020 · summary

article --summary

The summary

HMACs and MACs are authentication codes and are often the backbone of JWT authentication systems. MACs are exactly what they sound like; small codes that allow receivers of messages to know who the sender was (authentication). A MAC code is calculated by using a message and a secret key as inputs. Anyone who has a copy of that secret key can then verify that that code and message were created by someone with the same key. The interesting thing about the JWT system is that the sender and the receiver of the JWT are typically the same entity, that is, the webserver.

Editorial note: This is a summary of an article first published by qvault.io. The full piece is on their site.

articles --latest

Latest articles

New from the blogs we follow and the community.

All articles

newsletter --weekly

DevOps Weekly, minus the noise.

The best reads, new jobs and upcoming events, in one email a week.