Protect & stamp

Rewrite, link, seal.

Protection is a two-tool story: virtualize marked functions at build time, then stamp the linked image so runtime integrity has something to trust.

frontera-protect

Rewrites marked functions into rolling-key VM stubs that embed encrypted bytecode and callfrontera_rkvm_run. On first entry, stubs also callfrontera_at_start() once (unless FRONTERA_SKIP_AT).

clibash
frontera-protect [--seed N] [-o out.cpp] input.cpp
frontera-stamp <binary>

Function markers (equivalent):

markers.cppC++ · GNU/Linux
[[frontera::protect]]
int returnLicense() { /* ... */ }

// frontera:protect
int returnLicense() { /* ... */ }

/* frontera:protect */
int returnLicense() { /* ... */ }

frontera-stamp

After link, frontera-stamp <binary> hashes the file with the digest payload bytes treated as zeros and writes the SHA-256 intofrontera_at_digest_slot (magic FRNTRADG / trailGDARTNRF). Runtime self-check uses the same convention.

No manual SHA embedding. The slot is provided bylibfrontera. If you skip stamping, frontera_at_start() will not see a trusted digest.

Integrity model

What Frontera is not