Activation Upgrade
This document describes how an existing PowerAuth activation is upgraded from protocol version 3 to protocol version 4.
The upgrade introduces new cryptographic algorithms, new factor keys, and a new shared secret. The process is authenticated and requires user presence (PIN / password, and optionally biometry).
Upgrade is performed transparently by the PowerAuth Client, typically right after activation status indicates that upgrade is available.
Detecting Upgrade Availability
The PowerAuth Client determines whether an upgrade is available from the activation status blob. Upgrade is available for the application if the following condition is true:
CURRENT_VERSIONis3andUPGRADE_VERSIONis4
Overview
The V3 → V4 upgrade consists of two steps:
/pa/v4/upgrade/start/pa/v4/upgrade/confirm
The start upgrade endpoint uses end-to-end encryption in application scope.
High-level flow:
- Client detects upgrade availability from activation status.
- Client initiates upgrade by calling
/pa/v4/upgrade/start. - Server and client establish a new
KEY_ACTIVATION_SECRET, exchange new signing keys, and set theSTATUS_FLAG_UPGRADE_CONFIRMATIONflag totrue. - Client migrates its local activation data to protocol V4.
- Client finalizes upgrade by calling
/pa/v4/upgrade/confirmusing V4 authentication. - Server marks activation as protocol V4 and clears the
STATUS_FLAG_UPGRADE_CONFIRMATIONflag.
Authenticated Upgrade
Upgrade to protocol version 4 is authenticated:
/pa/v4/upgrade/startis authenticated with version 3 authentication code (possession_knowledge)./pa/v4/upgrade/confirmis authenticated with version 4 authentication code (possession factor).
Optionally, the biometric factor can be upgraded as part of the process.
Upgrade Start
Client
- Client marks upgrade as in progress in persistent storage.
- Client generates new signing key pairs (ECDSA / ML-DSA depending on algorithm).
-
Client prepares a shared-secret request.
- Client sends request to
/pa/v4/upgrade/start:
- Encrypted with E2EE V4, application scope
SHARED_INFO_1 = "/pa/upgrade/start"- Authenticated with V3 authentication code (
uriId = "/pa/upgrade/start")
Request body (before encryption):
{
"sharedSecretRequest": {
"algorithm": "EC_P384_ML_L3",
"encapsulationKeys": [ "Base64" ]
},
"devicePublicKeys": {
"ecdsa": "Base64",
"mldsa": "Base64"
},
"enableBiometry": true
}
Server
On /pa/v4/upgrade/start:
- Validate version 3 authentication code.
- Decrypt request payload.
- Reject request if activation is already upgraded.
- Store the new device public keys.
- Derive a new
KEY_ACTIVATION_SECRETincluding all factor keys (biometry optional). - Set
STATUS_FLAG_UPGRADE_CONFIRMATION = 1on activation record. - Configure the biometric factor based on request.
- Prepare response payload:
{
"sharedSecretResponse": {
"encapsulatedKeys": [ "Base64" ]
},
"serverPublicKeys": {
"ecdsa": "Base64",
"mldsa": "Base64"
}
}
Client (after response)
After receiving response from /pa/v4/upgrade/start, client:
- Decrypts response.
- Derives new
KEY_ACTIVATION_SECRET. - Stores new server public keys.
- Encrypts and stores newly generated private signing keys (using
KEK_DEVICE_PRIVATE, AEAD). - Switches local activation to protocol V4.
- Upgrades biometric KEK if biometry is enabled.
At this point, the client operates locally in protocol V4, but the server still awaits confirmation.
Upgrade Confirm
Client
Client sends request to /pa/v4/upgrade/confirm:
- Authenticated with V4 authentication code (possession factor)
- Request body is empty:
{}
Server
On /pa/v4/upgrade/confirm:
- Verify that activation is awaiting upgrade confirmation.
- Validate V4 authentication code.
- Clear
STATUS_FLAG_UPGRADE_CONFIRMATION. - Set activation protocol version to
4. - Return:
{
"status": "OK"
}
Client
After successful response:
- Client clears the local “upgrade in progress” flag.
- Upgrade is complete.
From this point on, all operations use protocol V4.
Recovery From Failures
The upgrade process is resilient to network failures.
- Failure after
/pa/v4/upgrade/start(the client did not receive response):- Client clears the local upgrade-in-progress flag.
- Application retries upgrade from the beginning.
- Failure after
/pa/v4/upgrade/confirm(the client did not receive response):- Client fetches activation status.
- If the server already reports protocol V4, the client completes locally.
- If the server is still V3 and
STATUS_FLAG_UPGRADE_CONFIRMATIONis set, client retries/pa/v4/upgrade/confirm.
Special Situations
Protocol Behavior Before Upgrade Completes
If the client supports version 4 but activation is still version 3:
- Authentication code uses protocol 3.3
- Token headers use protocol 3.3
- End-to-end encryption uses protocol 3.3
After the upgrade completes, all operations switch to protocol version` 4.
Database Changes
On the server:
pa_activation.versionis set to4after successful upgrade.
Biometry Key Migration
Protocol version 4 uses 256-bit keys instead of 128-bit keys.
If biometry is enabled:
iOS
SDK generates a new 256-bit KEK and stores it in Keychain silently.
Android
If authenticateOnBiometricKeySetup is enabled, user authentication is required to generate the new 256-bit key.