User's Manual

Table Of Contents
Secure Socket Protocol
AT+i Programmer‘s Manual Version 8.32 21-1
21 Secure Socket Protocol
iChip supports the SSL3/TLS1 secure socket protocol, based on RFC2246. iChip
supports the following Cipher suites:
SSL_RSA_WITH_RC4_128_MD5
SSL_RSA_WITH_RC4_128_SHA
SSL_RSA_WITH_3DES_EDE_CBC_SHA
TLS_RSA_WITH_AES_128_CBC_SHA
TLS_RSA_WITH_AES_256_CBC_SHA
21.1 Establishing An SSL3/TLS1 Socket Connection
iChip supports a single SSL3/TLS1 TCP/IP active socket connection. Opening a secure
socket on iChip involves two steps:
1. Open a standard TCP/IP socket to a secure server.
2. Initiate an SSL3/TLS1 handshake over the open socket to establish a secure session.
SSL3/TLS1 handshake negotiations are initiated using the AT+iSSL command.
iChip negotiates the secure connection based on several security-related parameters. It
authenticates the remote secure server by verifying that the server‘s certificate is signed
by a trusted Certificate Authority (CA). The trusted CA‘s certificate is stored in iChip‘s
CA parameter. Following a successful SSL3/TLS1 handshake, iChip encrypts all data
sent across the socket according to the cipher suite and keys agreed upon during the
handshake. Data received on the socket is decrypted by iChip prior to making it available
to the host processor.
21.2 Sending and Receiving Data over An SSL3/TLS1 Socket
The AT+iSSND command is used to send data over an SSL3/TLS1 socket, using the
same syntax as for non-secure sockets:
AT+iSSND[%]:<hn>,<size>:<data>
However, the size parameter is interpreted as the size of the data packet to encrypt. It is
limited to 2K. Receiving data on an SSL3/TLS1 socket is carried out using the
AT+iSRCV command. iChip automatically decrypts data that arrives on the secure
socket. The data transferred to the host is always decrypted data.
21.3 SSL3/TLS1 Handshake and Session Example
Take for example an SSL3/TLS1 server at secure.sslserver.com running a secure
application on port 1503. Using iChip, the following sequence opens a secure
SSL3/TLS1 socket to that application and exchanges data securely. For clarity,
commands sent to iChip appear in bold and iChip replies appear in italics.