0xreversed/with.ai
AppsWorksSource available
Target: Aegis Authenticator (Android APK)

Traced how Aegis Authenticator makes its six-digit codes from the Android APK with REA

Aegis Authenticator (Android APK): Found the TOTP code path in a released APK and rebuilt it.
Image: rea.tools

What was done

The REA project shows REA inspecting the open source Aegis Authenticator APK, finding the login-code calculation and checking a reconstruction against 133 test cases.

The REA project published a case study on Aegis Authenticator, an open source Android app. Using REA's Android tools, it finds how the app makes six-digit login codes and rebuilds the calculation in a browser demo with an adjustable clock.

How it was done

The page lists four REA Android tools: package inspection, class search, class inspection and reference tracing. They narrowed 3,077 classes to three Totp matches, with one class as the calculation candidate. Tracing it back to the display code showed which method the screen calls. Reading the method showed 30-second time blocks, an HMAC with the account key, and six-digit output. The page does not name the model or agent. The run used REA 6.1.0 on 9 October 2026.

Results

A reconstruction was checked against 133 test cases and the RFC 6238 SHA-1 reference cases. The browser demo reproduces the code generator, and you can move the clock to watch the code change. Aegis is GPL-3.0 licensed and its source is public, so this works as a worked example rather than a bypass.