Android Question AES - EAX encryption

giada

Member
Hi,
in encryption library is written:
Cipher
This object provides the functionality of a secret (symmetric) key encryptor and
decryptor. The algorithms may commonly be one of the following, there are others not listed here.
How can i find other algorithms supported?
Someone uses AES-EAX encryption?
Thanks
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
List all algorithms:
B4X:
Dim security As JavaObject
Dim providers() As Object = security.InitializeStatic("java.security.Security").RunMethod("getProviders", Null)
For Each provider As JavaObject In providers
    Dim services() As Object = provider.RunMethodJO("getServices", Null).RunMethod("toArray", Null)
    For Each service As JavaObject In services
        Log(service.RunMethod("getAlgorithm", Null))
    Next
Next

I'm not familiar with EAX.
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
Seems to be a mixture of AES and HMAC to authenticate the data, too (like a signature). In PHP (you can search the forum for AES and HMAC to adapt it with agrahams encryption lib) there's an example for php here: https://www.php.net/manual/en/function.openssl-encrypt.php. Should be easy to adapt.

As I can see, there are several different formats to do so (mostly how the data is mixed and encrypted). So you need to check what the api expects and adapt the steps from the php example.
 
Upvote 0
Top