Migration from 1.9.x to 2.0.x
PowerAuth Mobile SDK in version 2.0.0 provides the following improvements:
- PowerAuth protocol version 4.0 introduces major cryptographic upgrades to strengthen long-term security and add post-quantum protection. Signature and key agreement mechanisms now use larger elliptic curves (P-384) and optionally operate in hybrid mode with quantum-resistant ML-DSA and ML-KEM algorithms. The end-to-end encryption scheme transitions from ECIES with AES-128/CBC and HMAC-SHA-256 to an AEAD design using AES-256/CTR with KMAC-256, providing stronger integrity and confidentiality guarantees. Overall, version 4.0 modernizes the protocol to align with emerging cryptographic standards and resist future quantum attacks.
- Existing activations can be upgraded to the new PowerAuth protocol version 4.0 using the authenticated protocol upgrade procedure.
- You can select a level of security that suits your business needs. See the
PowerAuthConfigurationdocumentation for more details. - PowerAuth Mobile SDK can optionally operate in a mode fully compatible with legacy PowerAuth protocol version 3.3.
- A new
PowerAuthBiometricConfigurationclass simplifies biometric configuration of thePowerAuthSDKclass. - A new
PowerAuthSecureVaultKeyclass provides better flexibility for Secure Vault operations. - PowerAuth Mobile SDK now ensures sensitive keys are not retained in memory.
- Activation using a recovery code is no longer supported.
- External encryption key feature is discontinued and will be removed in the next SDK release.
Compatibility with PowerAuth Server
- This release is fully compatible with PowerAuth Server version
2.0.0and later. - If you configure
PowerAuthSDKto operate with the legacy PowerAuth protocol 3.3, it requires PowerAuth Server version1.9.0or later.
Android
Notable changes on Android:
- New
PowerAuthBiometricPromptclass simplifies biometric key setup and authentication. - Added the
SecureDataclass toio.getlime.security.powerauth.corepackage to enhance in-memory management of sensitive data.
API changes
- The following methods or properties are now deprecated:
PowerAuthSDKclass:changePasswordUnsafe()- use asynchronouschangePassword()as a replacement.persistActivationWithAuthentication()- use asynchronous variant withIPersistActivationListeneras a callback parameter.persistActivationWithPassword()- use asynchronous variant withIPersistActivationListeneras a callback parameter.persistActivation(..., IPersistActivationWithBiometricsListener)- use asynchronous method withIPersistActivationListeneras a callback parameter.- All variants of
addBiometryFactor()with “title” and “description” parameters are now replaced with variant usingPowerAuthBiometricPrompt. removeBiometryFactor()- use asynchronous variant withIRemoveBiometryFactorListeneras a callback parameter.authenticateUsingBiometrics()- with “title” and “description” parameters, use variant withPowerAuthBiometricPromptparameter instead.requestGetSignatureWithAuthentication()- useauthenticationHeaderForRequestWithParams()method instead which throws an exception in case of failure.requestSignatureWithAuthentication()- useauthenticationHeaderForRequestWithBody()method instead which throws an exception in case of failure.
PowerAuthConfigurationclass:getOfflineSignatureComponentLength()- usegetOfflineAuthenticationCodeComponentLength()instead.
PowerAuthConfiguration.Builderclass:offlineSignatureComponentLength()- useofflineAuthenticationCodeComponentLength()instead.
PowerAuthKeychainConfigurationclass:isLinkBiometricItemsToCurrentSet()- usePowerAuthBiometricConfiguration.isInvalidateBiometricFactorAfterChange()instead.isConfirmBiometricAuthentication()- use equal method inPowerAuthBiometricConfigurationinstead.isAuthenticateOnBiometricKeySetup()- use equal method inPowerAuthBiometricConfigurationinstead.isFallbackToSharedBiometryKeyEnabled()- use equal method inPowerAuthBiometricConfigurationinstead.Builder.linkBiometricItemsToCurrentSet()- usePowerAuthBiometricConfiguration.Builder.invalidateBiometricFactorAfterChange(boolean)instead.Builder.confirmBiometricAuthentication()- use equal method inPowerAuthBiometricConfiguration.Builderinstead.Builder.authenticateOnBiometricKeySetup()- use equal method inPowerAuthBiometricConfiguration.Builderinstead.Builder.enableFallbackToSharedBiometryKey()- use equal method inPowerAuthBiometricConfiguration.Builderinstead.
PowerAuthTokenclass:generateHeader()- usegenerateTokenHeader()as a replacement. Note that you should usePowerAuthTokenStore.generateAuthenticationHeader()to make sure the PowerAuth SDK synchronize the time with the server properly.
PowerAuthAuthorizationHttpHeaderclass:- The value of
powerAuthErrorCodeproperty, or value returned ingetPowerAuthErrorCode()is filled only in deprecated SDK functions, such asrequestSignatureWithAuthentication(). To fix this, migrate toauthorizationHeaderForRequestWithBody()that throws an exception in case of failure. isValid()method is also deprecated, because the new methods, such asauthorizationHeaderForRequestWithBody(), always returns the valid header.
- The value of
- The following classes and interfaces are now deprecated:
IPersistActivationWithBiometricsListener- useIPersistActivationListenerinstead.
- Due to removed support of recovery codes, the following classes and methods are no longer available:
- Methods removed in
PowerAuthSDK:createRecoveryActivation()hasActivationRecoveryData()getActivationRecoveryData()confirmRecoveryCode()
- Methods removed in
PowerAuthActivation.Builder:- all variants of
recoveryActivation()
- all variants of
- Methods removed in
ActivationCodeUtil:parseFromRecoveryCode()validateRecoveryCode()validateRecoveryPuk()
- Other removed methods:
CreateActivationResult.getRecoveryData()ErrorResponseApiException.getCurrentRecoveryPukIndex()
- Removed classes and interfaces:
IGetRecoveryDataListenerIConfirmRecoveryCodeListenerRecoveryData
- Methods removed in
- The following functions now takes or returns
SecureDatainstead ofbyte[]:PowerAuthSDK.persistActivationWithPassword()PowerAuthSDK.addBiometryFactor()PowerAuthSDK.setExternalEncryptionKey()PowerAuthSDK.addExternalEncryptionKey()PowerAuthConfiguration.getExternalEncryptionKey()PowerAuthConfiguration.Builder.externalEncryptionKey()PowerAuthAuthentication.getBiometryFactorRelatedKey()PowerAuthAuthentication.getOverriddenPossessionKey()- All static functions in
PowerAuthAuthenticationthat takes custom possession or biometry key in parameter. IFetchEncryptionKeyListener.onFetchEncryptionKeySucceed()CryptoUtils.ecdhComputeSharedSecret()BiometricKeyData.getDerivedData()BiometricKeyData.getDataToSave()
- Removed all interfaces deprecated in release
1.9.x
Other changes
- TBA
iOS & tvOS
Notable changes on iOS:
- Added the
PowerAuthCoreDataobject toPowerAuthCoremodule to enhance in-memory management of sensitive data.
API changes
- The following methods or properties are now deprecated or changed:
PowerAuthSDKclass:- class constructor taking only
PowerAuthConfigurationobject in parameter now throws error. unsafeChangePassword(from:to:)- use new two-step API for password changebeginPasswordChange(oldPassword:callback:)as a replacement.changePassword(from:to:callback:)- use new two-step API for password changebeginPasswordChange(oldPassword:callback:)as a replacement.validatePassword(password:callback:)- method has no direct replacement. If your application requires password validation here, that indicates a deeper architectural issue that may introduce security vulnerabilities.persistActivation(with:)- use asynchronouspersistActivation(with:callback:)as a replacement.persistActivation(withPassword:)- use asynchronouspersistActivation(withPassword:callback:)as a replacement.removeBiometryFactor()- use asynchronousremoveBiometryFactor(callback:)as a replacement.- Constructor
PowerAuthSDK(configuration:keychainConfiguration:clientConfiguration:)- use methods withPowerAuthBiometricConfigurationparameter instead. requestSignature(with:method:uriId:body:)- useauthenticationHeaderForRequestWithBody(with:method:uriId:body:)method instead.requestGetSignature(with:uriId:params:)- useauthenticationHeaderForRequestWithParams(with:method:uriId:params:)method with"GET"as method parameter.offlineSignature(with:uriId:body:nonce:)- use asynchronousofflineAuthenticationCode(with:uriId:body:nonce:callback:)method that handle the biometric authentication properly.verifyServerSignedData(_:signature:masterKey:)- useverifyDigitalSignature(signature:forData:withKey:)method where you can specify the key for verification.signData(withDevicePrivateKey:data:callback:)- usecalculateDigitalSignature(authentication:forData:withKey:callback:)method where you can specify the key for signing.signJwt(withDevicePrivateKey:claims:callback:)- usecalculateJwsSignature(authentication:forData:dataType:compact:withKey:callback:)method where you can specify the key for signing and format of token.eciesEncryptorForApplicationScope(callback:)- method has been removed, useencryptorForApplicationScope(callback:)as replacement.eciesEncryptorForActivationScope(callback:)- method has been removed, useencryptorForActivationScope(callback:)as replacement.fetchEncryptionKey(_:index:callback:)- method is effective only if PowerAuthSDK is running at protocol 3.3 and will be removed once we drop support for this legacy protocol. Meanwhile you can migrate to the newfetchSecureVaultKey(authentication:keyIdentifier:callback:)method providing a better flexibility for secure vault operations.
- class constructor taking only
PowerAuthConfigurationclass:offlineSignatureComponentLengthproperty is now replaced withofflineAuthenticationCodeComponentLength
PowerAuthTokenStoreprotocol:generateAuthorizationHeader(withName:completion:)is replaced withgenerateAuthenticationHeader(withName:completion:)
PowerAuthAuthorizationHttpHeaderis deprecated and replaced withPowerAuthHttpHeader
- All static methods for accessing a various shared instances are now deprecated:
PowerAuthSDK.initSharedInstance(...)andPowerAuthSDK.sharedInstance()- To ensure better control and flexibility, manage the global instances within your application code.PowerAuthClientConfiguration.sharedInstance()- use a class constructor with no parameters if you want to create the default configuration.PowerAuthKeychainConfiguration.sharedInstance()- use a class constructor with no parameters if you want to create the default configuration.
- The following properties in
PowerAuthKeychainConfigurationclass are now deprecated:linkBiometricItemsToCurrentSet- use newPowerAuthBiometricConfiguration.invalidateBiometricFactorAfterChangeinstead, with the same meaning.allowBiometricAuthenticationFallbackToDevicePasscode- use newPowerAuthBiometricConfiguration.allowFallbackToDevicePasscodeinstead, with the same meaning.invalidateLocalAuthenticationContextAfterUse- use newPowerAuthBiometricConfiguration.invalidateLocalAuthenticationContextAfterUseinstead, with the same meaning.- Be aware that if you provide both,
PowerAuthBiometricConfigurationandPowerAuthKeychainConfigurationobjects to initializePowerAuthSDK, then the values from the biometric configuration takes precedence.
-
PowerAuthCoreEciesEncryptorclass has been removed and replaced byPowerAuthCoreEncryptor. The new class doesn’t allow you to reuse its instance, so you have to create new encryptor for each encrypted request. - Due to removed support of recovery codes, the following classes and methods are no longer available:
- Methods removed in
PowerAuthSDK:createActivation(withName:recoveryCode:recoveryPuk:extras:callback:)hasActivationRecoveryData()activationRecoveryData(authentication:callback:)confirm(recoveryCode:, authentication:callback:)
- Methods removed in
PowerAuthActivationCodeUtil:validateRecoveryCode()validateRecoveryPuk()parseFromRecoveryCode()
- Other changes:
- removed class
PowerAuthActivationRecoveryData - removed property
PowerAuthActivationResult.activationRecovery - removed constructor
PowerAuthActivation(recoveryCode:recoveryPuk:name:)
- removed class
- Methods removed in
- The following functions or properties now takes or returns
PowerAuthCoreDatainstead ofData:PowerAuthSDK.setExternalEncryptionKey()PowerAuthSDK.addExternalEncryptionKey()PowerAuthSDK.fetchEncryptionKey()PowerAuthConfiguration.externalEncryptionKey- All static functions in
PowerAuthAuthenticationthat takes custom possession or biometry key in parameter. PowerAuthAuthentication.overridenPossessionKeyproperty is nowcustomPossessionKeyPowerAuthAuthentication.overridenBiometryKeyproperty is nowcustomBiometryKeyPowerAuthCoreCryptoUtils.ecdhComputeSharedSecret()
- The following methods in
PowerAuthSDKclass now returns cancelable object allowing you to cancel the pending biometric authentication:authenticateUsingBiometry(withPrompt:callback:)authenticateUsingBiometry(withContext:callback:)
-
Removed all interfaces deprecated in release
1.9.x - To support authenticated protocol upgrade, following method was added to the
PowerAuthSDK:startProtocolUpgrade(password:callback:)
Other changes
- TBA
iOS & tvOS App Extensions
- The
PowerAuth2ForExtensionslibrary is now deprecated and no longer supported and maintained. You can use full feature PowerAuth mobile SDK as a replacement in your app extension.
Known Bugs
The PowerAuth SDKs for watchOS, do not use time synchronized with the server for token-based authentication. To avoid any compatibility issues with the server, the authentication headers generated in your App Extension or on watchOS still use the older protocol version 3.1. This issue will be fixed in a future SDK update.
You can watch the following related issues: