Patent Description:
Increasingly there is a desire to work with sensitive code and or sensitive data and to retain security and privacy. Often large amounts of sensitive code and or data are to be processed using resource intensive algorithms and peripheral devices are an option to improve efficiency in such situations. However, where peripheral devices are used additional challenges are introduced regarding security and privacy of sensitive code and/or data since there is both a host and a peripheral device and often the host itself is untrusted. The sensitive code and sensitive data reaches the peripheral device via the host and so an attacker is potentially able to obtain the sensitive information from the untrusted host.

<CIT> discloses a cryptographic arrangement for secret or secure communication including means for verifying the identity or authority of a user of the system or for message authentication, by authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates (e.g. public key certificate, PKC, or attribute certificate, AC, or public key infrastructure, PKI, arrangements).

<CIT> discloses a technique for securely sealing and unsealing enclave data across platforms. Enclave data from a source enclave hosted on a first computer is securely sealed to a sealing enclave on a second computer, and is further securely unsealed for a destination enclave on a third computer. An enclave workload can also be securely transferred from one computer to another.

The embodiments described below are not limited to implementations which solve any or all of the disadvantages of known peripheral devices.

According to the present disclosure, there is provided a peripheral device for use with a host computing device, the peripheral device comprising one or more compute elements a security module and at least one encryption unit. The security module is configured to form a trusted execution environment on the peripheral device for processing sensitive data using sensitive code. The sensitive data and sensitive code are provided by a trusted computing entity which is in communication with the host computing device. At least one encryption unit is configured to encrypt and decrypt data transferred between the trusted execution environment and the trusted computing entity via the host computing device. The security module is configured to compute and send an attestation to the trusted computing entity to attest that the sensitive code is in the trusted execution environment.

The security module is configured to form the trusted execution environment by switching the peripheral device from a non-secure mode in which access to memory and registers of the peripheral via a linear address space is possible, into a secure mode in which access to specified memory and specified registers of the peripheral via the linear address space is disabled.

The detailed description provided below in connection with the appended drawings is intended as a description of the present examples and is not intended to represent the only forms in which the present examples are constructed or utilized. The description sets forth the functions of the example and the sequence of operations for constructing and operating the example. However, the same or equivalent functions and sequences may be accomplished by different examples.

As described herein, a peripheral device is used together with a host computing device. The host computing device is not trusted and is potentially malicious. A tenant is any computing device in communication with the host computing device and which has access to code that the tenant wants to execute on the peripheral. In some examples the tenant has sensitive code to be executed on the peripheral device in order to process sensitive data. In some examples, one or more other tenants are also using the peripheral device, but this is not essential. In an example the sensitive code implements training or inference for a neural network or other machine learning algorithms and the sensitive data is training data. The machine learning model is trained on the peripheral device and the resulting trained model parameters are returned to the tenant from the peripheral after training. The model may also stay in the peripheral device to be used for inference after training. However, the technology is not limited to machine learning applications and any sensitive code and sensitive data is used. In some examples, one or both of the code and data are not sensitive.

In order for the sensitive code to be executed on the peripheral device it is to be transferred to the peripheral via the host since input to the peripheral device is via the host. Once at a peripheral device, the sensitive code may be transferred to other peripheral devices of the same host. However, transferring sensitive code to the peripheral via the host is not straightforward since the host computing device is potentially malicious. The sensitive data is also to be transferred to the peripheral and again, this is problematic where the host computing device is potentially malicious. The tenant does not trust the host computing device and so, even when the sensitive code has been transferred to the peripheral, the tenant is not sure that the sensitive code is still confidential or whether the host has tampered with the sensitive code or replaced it with other code. The sensitive data passes through the host and is potentially compromised by the untrusted host.

In some cases an attacker has privileged access to the host computing device, for example, where the attacker is an administrator of the host operating system, or has administrator privileges for applications or services in the host operating system. In some cases, an attacker is a hacker which exploits a vulnerability in an operating system of the host computing device, a hypervisor on the host computing device or another privileged execution mode of the host computing devices). In some cases, the attacker has physical access to the host computing device and the peripheral device and optionally, is able to probe and tamper with connections between components in the peripheral. The attacker may be a board-level adversary taking the peripheral out of thermal, power, or clock limits to induce bit flips.

In various examples, the tenant is a computing device referred to as a client, which is in communication with the host computing device over any suitable communications network. The peripheral device is in the host computing device or connected to the host computing device. By careful design of the peripheral device as described herein, it is possible to create a trusted execution environment (TEE) on the peripheral device for executing the sensitive code and processing the sensitive data. In some examples the TEE is designed to be secure against the untrusted host and attacker which potentially has physical access to the peripheral as mentioned above.

Design of the peripheral device is described at least with reference to <FIG> and <FIG> below and creation of the TEE is described at least with reference to <FIG>. In some examples, the peripheral is configured to attest to the tenant that the sensitive code is installed on the peripheral as expected by the tenant. An example attestation process of the peripheral device is described at least with reference to <FIG>.

There is a key exchange process such as described with reference to <FIG>. The key exchange process is useful for secure communication between the tenant and the peripheral. In some cases the key exchange process is used to enable sensitive data from more than one party to be processed at the peripheral and kept confidential between the parties. A party is a tenant in some examples. However, in some cases a party does not have access to code to be executed on the peripheral. Where the peripheral is one which supports resource isolation, the key exchange process is useful to enable more than one tenant to use the same peripheral for executing different sensitive code and sensitive data, whilst retaining confidentiality between the tenants. In some examples, a plurality of tenants and/or parties agree on the same code and then they send different data sets to the peripheral.

In some examples there is an encryption protocol which enables efficient, secure transfer of sensitive data between two trusted entities via an untrusted intermediary. An example of the encryption protocol is described with reference to <FIG> and it is applicable for the case where one of the trusted entities is the tenant, the other trusted entity is the peripheral and the untrusted intermediary is the host. However, note that the encryption protocol is broadly applicable beyond the tenant and hosted peripheral situation. The encryption protocol is workable for secure transfer of sensitive data between any first trusted entity and any second trusted entity, via any untrusted intermediary. The first and second trusted entities are nodes in a telecommunications network in some cases and the untrusted intermediary is a router, switch or proxy in the telecommunications network. The first and second trusted entities are a home personal computer and an internet service provider server in some examples and the untrusted intermediary is a home wireless access point. In some examples the untrusted intermediary is a wireless hotspot device and the trusted first entity is a smart phone and the trusted second entity is a web server.

