MeshCore Encryption Overview

This page summarizes MeshCore's encryption as verified from the official source code. The key facts: AES-128 symmetric encryption, ECDH key exchange using Ed25519 keys transposed to X25519, and a 2-byte truncated MAC (derived from HMAC-SHA256) for message authentication.

Verified Encryption Summary

ComponentAlgorithmNotes
Symmetric cipherAES-128 ECB16-byte key (CIPHER_KEY_SIZE=16); zero-padding on final block
Message authentication2-byte truncated MAC (from HMAC-SHA256)CIPHER_MAC_SIZE=2; encrypt-then-MAC, MAC prepended before the ciphertext
Key exchangeECDH via X25519Ed25519 keys converted to X25519 for DH; AES-128 uses 16 bytes of the 32-byte shared secret, the MAC is keyed with the full 32
Identity keysEd2551932-byte public key, 64-byte private key
Advertisement signingEd25519 signaturePrevents node identity spoofing

Security Caveats

Common Misconceptions

Source: Official MeshCore repository source code. Verified 2026-05-03.


Revision #4
Created 2026-05-03 06:20:53 UTC by Mesh America Admin
Updated 2026-06-09 14:17:19 UTC by Mesh America Admin