# US 2018/0323969 A1 · Secure session capability using public-key cryptography without access to the private key

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2018/0323969 A1
- Document ID: US20180323969A1
- Status: Published application
- Kind: A1
- Application number: 16/043,972
- Filed: 2018-07-24
- Published: 2018-11-08
- Earliest claimed: 2014-04-08
- Assignees: Cloudflare, Inc.
- Applicants: Cloudflare, Inc.
- Inventors: Sébastien Andreas Henry Pahl; Matthieu Philippe François Tourne; Piotr Sikora; Ray Raymond Bejjani; Dane Orion Knecht; Matthew Browning Prince; John Graham-Cumming; Lee Hahn Holloway; Nicholas Thomas Sullivan; Albertus Strasheim
- Web page: https://patentgrep.com/patent/US20180323969A1

## CPC

- H04L 9/0844: {with user authentication or key authentication, e.g. ElGamal, MTI, MQV-Menezes-Qu-Vanstone protocol or Diffie-Hellman protocols using implicitly-certified keys}
- H04L 9/14: using a plurality of keys or algorithms
- H04L 9/30: Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
- H04L 9/321: {involving a third party or a trusted authority}
- H04L 9/3263: {involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements (network architectures or network communication protocols for supporting authentication of entities using certificates in a packet data network H04L63/0823)}
- H04L 9/3268: {using certificate validation, registration, distribution or revocation, e.g. certificate revocation list [CRL]}
- H04L 63/061: {for key exchange, e.g. in peer-to-peer networks (cryptographic mechanisms or cryptographic arrangements for key agreement H04L9/0838)}
- H04L 63/166: {at the transport layer}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A first server establishes a secure session with a client device where a private key used in the handshake when establishing the secure session is stored in a different, second, server. The first server transmits messages between the client device and the second server where the second server has access to a private key that is not available on the first server. The first server receives from the second server a set of session key(s) used in the secure session for encrypting/decrypting communication between the client device and the first server. The session key(s) are generated using a master secret that is generated using a premaster secret generated using Diffie-Hellman public values selected by the client device and the second server. The first server uses the session key(s) to encrypt/decrypt communication with the client device.

## Claims

### Claim at position 1

1-21. (canceled)

### Claim 22

A method in a first server for establishing and using a secure session with a client device, the method comprising:
transmitting a plurality of messages between the client device and a second server, wherein the second server has access to a private key used in establishing the secure session, and wherein the private key is not available on the first server;
receiving, from the second server, a set of one or more session keys to be used in the secure session for encrypting and decrypting communication between the client device and the first server that were generated at least using a master secret that is generated using a premaster secret that is generated using a first Diffie-Hellman public value selected by the client device and a second Diffie-Hellman public value selected by the second server;
receiving, from the client device over the secure session, an encrypted request for a resource,
decrypting, using the set of session keys, the encrypted request for the resource;
retrieving the requested resource;
generating a response that includes the retrieved resource;
encrypting the generated response using the set of session keys; and
transmitting, to the client device over the secure session, the encrypted response.

### Claim 23 (depends on 22)

The method of claim 22, wherein the first server and the second server are owned or operated by different entities.

### Claim 24 (depends on 22)

The method of claim 22, wherein the set of session keys are received from the second server over a secure session between the first server and the second server.

### Claim 25 (depends on 22)

The method of claim 22, wherein retrieving the requested resource includes transmitting the request for the resource to a third server and receiving the resource from the third server in response to the request, and wherein the second server and the third server are the same server.

### Claim 26 (depends on 22)

The method of claim 22, wherein retrieving the requested resource includes retrieving the requested resource locally on the first server.

### Claim 27 (depends on 22)

The method of claim 22, further comprising:
wherein the plurality of messages transmitted between the client device and the second server includes a Client Hello message received from the client device, a Server Hello message received from the second server, a Certificate message received from the second server, a Server Key Exchange message received from the second server, a Server Hello Done message received from the second server, a Client Key Exchange message received from the client device, a first and second Change Cipher Spec message, and a first and second Finished message;
receiving, from the second server, the master secret;
verifying information in the first Finished message including,
calculating a first value using a function that takes as input at least the master secret and a hash of the Client Hello message, Server Hello message, Certificate message, Server Key Exchange message, Server Hello Done message, Client Key Exchange message, and first Change Cipher Spec message, and
comparing the calculated first value with a second value included in the first Finished message, wherein a same first value and second value indicates a successful key exchange;
calculating a third value using a function that takes as input at least the master secret and a hash of the Client Hello message, Server Hello message, Certificate message, Server Key Exchange message, Server Hello Done message, Client Key Exchange message, first Change Cipher Spec message, first Finished message, and second Change Cipher Spec message; and
including the third value in the second Finished message.

### Claim 28

A non-transitory computer-readable medium storing instructions, which when executed by a set of one or more processors of a first server, cause the set of processors to perform operations comprising:
transmitting a plurality of messages between the client device and a second server, wherein the second server has access to a private key used in establishing a secure session between the client device and the first server, and wherein the private key is not available on the first server;
receiving, from the second server, a set of one or more session keys to be used in the secure session for encrypting and decrypting communication between the client device and the first server that were generated at least using a master secret that is generated using a premaster secret that is generated using a first Diffie-Hellman public value selected by the client device and a second Diffie-Hellman public value selected by the second server;
receiving, from the client device over the secure session, an encrypted request for a resource,
decrypting, using the set of session keys, the encrypted request for the resource;
retrieving the requested resource;
generating a response that includes the retrieved resource;
encrypting the generated response using the set of session keys; and
transmitting, to the client device over the secure session, the encrypted response.