A security module at the second trusted entity operates in an unconventional manner to achieve dynamic creation of a trusted execution environment at the second trusted entity. The security module operates in an unconventional manner to achieve secure and efficient communication between its trusted execution environment and a trusted first entity via an untrusted intermediary.

The security module at the second trusted entity improves the functioning of the underlying peripheral device by creating a trusted execution environment at the peripheral device.

<FIG> shows three high level entities: a first trusted computing entity <NUM>, an untrusted intermediary <NUM> and a second trusted computing entity <NUM>. In most of the examples described herein the first trusted computing entity <NUM> is a tenant and the second trusted computing entity <NUM> is a peripheral of the untrusted intermediary <NUM>. However, as mentioned above, the encryption protocol described with reference to <FIG> is applicable more broadly to the three high level entities shown in <FIG>. The first trusted computing entity is any computing device, or trusted execution environment, which is able to store sensitive code <NUM>, store sensitive data <NUM>, encrypt <NUM> sensitive code and/or sensitive data, and to communicate with the untrusted intermediary <NUM>. In some examples the first trusted computing entity is a trusted execution environment on the untrusted intermediary <NUM>. The encryptor <NUM> of the first trusted entity does both encryption and decryption of sensitive information.

The untrusted intermediary <NUM> is any computing device with a memory <NUM> and which is able to receive encrypted data from the first trusted computing entity <NUM> and which is in communication with a second trusted computing entity via a communications network or link. The memory <NUM> (which is any type of memory <NUM>) stores at least encrypted blocks of code and/or data from the first trusted computing entity.

The second trusted computing entity <NUM> is any computing device which is able to isolate itself in a way so as to create a trusted execution environment for processing sensitive data using sensitive code. The second trusted computing entity <NUM> has one or more compute elements <NUM> for processing sensitive data using sensitive code. The compute elements <NUM> are processors, parallel compute units or other compute elements. The second trusted computing entity <NUM> has a memory <NUM> which is shared by the compute elements <NUM> and it has one or more encryption units <NUM>. Each encryption unit <NUM> is able to encrypt and to decrypt information. A security module <NUM> of the second trusted computing entity <NUM> controls processes to create the trusted execution environment and to provide an attestation to the first computing entity, attesting to one or more states at the second trusted computing entity <NUM>. A non-exhaustive list of states to be attested to at the second trusted computing entity <NUM> is: that the hardware of the second trusted computing entity <NUM> is in a certain known state such as with cleared memory, that a specific firmware is installed in the second trusted computing entity <NUM>, that specific sensitive code is installed in the second trusted computing entity <NUM>.

The encryption unit(s) <NUM> at the second trusted computing entity and the encryptor <NUM> at the first trusted computing entity are both configured to use an encryption protocol for encrypting blocks of sensitive code and/or data for transfer via the untrusted host. Any encryption protocol is usable which protects the sensitive information from the host by encrypting blocks of sensitive information using keys and initialization vectors. An individual block is encrypted using a pair comprising an initialization vector and a key.

In some examples, the encryption protocol is one which is particularly efficient at securely managing initialization vectors of the encryption protocol. The encryption protocol involves the first and second trusted computing entities pre-agreeing <NUM> on a parameterized function for obtaining the initialization vectors in an efficient manner. The parameterized function computes pairwise-distinct initialization vectors for encryption and for decryption of each block of sensitive information. Conversely, using the same initialization vector for different blocks of sensitive information may compromise their integrity and confidentiality. Using different initialization vectors for the same block of sensitive information leads to decryption errors as explained in more detail later in this document.

Although the example in <FIG> shows a single untrusted intermediary <NUM> and a single second trusted computing entity <NUM> it is also possible to have multiple such entities. In some examples, each untrusted intermediary <NUM> has multiple second trusted computing entities <NUM> connected to it and the second trusted computing entities <NUM> are able to communicate with one another. In some examples, there are multiple untrusted intermediaries <NUM> which are optionally able to communicate with one another. The technology thus scales up to rackscale scenarios where there are racks of untrusted intermediaries <NUM>, each of which is responsible for a plurality of second trusted computing entities <NUM>, which are able to communicate with one another.

<FIG> is a schematic diagram of a compute node <NUM> comprising an untrusted host <NUM> and a trusted peripheral device <NUM> connected to the untrusted host <NUM>. A plurality of such compute nodes <NUM> are deployed in a data center <NUM> as illustrated in <FIG> where the compute nodes <NUM> are interconnected using a communications network within the data center <NUM> which is not shown in <FIG> for clarity. A first tenant <NUM> comprising a computing device has a secure store <NUM> of sensitive data and/or code. The first tenant <NUM> is in communication with the data center <NUM>. The first tenant <NUM> is able to securely copy the sensitive code to a trusted execution environment on one or more of the trusted peripheral devices of the compute nodes <NUM> in the data center <NUM> and to receive an attestation from the peripheral devices that the sensitive code has been installed and the device is in a known state. The first tenant <NUM> is able to copy the sensitive data to the trusted peripheral devices so that the sensitive data is processed in the trusted execution environment. In some examples, one or more other sources of secure sensitive data also input to the code executing in the trusted execution environment. In this way, data from more than one party is used for machine learning or other processing in the trusted execution environment.

In some examples there is a second tenant <NUM> comprising a computing device in communication with the data center <NUM>. The second tenant <NUM> has a secure store <NUM> of sensitive code and/or data. The second tenant is able to copy the sensitive code and data to one or more of the same peripheral devices in the data center as the first tenant <NUM>. Using resource isolation mechanisms in the peripheral devices, and using separate encryption keys for the individual tenant code and data, it is possible for the confidentiality of the individual tenants to be maintained.

In some examples the second tenant <NUM> has a secure store <NUM> of sensitive data which is different from the sensitive data of the first tenant <NUM>. Both the first tenant <NUM> and the second tenant <NUM> use the same sensitive code at the same peripheral device and they send their respective different data sets to be processed by the same sensitive code.

<FIG> illustrates the situation for a data center. However, it is also possible to use the trusted and untrusted entities of <FIG> in stand-alone situations or in other types of deployment. In an example the trusted and untrusted entities of <FIG> are used in an edge deployment. Here the first trusted computing entity <NUM>, untrusted intermediary <NUM> and second trusted computing entity <NUM> are deployed at the edge of a communications network rather than in the cloud. The first trusted computing entity <NUM> is physically proximate to a data source such as a capture device or sensor, or has an integral capture device or sensor which produces the sensitive data <NUM>. The first trusted computing entity <NUM> uses the untrusted intermediary <NUM> and second trusted computing entity <NUM> to do machine learning and/or inference near the data stream source such as the capture device or sensor.

