abstract final Feature
abstract final FeatureModel
TLSFeatures : FeatureModel
annonymousMode : Feature ?
clientAuthentication : Feature ?
// the server requests a client certificate only from a known server (no anonymous mode)
[ clientAuthentication => no annonymousMode ]
abstract final Domain
enum ProtocolVersion = SSL2_0 | SSL3_0 | TLS1_0 | TLS1_1 | TLS1_2
enum HandshakeStatus = initiated | completed | failed
abstract Port
abstract final Message
serverHelloRequestMessage : Message
serverHelloMessage : Message
serverCertificateMessage : Message
serverKeyExchangeMessage : Message
serverCertificateRequestMessage : Message
serverHelloDoneMessage : Message
serverChangeCipherSpecMessage : Message
serverFinishedMessage : Message
protocolMismatch : Message
clientHelloMessage : Message
clientCertificateMessage : Message
clientKeyExchangeMessage : Message
certificateVerifyMessage : Message
clientChangeCipherSpecMessage : Message
clientFinishedMessage : Message
applicationDataMessage : Message
abstract final Node : Domain
send : Port -> Message
receive : Port -> Message
protocolversion -> ProtocolVersion +
certificate ?
signing ?
abstract final Server : Node
abstract final Client : Node
[ Server.send = Client.receive ]
[ Server.receive = Client.send ]
OurServer : Server
[ protocolversion = SSL2_0, SSL3_0, TLS1_2 ]
aClient : Client
[ certificate ]
[ protocolversion = TLS1_2 ]
Protocol : Domain
final client -> aClient
final server -> OurServer
handshakeStatus -> HandshakeStatus
xor channel // The phases of the connection. A phase is left only from its last states, and a
xor serverResponse// transition that leaves a phase is a constraint of the channel: as a transition of a state
[ handshakeStatus = initiated ]// nested in the phase, it would lapse when the phase is left, which is when it should take
[ initially serverHello || mismatch ]// effect. The transitions within a phase hold while the phase lasts.
serverHello
[ server.send = serverHelloMessage ]// no version in common: a protocol_version alert
serverCertificate// the server picks a version that both support
[ serverCertificate -[no clientAuthentication]-> serverKeyExchange || serverHelloDone ]// a known server sends its certificate; an anonymous one its key exchange
serverKeyExchange
serverHelloDone
[ serverResponse -[ ! (serverResponse.mismatch || serverResponse.serverHelloDone)]-> serverResponse ]// features: client authentication
xor clientResponse // the client sends its certificate when the server requests it
clientKeyExchange
certificateVerify --> clientChangeCipherSpec
[ client.send = certificateVerifyMessage ]// a client with a certificate that can sign proves that it has the private key
clientChangeCipherSpec --> clientFinished
clientFinished
xor serverFinish
initial serverChangeCipherSpec --> serverFinished
// both Finished messages complete the handshake
fatalError --> fatalError
// the application data flows until a new handshake (renegotiation)
// a fatal alert ends the connection