Skip to main content

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 HMAC-SHA256 for message authentication.

Verified Encryption Summary

ComponentAlgorithmNotes
Symmetric cipherAES-128 ECB16-byte key; zero-padding on final block
Message authenticationHMAC-SHA256 (2-byte truncated MAC)Encrypt-then-MAC scheme
Key exchangeECDH via X25519Ed25519 keys converted to X25519 for DH
Identity keysEd2551932-byte public key, 64-byte private key
Advertisement signingEd25519 signaturePrevents node identity spoofing

Common Misconceptions

  • Not AES-256: MeshCore uses AES-128, not AES-256. Both are considered secure for this application; the choice of 128-bit keys keeps packet overhead minimal.
  • Not CTR mode: The implementation uses ECB mode with zero-padding, not CTR or GCM mode.
  • The official MeshCore website states "AES-128 encryption" - this matches the source code.

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