<FIG> is a schematic diagram of a second trusted computing entity <NUM> such as that of <FIG>. In some examples the second trusted computing entity is a peripheral device of a host computing device but it is not essential.

The second trusted computing entity <NUM> comprises one or more compute elements <NUM> and an optional memory <NUM>. The memory <NUM> is shared by the compute elements or is private to specific computing elements. The second trusted computing entity <NUM> has at least one encryption unit <NUM> comprising an encryption/decryption component <NUM>, an optional key store <NUM> and an optional buffer <NUM>.

The encryption/decryption component <NUM> is configured to authenticate and decrypt data received from the host and from other peripheral devices via any form of communication. In an example, the communication is made using direct memory access (DMA) requests but it is not essential to use this form of communication. The encryption/decryption component <NUM> is configured to encrypt data sent to the host via DMA transfer (or other form of communication), or sent to other peripheral devices, using authenticated encryption. In some examples, the encryption/decryption component <NUM> is a logic block placed on a die of a package where the peripheral is a device package. In other examples the encryption/decryption component is on package, or implements as a software component on a programmable peripheral. The encryption/decryption component <NUM> is connected to the optional buffer <NUM> and the buffer <NUM> is arranged to intercept and buffer communications to and from the host, such as DMA requests and responses. The buffer <NUM> is connected to the key store <NUM> which holds expanded encryption keys, and also to a peripheral component interconnect express (PCIe) complex. In some but not all examples the second trusted computing entity supports an unsecure mode of operation. In an unsecure mode of operation of the peripheral device the encryption/decryption component is bypassed.

Using the buffer <NUM> gives the benefit that more than one DMA request or response may be in flight at any one time. In some cases the buffer <NUM> is omitted and DMA requests or responses are issued one at a time.

In a particular example, which is not intended to limit the scope of the technology, the encryption/decryption component <NUM> has support for AES or another encryption scheme, supports multiple key contexts, has an interface for specifying an authentication tag to be checked when an encrypted data stream ends and for retrieving an authentication tag when a cleartext data stream ends.

A security module <NUM> in the second trusted computing entity <NUM> has a mode switch <NUM> (used where the second trusted computing entity <NUM> supports an insecure mode), an attestation component <NUM>, an optional key exchanger <NUM>, a secure data transfer component <NUM> and an optional parameter monitor <NUM>. The security module is a logic block integrated with the peripheral device package. In one example the security module is a system on a chip (SoC) with a microcontroller, a static random-access memory (SRAM) for code and data, and a read-only memory (ROM) to hold initial boot block for the microcontroller. However, other implementations of the security module are possible. The security module <NUM> contains logic blocks or software for operations such as symmetric key authenticated encryption and decryption, secure hash computation, public key generation, signing and authentication, and an entropy source. The security module <NUM> is connected to other components of the peripheral using any suitable connectors.

The security module <NUM> is configured to initialize the peripheral into a clean state and orchestrate encryption and decryption of data transfers between the host and the peripheral device and between peripheral devices. The security module <NUM> contains a root endorsement key which is either burnt into fuses of the security module <NUM> or generated using hardware of the security module <NUM>. The root endorsement key serves as a root of trust suitable for generating attestation keys for validation using a trusted certification authority.

The mode switch <NUM> is arranged to switch the peripheral device between a non-secure mode in which sensitive memory and sensitive registers of the peripheral device are accessible by entities external to the peripheral device, and a secure mode in which the sensitive memory and sensitive registers of the peripheral device are not accessible by entities external to the peripheral. During the secure mode, the security module configures the peripheral to enforce a device -specific access control list preventing the untrusted intermediary from accessing unsafe functionality. During the secure mode, DMA and peripheral device to peripheral device communication is routed through the encryption unit(s) <NUM>.

In some examples there are one or more registers where access is to be authenticated, such as a register which contains an address of sensitive code to be launched on the peripheral. Accesses to these registers is routed to the security module which authorizes access and invokes peripheral functionality through a different interface. The registers where access is to be authenticated are exposed by the peripheral and served by the security module.

The optional key exchanger <NUM> is arranged to configure the encryption units <NUM> with keys.

The security module <NUM> has an attestation component <NUM> for measurement of application code running on the compute unit(s), generation of quotes for remote attestation, and key exchange. A quote is data which acts as a certificate issued by the peripheral device for remote attestation whereby the tenant is able to verify one or more security critical properties of the peripheral device. A quote captures security critical properties of the peripheral. In a non-limiting example, the quote is computed as a hash.

The security module <NUM> has a secure data transfer component <NUM> which generates DMA requests to transfer data from the host into security module memory, such as SRAM or other memory, either directly or indirectly.

The optional parameter monitor <NUM> is arranged to monitor thermal, power and clock parameters of the security module <NUM>. The parameter monitor <NUM> is arranged to issue a reset if one or more of the parameters goes out of a safe range and to hold a reset line until the security module <NUM> receives notification that the peripheral device has been completely reset. The reset state is held in memory on the security module <NUM> and logic for sending the reset is implemented using either software or using a hardware state machine. The security module <NUM> uses a dynamic random-access memory (DRAM) word with parity bits and on-die temperature sensors to check if the peripheral device is being operated out of specified power and temperature ratings.

The identity of a second trusted computing entity <NUM> is based on an endorsement key, which, where the second trusted computing entity <NUM> is a device package comprising a chip, is created or provisioned on the chip during manufacturing. The private endorsement key never leaves the chip, and the public key is used for attestation and is referred to as an attestation key. There are different ways of provisioning an endorsement key that vary in complexity and security and two of these ways are now described.

In a first method, a manufacturer of the trusted second entity has a facility for securely generating endorsement key pairs, burning the private endorsement key into fuses in each device, and provisioning certificates for the public keys to a trusted certification authority. A drawback of this approach is that the manufacturer has access to the private endorsement keys. Another drawback is that it introduces complexity and cost for the manufacturer.

In a second method, the endorsement key is generated on the second trusted computing device using a combination of physical unclonable functions (PUFs) and fuzzy extractors. PUFs are based on physical variations which occur naturally during semiconductor manufacturing, and which make it possible to differentiate between otherwise identical semiconductors. With a fuzzy extractor, a PUF will generate the same key every time it is evaluated with a given input. Typically, the PUF will be used during a secure boot process by trusted firmware to first generate the secret key, and then generate and output the corresponding public key. The manufacturer of the trusted second computing device is able to trigger this process for each device and issue certificates for the public keys without having access or having to maintain private keys. Another advantage is that this mechanism enables physical attestation i.e. anyone with physical access to the device (e.g. an auditor) can obtain public keys and issue certificates.

