2. Skip to content

2. Communication Specification

AiMeDB operates as a raw socket service on TCP port 22345.

2.1 Encryption

All communication between AiMeDB and a client is encrypted with AES-ECB-128. The key for encryption is Copyright(C)SEGA1. All communication is padded to a 16-byte boundary using null bytes. This is accounted for in the individual packet specifications with trailing padding regions, however implementations may wish to ensure buffers are explicitly flushed after transmission.

2.2 Packet structure

Every packet, in both directions, is preceded by a 32-byte header, as specified in the common API specification. It is immediately followed by the packet data.

All integer values are to be parsed as unsigned little-endian values unless otherwise specified. All strings require a null termination byte, unless otherwise specified.

There is no handshaking procedure required.

  1. If you had any misgivings about implementing an AiMeDB server, now’s the time to turn around.