Detta är ett exempel på hur krypteringen hanteras av Eloquence,
The eloqsd challenge-response transaction
that transfers the encrypted password.
I established a connection with user name "roland" and password
"secret". This is the result:
1) Client sends "hello" to the eloqsd:
(12077) tcp_recv
buffer contains 37 bytes of data
000: 45 51 2e 45 4c 4f 51 44 00 05 04 d2 00 0b 57 49 |EQ.ELOQD......WI|
010: 4e 33 32 2f 49 78 38 36 00 00 0a 49 53 4f 38 38 |N32/Ix86...ISO88|
020: 35 39 2f 31 00 |59/1. |
This "hello" data includes the following information:
(12077) P2: startup: protocol_rev = 5
(12077) P2: startup: byte_order = LITTLE_ENDIAN (1234)
(12077) P2: startup: platform = 'WIN32/Ix86'
(12077) P2: startup: charset = 'ISO8859/1'
(12077) P3: Buffer::SetRemoteCharset(ISO8859/1) = 1
2) eloqsd replies with "challenge code" which is a 32 bytes
random hex string:
(12077) tcp_send
buffer contains 41 bytes of data
000: 00 00 00 25 00 00 00 21 34 33 31 63 61 34 66 63 |...%...!431ca4fc|
010: 63 35 63 31 31 35 32 30 64 38 62 38 38 30 33 38 |c5c11520d8b88038|
020: 33 38 39 62 64 32 34 61 00 |389bd24a. |
- first 4 bytes: 00 00 00 25 (size of reply message)
- next 4 bytes: 00 00 00 21 (length of challenge code plus null byte)
- challenge code: "431ca4fcc5c11520d8b88038389bd24a"
The challenge code is different every time.
3) Client uses challenge code to encrypt the password.
As the challenge code is random, this encryption is different
every time. The password is MD5 encrypted. Both the client and
the server do the same encryption, the eloqsd then verifies that
the result is the same. Important: The original password cannot
be reverse-calculated from the MD5 encrypted password.
buffer contains 30 bytes of data
000: 00 0a 00 07 72 6f 6c 61 6e 64 00 00 11 34 39 35 |....roland...495|
010: 33 30 61 30 30 37 64 63 61 34 64 64 62 00 |30a007dca4ddb. |
- first 2 bytes: 00 0a (eloqsd function code: "log on")
- next 2 bytes: 00 07 (length of user name plus null byte)
- user name: "roland"
- next 2 bytes: 00 11 (length of encrypted password plus null byte)
- encrypted password: "49530a007dca4ddb"
The length of the encrypted password is always a multiple of 16,
depending on the password length.
|