Once the certification authority has received endorsement key certificates, it issues certificates. A relying party uses the certificates to ascertain the integrity of messages from a trusted second computing device. The certification authority also maintains a revocation list that contains devices that have been misplaced, decommissioned or may have been compromised. The certification authority stops issuing certificates for such devices.

An enclave attestation service is available for use by any of the entities in <FIG>. The enclave attestation service accepts quotes from an enclave, such as a trusted execution environment on the second trusted computing device. The enclave attestation service generates signed tokens that can be forwarded to other services to release secrets. Policies govern the release of secrets. Policies use criteria such as attributes in a quote (such as measurements of the state of the second trusted computing device). The attestation service checks the policies against the quotes. The attestation service supports multiple trust models, such as to trust all quotes from a specified manufacturer, or trust quotes if the service has a valid public endorsement key. The tokens generated by the attestation service are able to carry information about the geographic location of the device in some cases. In some cases PCK certificates are packaged with quotes and forwarded to the attestation service.

There are various different options for where to place the security module <NUM> in the peripheral device package. In a first option, described with reference to <FIG>, the security module <NUM> is located on the same die <NUM> as the compute elements <NUM> and encryption unit(s) <NUM>. The encryption units are not shown in <FIG> for clarity and are located with the compute elements <NUM>. The first option has strong security since if an attacker accesses or tampers with secrets within the security module he or she will impair functioning of the whole package. The first option gives good performance due to the security module being on-die.

A second option is shown in <FIG> and comprises integrating the security module <NUM> in the same multi-chip module as the peripheral package <NUM>. Here the compute elements <NUM> and encryption units <NUM> (not shown in <FIG>) are on die <NUM> supported on substrate <NUM>. The security module <NUM> is on the same substrate <NUM> as the compute elements <NUM> but not the same die <NUM> as the compute elements <NUM>. The second option has slightly weaker security than option one if an attacker has physical access to the peripheral device package <NUM>. However, the second option gives the benefit of decoupling the security module <NUM> from the other components of the peripheral device and the decoupling facilitates development, design and testing.

A third option is shown in <FIG> and comprises placing the security module <NUM> off package on a separate chip. In the third option there is a first package <NUM> comprising the compute elements <NUM> and the encryption units <NUM> (not shown in <FIG> for clarity). There is also a second package <NUM> comprising the security module <NUM>. The first and second packages are connected to one another. The third option decouples the security module from the rest of the peripheral device package and so it facilitates fabrication.

Initialization of the second trusted computing device is now described. The security module goes through a boot sequence when the second trusted computing device boots or resets.

During the boot sequence, the security module loads firmware from ROM, checks that the firmware is signed correctly and measures the firmware. The measurements are stored securely within the security module.

The security module firmware is split into two components, (a) a component responsible for critical tasks such as checking signatures, measurement and attestation key generation, and (b) a component responsible for other tasks such as quote generating, and encryption/decryption of direct memory access traffic. The first component is security critical, is as small as possible and rarely changes. The second component does not have write access to secrets such as firmware measurements and private endorsement and attestation keys.

After boot, the security module is requested to generate a fresh attestation key (AK). The corresponding private key AKpriv is stored securely in non-volatile memory in the security module. Alternatively, the attestation key is derived from a PUF using the firmware trusted computing base as the initialization vector. This avoids the need for storing the attestation key. However, this restricts the frequency with which the attestation key can being refreshed to refresh on firmware updates.

An example of a method performed by a security module, such as the security module <NUM> of <FIG> and <FIG>, is now given with reference to <FIG>. The peripheral device is in a non-secure mode <NUM> in which the host device is able to access or tamper with sensitive code and/or sensitive data on the peripheral device. The security module <NUM> checks <NUM> whether to switch into a secure mode. If not it remains in the non-secure mode. If the security module <NUM> receives a command from a tenant to create a TEE it switches into a secure mode.

To switch into the secure mode the security module <NUM> disables <NUM> external access to sensitive memory and registers in the peripheral, and places the hardware elements of the peripheral in a known state. In an example the security module <NUM> disables read/write access to SRAM in the security module <NUM> over memory-mapped input/output (MMIO). The security module <NUM> instructs the peripheral to disable access to any security sensitive memory and control registers over MMIO. Access to registers or memory in the security module <NUM> for correct functioning of the peripheral device is retained in the secure mode where those registers or memory do not hold security sensitive information. Access to those registers or memory is routed to the security module which checks if the accesses are authorized by the tenant. After disabling access over MMIO the security module <NUM> puts the memory of the peripheral device into a known state, such as by resetting the peripheral device and resetting the memory of the peripheral device by writing zeros.

Once in the secure mode, the security module <NUM> receives <NUM> sensitive code from the tenant as described in more detail with reference to <FIG>. The host is able to request a quote from the security module and provide the quote to the tenant. The quote acts as a certificate issued by the peripheral device for remote attestation in order for the tenant to verify that the sensitive code is installed correctly at the peripheral device.

The security module computes <NUM> and sends a proof to the tenant. The quote captures security critical properties of the peripheral. In a non-limiting example, the quote is computed as a hash of the security module, debugging mode, and an attribute called the host access flag, signed with the attestation key. The host access flag indicates whether the host has read/write access to tile memory over MMIO. In some examples the quote contains external data such as a hash of a fresh data encryption key generated by the security module and encrypted using the tenant's public key. In another example, the quote contains the hash of a public key that the tenant is able to use to encrypt/wrap a tenant-defined symmetric key and provision to the peripheral device.

Quotes are signed using an attestation key of the peripheral device generated from the peripheral device root of trust. Quotes form the following PKI-like certificate chain:.

Quotes are verifiable by any entity, such as an attestation service, in possession of the following artifacts:.

The current trusted computing base measurements enable checking if a peripheral device issuing quotes is running the latest version of firmware, and the revocation list is used to check if quotes from the device are invalid due to the device being faulty, decommissioned, compromised or for other reasons.

The security module optionally carries out a key exchange process <NUM> for embodiments where sensitive data from more than one party is to be processed by the same sensitive code on the peripheral device, or for embodiments where there are multiple tenants using the same peripheral device and with those tenant's code and data being isolated using resource isolation on the peripheral device. The key exchange process is explained in more detail later with reference to <FIG>.

