Advanced Systems
v3.5.10ECHO, PULSE, BEACON & TME
Low-level mesh infrastructure: topology discovery, heartbeats, emergency broadcast, and temporal encoding.
ECHO — Encrypted Coordinate Heuristic Oracle
Privacy-preserving network topology discovery using virtual coordinates.
Virtual Coordinates
Nodes have virtual positions based on latency measurements. Enables route optimization without revealing physical location.
Encrypted Probes
Timing probes are AES-256-GCM encrypted. Only participating nodes can decode measurements.
import { EchoRanging } from 'yakmesh/mesh/echo-ranging';
const echo = new EchoRanging({ nodeId: 'my-node' });
// Probes are wire messages — send over the mesh, handle replies
const probeBytes = echo.createProbe(peerId); // optionally encrypted
ws.send(probeBytes);
// On receipt:
const response = echo.handleProbe(probeBytes, fromId); // → reply to send back
echo.handleResponse(responseBytes); // completes RTT measurement
// Then query what was measured
const rttMs = echo.estimateLatency(peerId);
const route = echo.findBestRoute(targetId, availablePeers);
const topo = echo.getTopology();
PULSE — Precision Universal Latency Sync Engine
Mesh heartbeat system with cryptographic proofs for liveness detection and partition detection.
ALIVE
Node responding within expected timeframe
SUSPECT
Missed heartbeats, may be experiencing issues
DEAD
Confirmed unreachable, removed from active peers
Partition Detection
When multiple nodes become SUSPECT simultaneously, PULSE detects potential network partition and triggers partition recovery protocols.
import { PulseSync } from 'yakmesh/mesh/pulse-sync';
const pulse = new PulseSync({ nodeId: 'my-node' });
// Emit a signed heartbeat (broadcast to peers)
const heartbeat = pulse.createHeartbeat({ peerCount: mesh.peers.size });
// Inbound heartbeats update liveness + partition analysis
pulse.receiveHeartbeat(heartbeatData);
// Query health and proofs
const health = pulse.getHealth(); // peer liveness, partition detection
const proof = pulse.getLivenessProof(5); // temporal heartbeat chain
const stats = pulse.getStats();
// Leader election (cryptographic timing)
pulse.startElection();
pulse.handleVoteRequest(request);
BEACON — Broadcast Emergency Alert Channel Over Network
Priority message propagation for emergency alerts. Flood-based protocol with intelligent deduplication.
| Priority | TTL | Use Case |
|---|---|---|
| CRITICAL | 300s | Security breach, network attack |
| URGENT | 180s | Service degradation, node failures |
| WARNING | 120s | Upcoming maintenance, capacity alerts |
| ROUTINE | 60s | Informational messages |
import { BeaconBroadcast, STUPA_CONFIG } from 'yakmesh/mesh/beacon-broadcast';
const beacon = new BeaconBroadcast({
nodeId: 'my-node',
onBroadcast: (msg) => mesh.sendToAll(msg.serialize()),
onReceive: (msg) => { /* inbound beacon */ },
onReceipt: (rcpt) => { /* signed delivery receipt */ },
});
beacon.addPeer(peerId);
// Send critical alert
await beacon.broadcast(
{ type: 'intrusion', source: '...' },
{ priority: STUPA_CONFIG.priorities.CRITICAL }
);
// Priority helpers
await beacon.sendEmergency({ message: 'Security incident detected' });
const stats = beacon.getStats();
TME — Temporal Mesh Encoding
Novel packet resilience system that encodes data across TIME, not space.
The Innovation
Traditional erasure coding splits data across multiple spatial paths. TME splits data across multiple temporal slices with cryptographic chaining.
- • Temporal slicing with cryptographic chaining
- • Predictive reconstruction from timing proofs
- • Resistant to timing-based attacks
import { TemporalMeshEncoder } from 'yakmesh/mesh/temporal-encoder';
const encoder = new TemporalMeshEncoder({
nodeId: 'my-node',
meshPosition: [0, 0, 0],
});
// Encode data for temporal transmission
const { streamId, slices, metadata } = encoder.encode(data, {
sliceSize: 1024,
sliceIntervalNs: /* spacing between slice sends */,
});
// Slices are sent at different times
for (const slice of slices) {
await sendWithDelay(slice);
}
// Receiving side
encoder.initReceive({ streamId, ...metadata });
encoder.receiveSlice(serializedSlice);
const reconstructed = encoder.decode(streamId);
MKC — Math Kernel Complex (NPU)
Always-on structured mathematics on the AMD XDNA NPU: hashing, GF(2⁸)/GF(4) field ops, balanced-ternary F₃ arithmetic, AVOTH seals, and TRIBHUJ ternary attention — all routed through the persistent crystal tile layout with honest CPU fallback when the NPU is unavailable or declines a job.
import { isAvailable, sha3_256, avoth, crystal, CRYSTAL_TILES } from 'yakmesh/utils/mkc';
// Probe NPU/bridge availability (honest: false → callers use CPU fallback)
if (await isAvailable()) {
const digest = await sha3_256(data); // Keccak-256 on the NPU
const seal = await avoth(state, seal); // AVOTH field seal
// Crystal: one dispatch across heterogeneous fixed-role tiles
const results = await crystal([
{ svc: 'aes', rec: b64Record }, // AES-256 tile
{ svc: 'tribh', rec: b64Record }, // TRIBHUJ tile
{ svc: 'mkc', rec: b64Record }, // scripted VM tile
]);
console.log(CRYSTAL_TILES); // tile → service map
}
SLH-DSA Backup Signatures
Defense-in-depth with FIPS 205 hash-based backup signatures. Different cryptographic assumptions from ML-DSA.
Why Dual Signatures?
ML-DSA is lattice-based. SLH-DSA is hash-based. If one cryptographic assumption breaks, the other likely still holds. Critical operations use both.
| Level | Algorithm | Signature Size | Speed |
|---|---|---|---|
| 3 | SLH-DSA-SHA2-192f | ~35 KB | ~100ms |
| 5 | SLH-DSA-SHA2-256f | ~50 KB | ~160ms |
import {
signDual,
verifyDual,
generateDualSignatureKeyPairs
} from 'yakmesh/security/crypto-config';
// Generate both ML-DSA and SLH-DSA keypairs
const { mlDsa, slhDsa } = await generateDualSignatureKeyPairs();
// Sign with both algorithms
const dualSig = signDual(message, mlDsa.secretKey, slhDsa.secretKey);
// Verify requires both signatures valid
const valid = verifyDual(
dualSig,
message,
mlDsa.publicKey,
slhDsa.publicKey
);
NIST Security Levels
Configurable security levels. Level 3 is default, Level 5 for paranoid mode.
| Level | Signatures | Key Exchange | Classical Security |
|---|---|---|---|
| Level 3 | ML-DSA-65 | ML-KEM-768 | 192-bit |
| Level 5 | ML-DSA-87 | ML-KEM-1024 | 256-bit |
import { setSecurityLevel, SecurityLevel } from 'yakmesh/security/crypto-config';
// Switch to paranoid mode
setSecurityLevel(SecurityLevel.LEVEL_5);
// All subsequent crypto operations use Level 5 algorithms
Provenance full version history →
Introduced in v1.3.1 — EchoRanging latency estimation.
- v3.0.0 — PulseSync + TemporalMeshEncoder wired into the mesh
- v3.5.10 — MKC client — CRYSTAL tile execution via utils/mkc