Application security feature

Mobile app secrets protection

Reduce exposure of API keys and cryptographic secrets in your mobile app: keep what you can on the server and let Otukan protect what must ship in the build.

  • Android
  • iOS
  • Flutter
  • React Native
Extracted API keys is met at the encrypted secrets boundary before it reaches the appExtracted API keysEncrypted secretsYour app
  • Know what you ship

    Public identifiers, API keys and cryptographic secrets need different handling. Classifying them first shows which ones should leave the app.

  • Hidden at rest and in use

    Otukan encrypts the secrets that must ship and guards the moment your code uses them against hooking and memory reading.

  • Ready to rotate

    A rotated key ships in the next protected build through your existing pipeline, and your servers revoke the old one on your schedule.

Secret exposure paths Otukan addresses

Pick a path to see how Otukan reduces the exposure, how the app reacts and what you learn.

Strings read from the package

  1. Detect

    Otukan encrypts strings and embedded values in the protected build, so a key does not appear as readable text in the package.

  2. Respond

    Values are decrypted only when your code asks for them.

  3. Report

    An integrity signal shows when a copy of the app has been altered to reach those values.

Keys in bundled files

  1. Detect

    Otukan encrypts configuration files and resources you mark, such as those carrying service endpoints or keys.

  2. Respond

    Protected resources are opened inside the app, not left for anyone who unpacks it.

  3. Report

    Tampering with protected resources is reported to your backend.

Hooks on crypto calls

  1. Detect

    Otukan detects instrumentation attached to the functions that handle keys, signatures and tokens.

  2. Respond

    The app can stop the call before the secret is used, per your policy.

  3. Report

    Your backend receives a hooking signal and can refuse the request that followed.

Secrets lifted from memory

  1. Detect

    Otukan detects debuggers and memory-reading tools attached to the running app while keys are in use.

  2. Respond

    Sensitive operations pause or the session ends, as you choose.

  3. Report

    A signal tells your security team which app version and flow were targeted.

Controls that protect shipped secrets

Secret protection draws on several Otukan controls, each covering a different stage of a key's life in the app.

  • Asset and resource encryption

    Encrypts files and resources you ship inside the app, so configuration and embedded keys are not readable from the package.

  • Code obfuscation

    Hides the code that fetches, assembles and uses secrets, so the logic around a key is hard to follow.

  • Cryptographic controls

    Guides how your app uses platform key stores and cryptography, and protects the calls that handle keys.

  • In-memory data protection

    Limits how long secrets stay readable in memory and reacts to tools that try to read them.

Free for app publishers

Check your app's exposure

A passive review of your published app by an Otukan engineer. No files, no access to your systems. Findings go by email to the verified publisher.

You finish the request on the next page.

To reduce the exposure of secrets in a mobile app, first keep the high-value ones off the device: private keys, service credentials and signing secrets belong on your server, and the app should hold short-lived tokens instead. For the values that must ship, such as third-party API keys or configuration, Otukan encrypts them in the protected build, hides the code that uses them, and detects hooking and memory reading while they are in use on Android and iOS, including Flutter and React Native apps. Extraction becomes slow and visible, and a rotation and revocation plan limits what any leaked value is worth.

Secret classification

Start by sorting what your app carries. The right control depends on what the value can do in the wrong hands.

ClassExamplesHarm if extractedWhere it belongs
Public identifiersApp bundle ID, package name, public client IDs, analytics project IDsLow; they are meant to be visibleIn the app, restricted on the server by app identity
Restricted API keysMaps, push, search or content-service keys bound to your appQuota abuse and cost if restrictions are weakIn the app with Otukan protection and server-side restrictions
Service credentialsKeys that call paid APIs or internal services with broad rightsDirect abuse of your services and dataOn your server, behind a token exchange
Cryptographic secretsPrivate keys, shared signing or encryption secretsForged requests, decrypted traffic or stored dataGenerated in the platform key store, or kept server-side

A key that lets anyone call your backend as if they were your app deserves the most attention. Classifying it correctly often shows it can move to the server.

Control placement

Server-side alternatives

The strongest option removes the secret from the app. Your backend can hold third-party credentials and act as a proxy for the calls that need them. The app can authenticate with short-lived tokens bound to the user and session. Your server can also verify app attestation before it issues those tokens, so only a genuine app on a genuine device receives one.

Justified client-side secrets

Some values must travel with the app: a key for an SDK that runs offline, a certificate pin, or configuration needed before sign-in. For these, Otukan:

  • encrypts strings and marked resources in the protected build
  • obfuscates the code that fetches, assembles and uses them
  • detects hooking of key-handling functions and stops the call when your policy says so
  • detects debuggers and memory-reading tools while secrets are in use

Platform key stores

Keys generated on the device should live in the platform store. On Android, the Keystore keeps key material out of the app’s process and can be hardware-backed on devices that support it. On iOS, the Keychain stores secrets under data protection classes, and on supported devices the Secure Enclave holds certain private keys for signing and key agreement. Each platform is handled on its own terms. Otukan protects the code that calls these stores, a natural target for hooking.

For a sector with high-value keys, see crypto wallet app security.

Operational lifecycle

Rotation

Plan for every embedded secret to change. Protection is applied within your existing build pipeline, so a rotated key ships in the next protected release like any other change. Keep old and new keys valid on the server during the overlap, then retire the old one.

Revocation

Revocation happens on your server, which is why server-side restrictions matter even for protected keys. Tie each key to an app identity and a scope so that revoking it is a clean, contained action.

Compromise response

When a secret leaks, revoke it, ship its replacement and watch uptake by app version. Otukan’s signals record which versions and flows were targeted, so you can judge whether to force older versions to update. Before release, we test with your team: attempt extraction in an authorised lab and confirm the signal, repeat the journey on a clean device and confirm silence, then re-run install, update, sign-in and the flow that uses the key.

Return to mobile app security for how secrets protection fits the wider product. For a structured way to evaluate options, see the secrets and key protection solution guide. If your app is already published, you can request a free App Exposure Check of the public store release.

Common questions

  • Can a secret ever be fully safe inside a mobile app?

    Anything shipped to a device the attacker controls can eventually be studied, so the strongest move is to keep high-value secrets on your server. For the values that must ship, Otukan makes extraction slow and noisy: encrypted at rest in the package, protected while in use, and reported when someone tries. Short-lived tokens and rotation limit what a stolen value is worth.

  • Should we use the Android Keystore or the iOS Keychain instead?

    Use them, and use them correctly. They protect keys generated or stored on the device, and on Android the Keystore can be hardware-backed on supported devices. They do not help with a value compiled into your build, such as a third-party API key. Otukan protects those embedded values and the code that uses platform key stores.

  • Does the Secure Enclave encrypt our app data?

    Not directly. On supported Apple devices, the Secure Enclave holds certain private keys and performs signing and key agreement with them without exposing the key. Bulk data is encrypted by keys derived through those operations or protected by the Keychain and data protection classes. Otukan helps you place each secret in the right store.

  • What do we do after a key leaks?

    Revoke it on the server first, then ship a new protected build carrying its replacement and track uptake by app version. Otukan's signals show which versions and flows were targeted, which helps you decide whether older versions should be forced to update.

On the mobile engineering team?

How protection fits your build, signing and release, platform by platform.

Keep your keys out of attackers' hands

Tell us the platform, the app framework and the kinds of keys or tokens your app carries today. We never ask you to send the secrets themselves, binaries or production credentials.

Or request a technical demo