The security module carries out secure data download <NUM>, execution and output by downloading sensitive data from the tenant, processing the sensitive data on the peripheral device using the sensitive code, and outputting the results to the tenant via the host. In some examples the secure data download involves the tenant encrypting blocks of data and sending the encrypted blocks to the peripheral via the host. In some examples the secure data download involves the tenant encrypting blocks of data, copying the encrypted blocks to the host, and then the peripheral retrieving the encrypted blocks from the host. Any suitable encryption protocol is used. In an example, a particularly efficient encryption protocol is used which is described below with reference to <FIG>. To output the results to the tenant via the host, the encryption units <NUM> encrypt blocks of output data and send that to the tenant via the host. In some examples, the encryption protocol of <FIG> (which is symmetric) is used both for downloading data to the peripheral device and for sending output results back to the tenant.

The security module checks <NUM> whether the trusted execution environment is to be terminated. If so the security module scrubs <NUM> the peripheral device and returns to the non-secure mode <NUM>. When the TEE is explicitly terminated, or the peripheral device receives a reset signal from the host, the security module deletes all sensitive data and returns the peripheral device to a clean state. This includes resetting memory at the peripheral device, deleting any keys, unblocking MMIO accesses and switching to a non-secure mode. If the peripheral device goes through a power cycle, it restarts in a clean state irrespective of the mode it was in.

More detail about the remote attestation process of operation <NUM> of <FIG> is now given with reference to <FIG>. The remote attestation process has the benefit of using simple hardware as compared with embodiments where the untrusted host copies the sensitive code into peripheral device memory and support is added in the peripheral device memory to measure the contents of the memory when a TEE is created.

<FIG> is a message sequence chart showing messages (represented by horizontal arrows) passed between the first trusted entity <NUM> represented by a vertical line on the left hand side of the figure, an untrusted intermediary <NUM> represented by a vertical line in the center of the figure, and a second trusted entity <NUM> represented by a vertical line on the right hand side of the figure. The relative vertical position of the arrows in the figure represents chronological order of the messages.

The first trusted entity <NUM> (such as the tenant) generates <NUM> a program encryption key (PEK) for encrypting application code. The tenant has sensitive code to be copied to the peripheral device. The tenant computes an authentication tag <NUM> over the binary of the sensitive code and it encrypts <NUM> the sensitive code using the PEK. In some cases the authentication tag is a message authentication code (MAC).

The first trusted entity <NUM> (such as the tenant) sends a request <NUM> to the untrusted intermediary <NUM> to request creation of a TEE at the second trusted entity <NUM> (such as the peripheral device). The request <NUM> includes the authentication tag computed over the sensitive code at operation <NUM>. The host forwards the request to create a TEE to the second trusted entity <NUM> and the second trusted entity (such as the peripheral device) creates the TEE <NUM> as described above with reference to <FIG> operation <NUM>. After TEE creation, a security module of the second trusted entity <NUM> resets the encryption unit(s) of the peripheral device and switches the security module into a mode where it computes a running authentication tag over all blocks of memory at the peripheral device.

The second trusted entity <NUM> generates a quote to show that the TEE has been formed and it includes the authentication tag in the quote. The quote including the authentication tag is sent <NUM> from the second trusted entity <NUM> to the first trusted entity <NUM> (tenant for example). The first trusted entity <NUM> verifies <NUM> the quote and checks that the authentication tag included in the quote matches the authentication tag computed at operation <NUM>. If verification succeeds, the first trusted entity <NUM> provisions <NUM> the PEK to the second trusted entity <NUM>. In an example, the PEK is provisioned <NUM> to the security module of the second trusted entity by encrypting a symmetric key with the public key included in the quote.

The first trusted entity <NUM> copies <NUM> the encrypted code to the untrusted intermediary <NUM> (such as the host) and the untrusted intermediary <NUM> loads <NUM> the encrypted binary at specified virtual addresses of its physical memory.

The second trusted entity <NUM> issues a DMA request <NUM> to the untrusted intermediary <NUM> to copy code from the memory of the untrusted intermediary <NUM> to memory at the second trusted entity <NUM>. Responses comprising encrypted blocks <NUM> are received from the untrusted intermediary <NUM>. The response <NUM> passes through the encryption unit(s) at the second trusted entity <NUM>, which decrypts <NUM> each block of code and computes <NUM> an authentication tag over the entire code sequence.

Once DMA requests <NUM> are complete (to transfer the complete sensitive code) a security module of the second trusted entity <NUM> checks <NUM> that the authentication tag of the transferred sensitive code matches the authentication tag specified on TEE creation. If there is a match, the security module of the second trusted entity switches the encryption unit(s) of the second trusted entity <NUM> into a default mode <NUM> in which the encryption protocol of <FIG> is followed to transfer data between the first trusted entity <NUM> and the second trusted entity <NUM>. If there is no match the second trusted entity terminates <NUM> the TEE.

In some examples there is a key exchange process as explained with reference to <FIG>. A plurality of keys are used when different data streams are encrypted using different keys. For example, input data streams, output data streams and checkpoints may be encrypted using different keys. Checkpoints are intermediate results computed by the sensitive code when it processes the sensitive data, and which are encrypted and stored on the untrusted intermediary. Checkpoints are useful for recovering state and reusing computation. The key exchange process of <FIG> has a benefit of not needing programmability of the security module. Programmability of the security module is a facility an adversary may exploit to run arbitrary code on the security module and potentially leak secrets such as attestation keys.

In an example, the key exchange process of <FIG> is a protocol which is built-in to firmware of the security module of the trusted second device <NUM>. One or more key-hierarchies are also built into the firmware of the security module. This gives a balance between crypto-agility and security since protocols and key hierarchies are upgradable by upgrading firmware.

The key exchange process of <FIG> securely provisions a set of K symmetric keys DEK_1,. DEK_K to each trusted second device <NUM>, where the keys are used for different data streams.

The trusted second entity <NUM> creates <NUM> a TEE. The untrusted intermediary <NUM> (host for example) obtains <NUM> a number of users K and specifies <NUM> user public signing keys denoted UKpub_1,. UKPub_K, where each public key belongs to a participating user (such as a data stream or a tenant). In response, a security module of the trusted second entity <NUM> generates <NUM> a fresh key pair called a wrapping key (WK) on TEE creation, stores <NUM> WKpriv securely in secure volatile storage in the security module and writes <NUM> the public key WKpub to memory at the untrusted intermediary <NUM>. When the untrusted intermediary <NUM> requests <NUM> for a quote, the quote is computed <NUM> over WKpub and contains a measurement of the set of public keys UKpub. The quote is computed by the trusted second entity <NUM> and is sent to the untrusted intermediary using message <NUM>. The untrusted intermediary <NUM> uses <NUM> the quote to retrieve K different symmetric encryption keys from different users of key management service accounts. The users/key management service receive the quote and verify <NUM> the quote. If the quote is not valid the process ends <NUM>. If the quote is valid, the trusted first entity <NUM> encrypts <NUM> the private key using WKpub and signs the result using its UKpriv. This ensures that the private key is only decrypted by the security module. The untrusted intermediary <NUM> then provisions <NUM> the wrapped symmetric key to the security module at an index j\in (<NUM>, K). The security module checks <NUM> the signature of the encrypted key using UKpub_j. If the signature verification succeeds, it decrypts <NUM> the key and stores the key in a map. Once all K symmetric keys have been deployed, the security module provisions <NUM> these keys to the encryption unit(s).

