Android and iOS

Nonce discipline with AES-GCM

Key lifecycles, signatures, encryption and application data.

Keys and cryptography1 min readEditorial methods

AES-GCM security depends on correct key and nonce use. Reusing a nonce under the same key can cause serious security failure.

Evaluation approach

Assess generation across processes, reinstalls and restores. Follow the library's documented usage.

Application example

An offline recorder must not restart a nonce counter at the same value under the same key after reopening.

Limits and considerations

A random-looking value is not automatically a suitable nonce.

Can backup restoration cause reuse?

Restoring old counter or generation state can reintroduce values. Include multiple processes and recovery in the design so normal lifecycle events preserve the required properties.

Checks and decisions

  • Document generation
  • Test restarts
  • Use the correct API

Sources

The primary references above provide the technical basis. Example workflows and evaluation suggestions are this publication’s explanations, not independent test results for a particular product.