[ssh_x509] android applications with PKIX-SSH 18.+

ssh_x509 at roumenpetrov.info ssh_x509 at roumenpetrov.info
Wed Jun 3 23:33:11 EEST 2026


Hello,

You may notice that about a month after the release of version 18.0.2, there is a missing notification for Android applications.
This is not a mistake. Unfortunately OpenSSL cryptographic loadable modules stop to work with 18.* release.

SecureBox is not impacted as application does not distribute loadable modules. It may be impacted if a "TermOne Plus" try to install own modules.
Remark: Impact is on both modes - engines(old one) or providers(new one).

"SecureBox Pro" is impacted as is packaged with engine and provider. These loadable modules are used either for operations with identities(private keys) stored on device or to find device CA certificates.
Remark: Replacement of engine with provider is still in progress.


In brief:
 From the list of solutions, the "do not use OpenSSL-based arc4random_buf on Android" model was selected, published in the release_18_0 and main branches.

Long story:
Issue is related to the FIPS support that was implemented about 15 years ago. Implementation starts with support for the OpenSSL FIPS 1.2 module.
As ARC4 algorithm is insecure ssh (‘PKIX-SSH!) builds with FIPS enabled OpenSSL provides set of arc4-functions.
If cryptographic library runs in FIPS these functions call functions from OpenSSL API. This ensured that is used FIPS approved random number generator i.e., a securely generated random numbers.
Otherwise are uses system arc4-functions. If a function is missing the code provides compatible implementation based on OpenSSL.

The algorithm used by arc4-functions was later changed to chacha, but it retained misleading function names. As a result, the functional test during configuration cannot detect whether the operating system uses an insecure random number generator.
Remark: Different versions of BSD implement this change at different times.

SSH (PKIX-SSH 18.*) assumes support for FIPS enabled build if OpenSSL supports providers (release 3+). This activates replacement of arc4-functions. The issue is that Android C library(bionic) calls arc4random_buf function when library is initialised. Replacement function calls OpenSSL functions and as result OpenSSL is initialised indirectly. Another impact is that explicit initialisation of cryptographic library in ssh code is without effect - support for loadable modules in context of an Android application is lost.


The long-term solution is to discard inherited(legacy) code with arc4-functions. In consequence is used temporary solution do not replace arc4random_buf on Android. The compatibility and replacement function will be removed in the next mayor release.


Regards,
Roumen Petrov

P.S. Branch release_18_0 is ready for next patch release.



More information about the ssh_x509 mailing list