<FIG> is a message sequence chart of an encryption protocol used by the trusted first entity <NUM> and the trusted second entity <NUM> of <FIG> in some examples. The trusted first entity <NUM> and the trusted second entity <NUM> pre-agree <NUM> that initialization vectors of the encryption protocol will be used only once for an encryption key and data set; that is, they agree on single use of initialization vectors. The trusted first entity <NUM> and the trusted second entity <NUM> also pre-agree a parameterized function for obtaining initialization vectors. In some embodiments the parameterized function takes a single parameter which is a virtual address, and the function is the identity function so that the virtual address is used as the initialization vector. In other embodiments the parameterized function takes parameters such as program state. The parameterized function computes on one or more of: a virtual address, a key, a counter. Thus it is not essential for the parameterized function to be the identity function. Because the trusted first entity <NUM> and the trusted second entity <NUM> have pre-agreed a function to obtain initialization vectors, the protocol is extremely efficient since no complex scheme for managing the initialization vectors, ensuring they are unique, and transferring them between the trusted first entity <NUM> and the trusted second entity <NUM> is needed. The initialization vectors and keys are computed from the parameterized function before encryption <NUM> and decryption <NUM> operations as now explained with reference to <FIG>.

The trusted first entity <NUM> divides the sensitive information to be transferred to the trusted second entity <NUM> into a plurality of blocks. It encrypts the blocks <NUM> using initialization vectors and keys. An individual block is encrypted using a pair comprising an initialization vector and a key. Because of the pre-agreement regarding single use of initialization vectors, an individual block is encrypted using a unique pair. In this way the encryption is secure. In contrast, if initialization vectors are used more than once, there is a risk of a malicious party obtaining the sensitive data or compromising the integrity of the computation, e.g., by replacing a data sample with another one encrypted with the same initialization vector.

The trusted first entity copies <NUM> the encrypted blocks to memory at the untrusted intermediary <NUM>. The untrusted intermediary <NUM> stores the encrypted blocks in its physical memory and the physical memory locations of the blocks have virtual addresses according to a mapping between physical and virtual memory locations. The potential available virtual addresses is extremely large since their domain is large enough to enable the sensitive code to run large computations while still using every virtual address only once.

The trusted second entity <NUM> comprises at least one encryption unit <NUM> and at least one compute unit <NUM>. The compute unit <NUM>, when it begins executing code to process the data in the encrypted blocks, requests a block from the untrusted intermediary <NUM> using a DMA request <NUM> and parameters of the pre-agreed function. The untrusted intermediary <NUM> receives the request <NUM> and it computes the initialization vector of the block that is being requested. The untrusted intermediary looks in its memory to find the appropriate encrypted block from the trusted first entity <NUM> and retrieves the appropriate encrypted block.

The encryption unit <NUM> at the trusted second entity decrypts <NUM> the retrieved block and sends the result to the compute unit <NUM>. The compute unit knows the original initialization vector associated with the request it made at operation <NUM>. The compute unit is able to check the result it receives from the decryption is expected in view of the initialization vector from operation <NUM>. If the check is passed the compute unit <NUM> proceeds to use the decrypted data; otherwise it rejects the decrypted data.

As mentioned above, in some cases the pre-agreed function is such that the virtual address of an encrypted block at the untrusted intermediary <NUM> is the initialization vector. In this case, the trusted first entity <NUM> uses the virtual address of a block as the initialization vector when encrypting that block, and never reuses the same virtual address to encrypt another block with the same key. This guarantees that there is just one block encrypted with the same initialization vector and key. The trusted second entity <NUM> uses the virtual address of a block as the initialization vector while encrypting the block before writing it to the untrusted intermediary <NUM>. The application running on the trusted second entity <NUM> is configured to not reuse the same virtual address for writing two different blocks of data.

A benefit of using the virtual address as an initialization vector is that an application running on the compute unit <NUM> is an oracle for blocks of data to be read and written. The sequence of addresses generated by an application targeting the virtual address space uniquely defines the sequence of blocks to be read from the host. The combination of checking the authenticity of input blocks followed by a check to ensure that the initialization vector included in a block's header matches the virtual address suffices to guarantee integrity of input data streams. Authentication and initialization vector checks are sufficient to guarantee integrity of the output stream.

In some examples the protocol of <FIG> also derives encryption key identifiers from virtual addresses. The virtual address space at the untrusted intermediary <NUM> is partitioned into K regions. In an example, some but not all of the bits of the virtual address are used as a key identifier. The key identifier is used to lookup a list of keys which have been provisioned to a security module of the trusted second entity during a key exchange process such as the key exchange process of <FIG>. The encryption unit <NUM> at the trusted second entity <NUM> expects blocks with the same bits to be encrypted using the same encryption key. An encryptor at the trusted first entity <NUM> encrypts blocks with the same bits with the same key.

In some examples the trusted first entity <NUM>, for each encrypted block, places a header containing an authentication tag and an initialization vector in a data stream following a block. The data stream is formed from a sequence of blocks of data to be copied from the trusted first entity <NUM> to the untrusted intermediary <NUM>. Using a header holding the authentication tag and initialization vector ensures that tags, initialization vectors and data are read and written together as part of a same DMA request. The trusted second entity <NUM>, using the headers, is able to authenticate any block of data it receives, and is able to authenticate and decrypt multiple blocks in parallel in embodiments where buffer <NUM> is used. Where the buffer <NUM> is omitted, the authentication and decryption of blocks occurs one by one. Any suitable component of the peripheral device is arranged to take into account additional space used by headers ( such as when the peripheral generates DMA requests). Any suitable component of the peripheral device is arranged to take into account that data returned from the untrusted intermediary <NUM> in response to DMA requests will be less than the requested size. The trusted second entity <NUM> checks the initialization vector included in the header before using the data.

The buffer <NUM> (in the security module) is arranged to intercept and buffer DMA requests and responses as mentioned above and pass them to the encryption/decryption component <NUM>.

