Most Go services pull in third-party Web Push libraries to deliver offline browser notifications. With Go 1.26 (crypto/ecdh, crypto/hkdf, crypto/aes, crypto/cipher, crypto/ecdsa), you can implement the full RFC 8291 (aes128gcm) encryption and RFC 8292 (VAPID ES256 JWT) stack in ~180 lines of pure standard library code with zero external dependencies.

We just shipped this in production at AsianScore to push live kickoff, goal, and full-time football & NBA alerts directly to browsers even after users close the tab.

1. Why Zero-Dependency Web Push Matters in Production

When running a lightweight single-binary live scoreboard (AsianScore Live Scores), keeping the dependency tree minimal avoids supply-chain churn and keeps container images tiny.

The browser Web Push protocol requires only two cryptographic building blocks:

  1. RFC 8292 VAPID ES256 JWT: Authenticates your application server to FCM / Apple Web Push / Mozilla Autopush using a persistent P-256 keypair.
  2. RFC 8291 aes128gcm Payload Encryption: Performs ephemeral ECDH key agreement against the browser's p256dh public key, derives the 16-byte Content Encryption Key (CEK) and 12-byte nonce via HKDF-SHA256, and seals the payload with AES-128-GCM.

2. Core RFC 8291 Encryption in Pure Go 1.26

// RFC 8291 §3.3 + RFC 8188 aes128gcm using Go 1.26 stdlib crypto/ecdh & crypto/hkdf keyInfo := append(append([]byte("WebPush: info\x00"), uaPubBytes...), asPubBytes...) ikm, _ := hkdf.Key(sha256.New, ecdhSecret, authSecret, string(keyInfo), 32) cek, _ := hkdf.Key(sha256.New, ikm, salt, "Content-Encoding: aes128gcm\x00", 16) nonce, _ := hkdf.Key(sha256.New, ikm, salt, "Content-Encoding: nonce\x00", 12) block, _ := aes.NewCipher(cek) gcm, _ := cipher.NewGCM(block) padded := append(append([]byte(nil), plaintext...), 0x02) // final record delimiter ciphertext := gcm.Seal(nil, nonce, padded, nil) 

Notice how clean crypto/hkdf in modern Go makes RFC 8291 — no manual HMAC-Extract/Expand boilerplate and zero external packages in go.mod.

3. Verifying End-to-End with Live Match Telemetry & Public SHA-256 Ledger

On the frontend, our Service Worker (/sw.js) receives the decrypted JSON payload ({ title, body, url, tag }) and opens the exact match page with real-time events, boxscores, and lineups.

We pair this real-time stack with two open resources for sports developers and quantitative researchers:

Feel free to test the public endpoints or inspect the live scoreboard at asianscore.com/scores.html!