### Claim 29 (depends on 28)

The non-transitory computer-readable medium of claim 28, wherein the first server and the second server are owned or operated by different entities.

### Claim 30 (depends on 28)

The non-transitory computer-readable medium of claim 28, wherein the set of session keys are received from the second server over a secure session between the first server and the second server.

### Claim 31 (depends on 28)

The non-transitory computer-readable medium of claim 28, wherein retrieving the requested resource includes transmitting the request for the resource to a third server and receiving the resource from the third server in response to the request, and wherein the second server and the third server are the same server.

### Claim 32 (depends on 28)

The non-transitory computer-readable medium of claim 28, wherein retrieving the requested resource includes retrieving the requested resource locally on the first server.

### Claim 33 (depends on 28)

The non-transitory computer-readable medium of claim 28, further storing instructions that, when executed by the set of processors, cause the set of processors to perform the following operations:
wherein the plurality of messages transmitted between the client device and the second server includes a Client Hello message received from the client device, a Server Hello message received from the second server, a Certificate message received from the second server, a Server Key Exchange message received from the second server, a Server Hello Done message received from the second server, a Client Key Exchange message received from the client device, a first and second Change Cipher Spec message, and a first and second Finished message;
receiving, from the second server, the master secret;
verifying information in the first Finished message including,
calculating a first value using a function that takes as input at least the master secret and a hash of the Client Hello message, Server Hello message, Certificate message, Server Key Exchange message, Server Hello Done message, Client Key Exchange message, and first Change Cipher Spec message, and
comparing the calculated first value with a second value included in the first Finished message, wherein a same first value and second value indicates a successful key exchange;
calculating a third value using a function that takes as input at least the master secret and a hash of the Client Hello message, Server Hello message, Certificate message, Server Key Exchange message, Server Hello Done message, Client Key Exchange message, first Change Cipher Spec message, first Finished message, and second Change Cipher Spec message; and
including the third value in the second Finished message.

### Claim 34

An apparatus comprising:
a first server including a set of one or more processors and a set of one or more non-transitory computer-readable storage mediums storing instructions, that when executed by the set of processors, cause the set of processors to perform the following operations:
transmit a plurality of messages between the client device and a second server, wherein the second server has access to a private key used in establishing a secure session between the client device and the first server, and wherein the private key is not available on the first server;
receive, from the second server, a set of one or more session keys to be used in the secure session for encrypting and decrypting communication between the client device and the first server that were generated at least using a master secret that is generated using a premaster secret that is generated using a first Diffie-Hellman public value selected by the client device and a second Diffie-Hellman public value selected by the second server;
receive, from the client device over the secure session, an encrypted request for a resource,
decrypt, using the set of session keys, the encrypted request for the resource;
retrieve the requested resource;
generate a response that includes the retrieved resource;
encrypt the generated response using the set of session keys; and
transmit, to the client device over the secure session, the encrypted response.

### Claim 35 (depends on 34)

The apparatus of claim 34, wherein the first server and the second server are owned or operated by different entities.

### Claim 36 (depends on 34)

The apparatus of claim 34, wherein the set of session keys are to be received from the second server over a secure session between the first server and the second server.

### Claim 37 (depends on 34)

The apparatus of claim 34, wherein retrieval of the requested resource includes transmission of the request for the resource to a third server and receipt of the resource from the third server in response to the request, wherein the second server and the third server are the same server.

### Claim 38 (depends on 34)

The apparatus of claim 34, wherein retrieval of the requested resource includes local retrieval of the requested resource on the first server.

### Claim 39 (depends on 34)

The apparatus of claim 34, wherein the set of non-transitory computer-readable storage mediums further stores instructions, that when executed by the set of processors, cause the set of processors to perform the following operations:
wherein the plurality of messages to be transmitted between the client device and the second server includes a Client Hello message received from the client device, a Server Hello message received from the second server, a Certificate message received from the second server, a Server Key Exchange message received from the second server, a Server Hello Done message received from the second server, a Client Key Exchange message received from the client device, a first and second Change Cipher Spec message, and a first and second Finished message;
receive, from the second server, the master secret;
verify information in the first Finished message including,
calculate a first value using a function that takes as input at least the master secret and a hash of the Client Hello message, Server Hello message, Certificate message, Server Key Exchange message, Server Hello Done message, Client Key Exchange message, and first Change Cipher Spec message, and
compare the calculated first value with a second value included in the first Finished message, wherein a same first value and second value indicates a successful key exchange;
calculate a third value using a function that takes as input at least the master secret and a hash of the Client Hello message, Server Hello message, Certificate message, Server Key Exchange message, Server Hello Done message, Client Key Exchange message, first Change Cipher Spec message, first Finished message, and second Change Cipher Spec message; and
include the third value in the second Finished message.