In some examples the buffer <NUM> stores DMA responses until an entire DMA response is ready to be decrypted. This reduces complexity at the encryption/decryption unit <NUM> since complex state for multiple inbound responses does not need to be maintained. The buffer <NUM> is not needed where it is possible to guarantee that there are no externally observable side effects from the peripheral device processing incorrect data while a DMA response is in flight. This is achieved by providing a barrier such that no outbound DMAs are issued until all in-bound DMA responses have arrived.

In some examples, in addition to (or instead of) storing DMA responses until an entire DMA response is ready to be decrypted, the buffer maps from request to initialization vector as now described. For DMA write requests the buffer extracts the initialization vector from the outbound write request and uses it to retrieve the encryption key from the key storage. The buffer then routes the payload along with the initialization vector and the key to the encryption/decryption component <NUM>. The buffer <NUM> uses the encrypted payload, the authentication tag and the initialization vector, to construct a new payload request which is sent to the untrusted intermediary <NUM>.

Decrypting DMA responses from host memory to peripheral device memory is extremely challenging for three reasons: first, DMA responses from the host are sometimes split into multiple blocks; second, it is possible to have multiple DMA requests in flight at any point in time; and third, DMA responses do not contain the key identifier.

The buffer <NUM> maintains a small amount of state in the peripheral device for every DMA request. The buffer <NUM> extracts the key identifier and the destination address from each outgoing read request and stores the key identifier and destination address pairs in a map that tracks pairs of source and destination addresses and DMA size. When a first DMA response for a request is received, the buffer <NUM> looks up the source initialization vector address (IVA) using the destination address. It uses the source initialization vector address to retrieve the encryption key. It creates a new context in the encryption unit <NUM> and forwards the encryption key, the initialization vector (obtained by expanding the IVA), and the encrypted payload. It forwards subsequence DMA responses to the encryption unit <NUM>. If authentication and decryption succeed, the buffer <NUM> forwards the response to the compute elements <NUM>. The buffer <NUM> stops tracking requests once an entire response for a request has been received.

The encryption unit <NUM> has a key store, such as a block of SRAM or a register file, to hold encryption keys. The keys are stored in a map that is indexed using high-order bits from the initialization vector address. The mapping is provisioned by the security module after key exchange.

<FIG> illustrates various components of an exemplary computing-based device <NUM> which are implemented as any form of a computing and/or electronic device, and in which embodiments of an untrusted intermediary, or a first trusted computing entity are implemented in some examples.

Computing-based device <NUM> comprises one or more processors <NUM> which are microprocessors, controllers or any other suitable type of processors for processing computer executable instructions to control the operation of the device in order to implement an encryption protocol, or to host a peripheral device. In some examples, for example where a system on a chip architecture is used, the processors <NUM> include one or more fixed function blocks (also referred to as accelerators) which implement a part of the method of <FIG> in hardware (rather than software or firmware). Platform software comprising an operating system <NUM> or any other suitable platform software is provided at the computing-based device to enable application software <NUM> to be executed on the device. A data store <NUM> holds initialization vectors, keys, blocks of encrypted data, or other information. An encryption protocol <NUM> is stored in memory <NUM> in the case that the computing-based device <NUM> is the first trusted computing entity of <FIG>.

The computer executable instructions are provided using any computer-readable media that is accessible by computing based device <NUM>. Computer-readable media includes, for example, computer storage media such as memory <NUM> and communications media. Computer storage media, such as memory <NUM>, includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or the like. Computer storage media includes, but is not limited to, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM), electronic erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that is used to store information for access by a computing device. In contrast, communication media embody computer readable instructions, data structures, program modules, or the like in a modulated data signal, such as a carrier wave, or other transport mechanism. As defined herein, computer storage media does not include communication media. Therefore, a computer storage medium should not be interpreted to be a propagating signal per se. Although the computer storage media (memory <NUM>) is shown within the computing-based device <NUM> it will be appreciated that the storage is, in some examples, distributed or located remotely and accessed via a network or other communication link (e.g. using communication interface <NUM>).

In the case that the computing-based device is the first trusted computing entity, the communication interface <NUM> enables the computing-based device <NUM> to communicate with an untrusted intermediary such as that of <FIG>. In the case that the computing-based device <NUM> is an untrusted intermediary a peripheral device such as that of <FIG> is hosted by the computing-based device <NUM>.

The computing-based device <NUM> also comprises an input/output interface <NUM> arranged to output display information to a display device which may be separate from or integral to the computing-based device. The display information may provide a graphical user interface. The input/output interface <NUM> is also arranged to receive and process input from one or more devices, such as a user input device (e.g. a mouse, keyboard, camera, microphone or other sensor).

A peripheral device for use with a host computing device, the peripheral device comprising:.

By having the encryption unit on the peripheral device, rather than on the host, it is possible to securely and efficiently decrypt the sensitive data as it is received from the trusted entity to be processed by the sensitive code. The encryption unit also securely and efficiently encrypts outputs of the sensitive code before these are sent to the host and/or trusted computing entity. How to deploy the encryption unit on the peripheral device rather than the host is not straight forward because there is to be ability to have a trusted execution environment on the peripheral device and ability to switch between a trusted and non-trusted mode of operation of the peripheral device.

The security module is configured to form the trusted execution environment by switching the peripheral device from a non-secure mode in which access to memory and registers of the peripheral via a linear address space is possible, into a secure mode in which access to specified memory and specified registers of the peripheral via the linear address space is disabled. The linear address space is shared or partially shared in some cases. In some cases the linear address space is implemented using memory-mapped input-output. By having a secure mode of operation and a non-secure mode of operation the peripheral device is versatile. The secure mode of operation restricts some of the functionality of the peripheral device and is typically more resource intensive than the non-secure mode. Therefore the ability to switch between modes enables the secure mode to be used only when needed. However, note that the non-secure mode of operation is omitted in some examples and in that case, there is no mode switch between a secure mode of operation and a non-secure mode of operation.

In embodiments the technology may encompass any combination of the following examples.

The peripheral device described above wherein the data transferred between the trusted execution environment and the trusted computing entity, is transferred using direct memory access requests and responses. This provides an efficient and effective way to transfer data.

The peripheral device described above wherein the security module is configured to switch the peripheral device into the secure mode in response to a request from the host device. In this way the host device is able to create a trusted execution environment on the peripheral as and when wanted, using a simple request. The peripheral device as described above wherein the security module is configured to exchange keys with the first trusted computing entity, and to provision keys provided by the first trusted computing entity to the at least one encryption unit. Exchanging and provisioning keys in this way facilitates the ability to have secure communications between the peripheral device and the first trusted computing entity.

