API reference
Public surfaces.
Start with frontera.hpp for C++ apps. Drop to frontera_at.h for a single C bring-up call.
Headers
| Header | Use |
|---|---|
frontera.hpp | Umbrella C++ API, FRONTERA_INIT, protect macros |
frontera_at.h | C antitamper: integrity, VM guard, stamp helpers |
frontera_mba.h / .hpp | Mixed Boolean Arithmetic obfuscation |
frontera_rkvm.h / .hpp | Rolling-key bytecode VM |
phomo_at.h | eBPF ptrace attach/seize/poketext watcher |
C++ umbrella
#include "frontera.hpp"
FRONTERA_INIT();
[[frontera::protect]]
int sensitive() {
return 42;
}
int main() {
// First protected entry triggers frontera_at_start()
return sensitive();
}FRONTERA_INIT()— file-scope marker (no AT in static ctors).frontera::runtime_init()— process-widefrontera_at_start()once.[[frontera::protect]]— build-time virtualize (viafrontera-protect).FRONTERA_FN/FRONTERA/FRONTERA_FUNC— manual strong wrappers.FRONTERA_SKIP_AT— skip integrity/VM/phomo (dev only).- Strong defaults (
FRONTERA_STRONG): MBA/RKVM opacity, depths, hard abort.
Antitamper — frontera_at.h
| Symbol | Meaning |
|---|---|
FRONTERA_AT_OK | Success (0) |
FRONTERA_AT_TAMPER | Integrity failure (1) |
FRONTERA_AT_ERR_ARG / _IO / _ERR | Argument, I/O, or general error |
frontera_at_start() | Self-integrity + VM guard + phomo (soft-fail) |
frontera_check_self_integrity() | Digest + memory baseline only |
frontera_vm_detect() / frontera_vm_guard() | Hypervisor detection / abort path |
frontera_at_last_error() | Last error string |
frontera_at_digest_slot | Embedded slot from libfrontera — do not redefine |
There is no frontera_report API. Reactions are return codes, optional stderr, hard process exit, or phomo SIGKILL after an optional callback.
MBA
Obfuscate arithmetic expressions. Prefer the C++ header helpers for antitamper-oriented use; plain C string rewrite APIs can leave plaintext in the binary.
#define FRONTERA_MBA_OPAQUE 1
#include "frontera_mba.hpp"
int license_generator() {
return MBA_FN()([&]() { return 2 * 4; });
}
int main(void) {
return MBA(license_generator() ^ 2);
}RKVM
frontera_rkvm_run executes rolling-key encrypted blobs.[[frontera::protect]] emits these stubs for you. Optional flags bind execution to AT state (FRONTERA_RKVM_FLAG_BIND_AT,FRONTERA_RKVM_FLAG_REQUIRE_GUARD).
phomo
| Symbol | Meaning |
|---|---|
phomo_at_start() | Start watcher for the current process |
phomo_at_set_callback() | Optional tamper callback before SIGKILL |
phomo_at_stop() | Tear down |
phomo_at_last_error() | Last error string |