Logon and credentails

In order to start a session with Mobile Server, a client should call Connect and Login commands.
As a parameter of the Login command, the client should provide username and password for the system. By default Mobile Server expects the username and password to be encrypted.
Mobile Server protocol relies on Diffie-Hellman-Merkle method for generating a shared secret between client and server that is used for encrypting \ decrypting the username and password.

Public keys exchange

Client sends Connect command with its public key as an input parameter:

Server responds to the Connect command with its public key as output parameter:

Diffie-Hellman configuration

Mobile server supports the following configurations for DHM:

  • Prime number p (both 1024 and 2048 bits) represented in hex

  • 1024 bit: 0xF488FD584E49DBCD20B49DE49107366B336C380D451D0F7C88B31C7C5B2D8EF6F3C923C043F0A55B188D8EBB558CB85D38D334FD7C175743A31D186CDE33212CB52AFF3CE1B1294018118D7C84A70A72D686C40319C807297ACA950CD9969FABD00A509B0246D3083D66A45D419F9C7CBD894B221926BAABA25EC355E92F78C7
    2048 bit: 0x87A8E61DB4B6663CFFBBD19C651959998CEEF608660DD0F25D2CEED4435E3B00E00DF8F1D61957D4FAF7DF4561B2AA3016C3D91134096FAA3BF4296D830E9A7C209E0C6497517ABD5A8A9D306BCF67ED91F9E6725B4758C022E0B1EF4275BF7B6C5BFC11D45F9088B941F54EB1E59BB8BC39A0BF12307F5C4FDB70C581B23F76B63ACAE1CAA6B7902D52526735488A0EF13C6D9A51BFA4AB3AD8347796524D8EF6A167B5A41825D967E144E5140564251CCACB83E6B486F6B3CA3F7971506026C0B857F689962856DED4010ABD0BE621C3A3960A54E710C375F26375D7014103A4B54330C198AF126116D2276E11715F693877FAD7EF09CADB094AE91E1A1597


  • Primitive root g: 0x02

Note: Please have in mind that Mobile Server send its public key and expects client's public key in little-endian format. For more information see Appendix

Encryption

For the encryption of username and password is used the Advanced Encryption Standard (AES) algorithm.
The AES should be configured with the following parameters:

  • Chaining: CBC
  • Padding: PKCS7 or ISO10126
  • Initialization vector: first 16 bytes of shared key
  • Symmetric key: next 32 bytes of shared key

Note: Prime length and encryption padding should be provided as input parameters of the Connect command.