The peripheral device described above wherein the security module is configured such that, when the peripheral device is in the secure mode, if a request is received from the host for a quote, the security module computes and returns a quote capturing security critical properties of the peripheral device to the host. In this way the peripheral device is able to attest to security critical properties in a simple and efficient manner.

The peripheral device described above wherein the security module is configured to compute the attestation by computing a quote which is a hash of: the security module and additionally zero or more of: a debugging mode, a host access flag, a hash of a fresh data encryption key generated by the security module and encrypted using a public key of the trusted computing entity. In this way a quote is computed which gives an accurate indication of properties of the peripheral. The quote enables a potentially remote entity to verify the state of the peripheral device before deciding whether to trust it.

The peripheral device described above wherein the security module is configured to compute the attestation by computing a quote comprising a certificate which follows a certificate chain comprising: a quote signed using an attestation key, an attestation key certificate signed by an endorsement key, an endorsement key certificate signed using a root key, a self-signed root endorsement key issuing certificate. By using a certificate which follows a certificate chain security is enhanced.

The peripheral device described above wherein the encryption unit comprises a key store, a buffer and an encryption/decryption component. This is a simple and yet effective design for the encryption unit which is compact.

The peripheral device described above wherein the buffer is configured to intercept and buffer direct memory access requests and responses sent between the trusted execution environment and the host. By buffering requests and responses it is possible to control a rate of operation of the encryption/decryption unit.

The peripheral device described above wherein the buffer is configured to, when it intercepts a direct memory access write request, to extract an initialization vector from the direct memory access write request and use the initialization vector to retrieve an encryption key from the key store. This facilitates efficient key exchange.

The peripheral device described above wherein the buffer is configured to route a payload of the direct memory access write request , together with the initialization vector and the retrieved encryption key, to the encryption/decryption component. In this way the encryption/decryption component has the items for encryption or decryption.

The peripheral device described above formed as a package wherein the security module is on-die with the one or more compute elements, or off a die of the one or more compute elements. The on-die option gives enhanced security but is complex to manufacture. The off-die option gives more flexibility in the design, test and manufacture of the peripheral device. In some cases the peripheral device is on package and in some cases it is off package. The on package option gives more security.

The peripheral device described above formed as a plurality of connected packages. In this case manufacturing costs increase as two packages are formed, but the design, test and manufacture is simplified due to the use of two packages. Forming the peripheral device as a plurality of packages gives enhanced security as compared with using an off-package arrangement.

The peripheral device described above wherein the encryption unit has a plurality of keys so as to encrypt different data streams with different keys, and where the encryption unit is provisioned with the plurality of keys using a key exchange process. Using different keys in this way enables sensitive data from more than one source to be processed by sensitive code at the peripheral device.

The peripheral device described above wherein the security module is configured to isolate resources of the peripheral device to create secure channels on the peripheral device, and where different encryption keys are used for different secure channels. Where resource isolation is available on the peripheral it is possible to have multiple tenants using resources of the same peripheral and to keep the respective tenants' work separate.

The peripheral device described above wherein the security module is configured to compute, as part of the key exchange process, a quote containing a measurement of a plurality of public keys, the public keys having been specified by the host computing device. The quote is an efficient way to facilitate key exchange.

The peripheral device described above wherein the security module is configured to receive encrypted private keys from an entity which has verified the quote.

The peripheral device described above wherein the at least one encryption unit and the trusted computing entity are configured to use an encryption protocol which encrypts blocks of data, each block being encrypted using a pair comprising a key and an initialization vector, and where the encryption unit and the trusted computing entity agree to use each initialization vector only once with a given key; and wherein the initialization vectors are computed from a parameterized function known to the encryption unit and the trusted computing entity.

The peripheral device described above wherein the encryption unit configured to use an encryption protocol where initialization vectors are computed from a parameterized function known to the encryption unit and the trusted computing entity. Using the parameterized function gives a particularly efficient way of managing the initialization vectors to ensure that each initialization vector is only used once with a given key.

A data center comprising: a plurality of compute nodes, each compute node comprising a host computing device having at least one peripheral device as described above. The resulting data center gives significant compute capacity as a result of the peripheral devices and it enables sensitive code and data to be processed on the peripheral devices on behalf of tenants, even though the sensitive code and data passes to the peripheral device via an untrusted host. In some examples, a single trusted execution environment may be formed across a plurality of peripheral devices of the host computing device. The plurality of peripheral devices may be an arbitrary sub-set of the peripheral devices of the host computing devices.

A method for securely transferring data between the first trusted computing entity and the second trusted computing entity via the untrusted intermediary, the method comprising:.

The method as described above where the virtual address space is targeted by code installed in a trusted execution environment at the second trusted computing entity.

The method as described above where the parameterized function is an identity function so that the virtual address is the initialization vector.

The method as described above where at least one parameter of the parameterized function comprises program state of code installed in a trusted execution environment at the second trusted computing entity.

The method as described above where the second trusted computing entity comprises an encryption unit and a compute unit.

The method as described above wherein a virtual address of a block is used as the initialization vector.

The method as described above where the first trusted computing entity, for each encrypted block, places a header comprising an authentication tag and an initialization vector in a data stream following a block.

The method as described above comprising, at the second trusted computing entity, receiving for each encrypted block, a header and using the header to authenticate the block.

The method as described above comprising, at the second trusted computing entity, authenticating and decrypting multiple blocks in parallel.

The method as described above comprising taking into account, at the second trusted computing entity, additional space used by headers when generating direct memory access requests.

Claim 1:
A peripheral device (<NUM>) for use with a host computing device (<NUM>), the peripheral device comprising:
one or more compute elements (<NUM>);
a security module (<NUM>) configured to form a trusted execution environment on the peripheral device for processing sensitive data (<NUM>) using sensitive code (<NUM>), wherein the sensitive data and sensitive code are provided by a trusted computing entity (<NUM>) which is in communication with the host computing device;
at least one encryption unit (<NUM>) configured to encrypt and decrypt data transferred between the trusted execution environment and the trusted computing entity via the host computing device;
wherein the security module is configured to compute and send an attestation to the trusted computing entity to attest that the sensitive code is in the trusted execution environment; characterized in that:
the security module (<NUM>) is configured to form the trusted execution environment by switching the peripheral device (<NUM>) from a non-secure mode in which access to memory and registers of the peripheral via a linear address space is possible, into a secure mode in which access to specified memory and specified registers of the peripheral via the linear address space is disabled.