Key exchange via a partially trusted third party
Through partially trusted third-party computer systems and cryptographic services, elliptic curve Diffie-Hellman key exchange and envelope encryption technology are used to solve the challenges of communication security and trust management in complex environments, achieve efficient and secure communication management, and reduce Compute resource usage and trust requirements.
Patent Information
- Application Number
- CN202110969835.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2015-12-11
- Filing Date
- 2016-12-06
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2036-12-06
AI Technical Summary
In a complex computing resource configuration environment, ensuring data and communication security and trust relationship management is challenging, especially when the number of trusted computing resources and subcomponents increases under high-level encryption protection, which requires high computing resources and The degree of confidence while ensuring increased difficulty in communicating with reduced computing resource usage and trust constraints.
Use a partially trusted third-party computer system to establish and manage cryptographically protected communication sessions through partially trusted cryptographic services, and utilize elliptic curve Diffie-Hellman key exchange and envelope encryption technology to ensure the confidentiality and integrity of communications. security, while limiting access to cryptographic services to prevent man-in-the-middle attacks.
It achieves efficient and secure communication management in complex environments, reduces the use of computing resources and trust requirements, ensures the confidentiality and integrity of data, and at the same time improves the untrustworthiness of cryptographic services and enhances security.
Smart Images

Figure CN113890727B_ABST
Abstract
Description
[0001] Divisional application
[0002] This application is a divisional application of application number 201680072238.2, filing date December 6, 2016, and entitled “Key Exchange via a Partially Trusted Third Party”.
[0003] CROSS-REFERENCE TO RELATED APPLICATIONS
[0004] This application claims priority to and incorporates by reference the entire disclosure of U.S. patent application No. 14 / 967,214 (Agent Docket No. 0097749-629US0), filed on December 11, 2015, and entitled “KEY EXCHANGE THROUGH PARTIALLYTRUSTED THIRD PARTY,” and for all purposes, and incorporates by reference the entire disclosure of U.S. patent application No. 14 / 967,142 (Agent Docket No. 0097749-628US0), filed on December 11, 2015, and entitled “SIGNED ENVELOPE ENCRYPTION,” for all purposes. Background Art
[0005] In many environments, the security of computing resources and related data is very important. As an example, a network of computing devices can be used to provide a set of robust services to their users. In a network, a first computer, system or user can trust a second computer, system or user-that is, a computer, system or user can enjoy specific access rights, such as the ability to create, read, update and / or delete the data of the first computer, system or user. The second computer, system or user can also be trusted to store data associated with the first computer, system or user. As an example, a first computer, system or user can trust a certificate authority to store a public key and sign a digital certificate that proves the ownership of the public key. On the contrary, there may be other computers, systems or users that are not trusted and do not have the access rights or privileges of a trusted computer, system or user. In addition, there may be partially trusted computers, systems or users with certain access rights or privileges associated with a trusted computer, system or user. In the case of such a computing resource configuration, it may be challenging to ensure that access to resources and data is properly managed, especially when the size and complexity of such a configuration grows.
[0006] Modern cryptographic algorithms provide a high level of data security. For example, current encryption methods can protect data such that unauthorized access to the data requires an impractical amount of time and / or resources. However, this high level of protection comes at a cost. Generally speaking, higher levels of protection require a higher degree of caution and a greater expenditure of computing resources. In addition, higher levels of protection may also require a higher level of trust in one or more subcomponents—for example, in a cryptographic service or certificate authority. Securing cryptographically protected communications between two or more parties can be difficult, especially in systems where it may be advantageous to reduce the use of computing resources or to limit the amount of trust granted to various subcomponents of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Various techniques will be described with reference to the accompanying drawings, in which:
[0008] Figure 1 An environment is shown in which a cryptographically protected communication session is established using a partially trusted cryptographic service;
[0009] Figure 2 An environment is shown in which a partially trusted cryptographic service is used to exchange elliptic curve Diffie-Hellman key pairs;
[0010] Figure 3 An environment is shown in which a partially trusted cryptographic service is used to exchange elliptic curve Diffie-Hellman key pairs;
[0011] Figure 4 An environment is shown in which two clients establish a cryptographically protected communication session;
[0012] Figure 5 shows a diagram illustrating communications between a first client, a second client, and a cryptographic service, according to an embodiment;
[0013] Figure 6 shows a diagram illustrating communications between a first client, a second client, and a cryptographic service, according to an embodiment;
[0014] Figure 7 An illustrative process for establishing a cryptographically protected communication session according to an embodiment is shown;
[0015] Figure 8 An environment is shown in which a partially trusted client is used to facilitate cryptographically protected communications;
[0016] Fig. 9 An environment is shown in which cryptographically protected communications may be transmitted;
[0017] Fig.10An environment is shown in which cryptographically protected communications may be received and authenticated;
[0018] Fig.11 A diagram illustrating the transmission of a cryptographically protected communication is shown;
[0019] Fig.12 A diagram illustrating the receipt and verification of cryptographically protected communications is shown;
[0020] Fig.13 An illustrative process for transmitting cryptographically protected communications is shown;
[0021] Fig.14 An illustrative process for receiving and authenticating cryptographically protected communications is shown; and
[0022] Fig.15 An environment is shown in which various embodiments may be implemented. Detailed Description
[0023] The technology described in this document relates to using a partially trusted computer system to facilitate cryptographically protected communications. In some instances, a first computer system uses a partially trusted cryptographic service to communicate with a second computer system. A partially trusted system (e.g., a cryptographic service) can be a computer system that is trusted in some respects but untrusted in other respects. For example, a partially trusted cryptographic service can be trusted to generate a digital signature and verify the authenticity of the digital signature, but the cryptographic service is not trusted to access a digital key that can be used to access cryptographically protected communications between the first computer system and the second computer system. In such a system, a partially trusted cryptographic service can be used at least in part in a handshake process to establish a cryptographically protected communication session between the first computer system and the second computer system, and the partially trusted cryptographic service cannot access the established cryptographically protected communication session. For example, a partially secure cryptographic service can be used at least in part to establish a transport layer security (TLS) session between a client computer and a server that cannot be decrypted by the cryptographic service.
[0024] In another example, a first computer system sends a cryptographically protected communication to a second computer system, the cryptographically protected communication being encrypted by a cryptographic data key and wherein the second computer system has access to the data key. The data contained in the cryptographically protected communication can be protected such that the second computer system can read the data but cannot modify the data in a manner that a third party would not be able to verify. That is, any modification of the data by the cryptographically protected communication can be detected by a third party. In such a system, the first computer system can provide the cryptographically protected communication to the second computer system via an untrusted "man-in-the-middle" computer system, and the second computer system can verify whether the message was modified by the "man-in-the-middle" computer system.
[0025] As an example, two computer systems establish a communication session protected by a cryptographic method, wherein a partially trusted third party is used to establish a trust relationship between the two computer systems, but the partially trusted third party is not trusted as a party to the communication protected by a cryptographic method. For example, a cryptographic service can act as a partially trusted third party to establish a TLS session between a client and a server, but the cryptographic service cannot read the content of the encrypted communication between the client and the server. Continuing with this example, the cryptographic service can be trusted to generate a digital signature and verify whether the digital signature that is alleged to be authentic is indeed authentic. However, the cryptographic service may not be trusted to store and access the cryptographic private key used in the cryptographically protected communication (e.g., TLS session) between the client and the server. There may be various reasons that the cryptographic service is credible in some aspects (e.g., the generation and verification of digital signatures) and untrustworthy in other aspects (e.g., the storage of private keys)—the communication between the client and the server may have a particularly sensitive nature (e.g., important commercial, government and / or military data), the cryptographic service may have a hardware configuration that cannot support a full range of cryptographic services (e.g., the cryptographic service may not support a cryptographic key of a satisfactory length for the session), etc.
[0026] In one example, two clients may use a partially trusted cryptographic service to perform a key exchange. The first client may generate a first elliptic curve Diffie-Hellman (ECDH) key pair d A and Q A , and generates a Q containing the identity and public key of the first client AThe identity of the first client may be encoded as, for example, a user ID, a GUID, a machine ID, a media access control address (MAC address), etc. In addition, a dynamic identifier such as a dynamic IP address may be used to identify the first client. The first client may provide a message containing the identity and public key of the first client to a cryptographic service requesting a digital signature. The cryptographic service may then digitally sign the message using a cryptographic key associated with the first client and provide the digitally signed message back to the first client. The cryptographic service may store cryptographic keys, wherein each client of the cryptographic service is assigned a unique cryptographic key. The cryptographic service may copy the digitally signed message. Upon receiving the digitally signed message, the first client may provide the digitally signed message to the second client. This may occur as part of a handshake protocol. The second client may, upon receiving the digitally signed message, verify the authenticity of the digitally signed message by providing the digitally signed message along with an authentication request to the cryptographic service. In some cases, it may be determined that the digital signature is not authentic—that is, the message and / or signature has been modified. This may be the result of an unintentional or intentional modification of the message. Unintentional modifications may be caused by loss of wireless signals, packet loss, data corruption, memory corruption, and the like. Intentional modification may be caused by a malicious party obtaining the message (eg, during transmission, at a router) and modifying the message. If the message is determined to be inauthentic, the second client may reject the first message and the handshake may fail.
[0027] However, if the message in the previous paragraph is determined to be authentic, the second client can extract the identity of the first client and send the public key Q A The second client can then generate a second ECDH key pair d B and Q B , and generates a Q containing the identity and public key of the second client B The second message can be digitally signed, transmitted and verified in a similar manner to the first message. After receiving the second message and verifying its authenticity, the first client can B After exchanging public keys, the first client and the second client can compute a shared secret - the first client computes d A Q B The elliptic curve multiplication algorithm is used, and the second client calculates d B Q AThe elliptic curve point multiplication algorithm. In the elliptic curve Diffie-Hellman key exchange, these two values are equal and can be used as keys or to generate a private key that can be used to establish a cryptographically protected communication session such as a TLS session. Once established, the first client and the second client can then communicate via the cryptographically protected communication session, where it is guaranteed that the cryptographic service does not know the shared secret and therefore does not know the private key used in the TLS session. This provides a higher security guarantee because the cryptographic service cannot participate in the cryptographically protected communication session. The client ensures that the cryptographic service cannot calculate the shared secret and eavesdrop on or perform a "man-in-the-middle" attack on the cryptographically protected communication session generated in the above manner.
[0028] In some environments, a first computer system may use envelope encryption to send data to a second computer system. In such a system, both the first computer system and the second computer system may have access to a cryptographic data key. The first computer system may use the data key to encrypt a message that may later be decrypted by the second computer system using the data key. However, in some environments, it may be desirable to detect whether the second computer system has modified the message, and further, it may be desirable to prevent the second computer system from modifying the message without detection. In this example, it should be noted that the cryptographic service may be trusted to perform operations different from those in the above example—in this example, the cryptographic service may be trusted to generate the cryptographic data key, store the master key, and perform encryption and decryption operations using the master key.
[0029] Continuing with the example of the previous paragraph, a first client may have data or a message to be encrypted using a cryptographic data key so that a second computer system with access to the cryptographic data key cannot modify the data without detecting the modification. The client may first request the cryptographic service to generate the cryptographic data key. The client may then use the cryptographic data key to encrypt the message. The client may then generate an ECDH key pair d A and Q A Digital certificates for encrypted messages can be used A to generate, and can use Q A The client can then request the cryptographic service to perform authenticated encryption using the master key and the following inputs: the cryptographic data key, which is the plaintext to be encrypted; and additional authentication data (AAD), which includes the ECDH public key Q A In response to the request to perform authenticated encryption, the cryptographic service generates a ciphertext of the data key using an encryption algorithm according to the master key and generates a message authentication (MAC) tag using a cryptographic hash function. The digitally signed and encrypted message, the ciphertext of the data key, and the MAC tag are then transmitted to one or more recipients.
[0030] When the recipient receives the digitally signed and encrypted message, the ciphertext of the data key, and the MAC tag, the recipient can verify whether the message has been modified by a party other than the first client. The recipient can first extract the AAD from the MAC tag and request the cryptographic service to perform decryption corresponding to the authenticated encryption described above. Decryption can accept the following as input: the ciphertext and the AAD. If the AAD does not match the provided ciphertext input, the cryptographic service may return an error. If the decryption operation is successful, a plaintext output and a key identifier corresponding to the cryptographic key used to decrypt the ciphertext input can be provided. If the key identifier does not correspond to the master key used in the encryption operation, an error or other indication that the message may have been modified can be returned. However, if the key identifier matches the master key, the public key Q can be used to decrypt the message. A To verify the digital signature of the encrypted data key. After verifying the digital signature, the plaintext output containing the data key can be used to decrypt the ciphertext message. Due to the binding of the public key used in the signature verification, it is ensured that the decrypted message has been sent by the first client.
[0031] In the above and following descriptions, various techniques are described. For purposes of explanation, specific configurations and details are set forth in order to provide a thorough understanding of possible ways to implement these techniques. However, it will be equally apparent that the techniques described below may be practiced in different configurations without the specific details. In addition, well-known features may be omitted or simplified in order to avoid obfuscating the described techniques.
[0032] Figure 1 A diagram 100 is shown that illustrates a context in which various techniques of the present disclosure may be utilized. In this particular example, diagram 100 illustrates a first client "Client A" 102 and a second client "Client B" 104 communicating via a cryptographically protected communication session 114. A cryptographic service 106 may be used by clients 104 and 106 to perform various cryptographic operations and store and access cryptographic keys. A message 108 may be provided (e.g., sent via a network) to the cryptographic service to perform an authentication operation, and a digital signature 110 may be provided to the cryptographic service 106 to perform a verification operation. The cryptographic service 106 may not have sufficient information to access 112 the cryptographically protected communication session 114.
[0033] In some examples, the first client 102 and / or the second client 104 may be various types of computing entities. In some embodiments, the clients 102 and 104 may be respective computer systems on a network (e.g., a local area network), but may also be different networks connected via the Internet. One or both of the clients 102 and 104 may also be computer servers, instances of virtual machines, and / or other computing entities.
[0034] The cryptographic service 106 can provide access to cryptographic keys in multiple key stores (e.g., by generating and providing cryptographic keys or referencing other systems operable to generate and provide cryptographic keys) and security preferences for how the cryptographic keys should be used by clients requesting the keys. In some embodiments, the key store can be implemented by a hardware security module (HSM) capable of storing cryptographic keys. The key store can be a component included within the cryptographic service, within the client, at a remote location and accessible via an interface provided by the cryptographic service, and any combination thereof.
[0035] In some embodiments, a cryptographic service can be used to encrypt data via an API, a job, as a logical task, and other types of routines. For example, an encryption service that supports an encryption () API can receive the following as input parameters: data to be encrypted, a key identifier for uniquely identifying a cryptographic key that can be used to encrypt data, an encryption context describing the tag metadata of the data to be encrypted, and optional parameters for additional authentication data (AAD). The cryptographic service can receive an API request, obtain a cryptographic key from a key identifier, and select an encryption configuration (e.g., encryption algorithm and block size) from multiple encryption configurations that meet security policies, encryption contexts, and client encryption capabilities. The cryptographic key obtained at least in part by using the key identifier can be used according to the selected encryption configuration, and the provided data can be encrypted according to the client encryption capabilities. Encrypted data can be obtained so that the encrypted data can be decrypted using the encryption configuration and the cryptographic key used to encrypt the data. This key can be referred to as the master key of the client.
[0036] In some embodiments, cryptographic services can be configured to check that the data encrypted by cryptographic services meet a specific format. For example, cryptographic services can be programmed to check that the size of any data to be encrypted must be less than 8 kilobytes (KB), thereby causing the client itself to encrypt data greater than 8KB. This constraint can for example be based at least in part on the consideration of scalability and performance of the cryptographic services that improve multiple clients in a multi-client environment. In some embodiments, cryptographic services may return failure when receiving a request to encrypt data that exceeds required limit.
[0037] In embodiments where the data to be encrypted is larger than the size limit implemented by the cryptographic service, or in other contexts, the client can transmit an application programming interface request for a data key to the cryptographic service. The request can specify a key identifier (managed key) of a cryptographic key managed by the cryptographic service. The cryptographic service can generate or otherwise obtain a data key and encrypt the data key using the managed key. Encryption can be based on an encryption configuration such as described above and generally based on a policy associated with the managed key. The cryptographic service can provide a response to a request including a data key and an encrypted data key. The client can then use the data key to encrypt the data, delete any in-memory copies of the data key, and store the encrypted data key in association with the encrypted data (e.g., stored with the encrypted data or stored in a database associating the encrypted data key with the encrypted data). Data can be encrypted by transmitting a request (specifying a key identifier) to decrypt the encrypted data key to the cryptographic service. The cryptographic service can select a managed key, decrypt the encrypted data key, and provide the decrypted data key in response to the request, so that the client can use the data key to decrypt the data.
[0038] In some embodiments, the cryptographic service may provide additional functionality. For example, the cryptographic service may be configured to authenticate messages or data, such as via an API, a job, as a logical task, and other types of routines. A client, such as the first client 102, may provide the cryptographic service with a message 108 to be authenticated. In response, the cryptographic service may generate a message authentication code (MAC) tag using a cryptographic hash function that accepts as input: an input message or data (e.g., Figure 1 The cryptographic service may include a message 108 (shown in Figure 108) and a cryptographic key. In some embodiments, the cryptographic key used with the cryptographic hash function may be bound to the identity of the calling client (i.e., the cryptographic key is selected based on the identity of the calling client), and in other embodiments, a key identifier for the cryptographic key may be provided by the client. The cryptographic hash function may generate a MAC tag as an output, and the cryptographic service may provide the MAC tag in response to a request to authenticate the message or data. It should be noted that other methods of providing integrity and authenticity may be used. Integrity may refer to assurance that the message or data has not been maliciously or accidentally modified; authenticity may refer to assurance as to the author of the message or data. For example, the cryptographic service may authenticate the message or data by generating a digital signature.
[0039] In some embodiments, the cryptographic service may provide additional functionality, for example, via an API, a job, as a logical task, and other types of routines. For example, the cryptographic service may be configured to verify MAC tags, digital signatures, and the like. A client, such as the second client 104, may provide the cryptographic service with a MAC tag 110 to be verified. In response, the cryptographic service may verify the authenticity of the MAC tag by comparing the calculated MAC tag with the MAC tag it generated from the message and the key. If the calculated and provided MAC tags match, the verification should indicate that the message is authentic.
[0040] In various embodiments, cryptographically protected communications 114 are used for the purpose of transmitting data between two or more parties in a manner that prevents other parties from accessing, reading, or modifying the data. Cryptographically protected communications can also provide assurance that communications purportedly originating from a source actually originated from the purported source, and in some embodiments can be cryptographically verified by a recipient. The use of cryptographically protected communications can be referenced, for example, to ensure the integrity of data traversing a network between two or more entities and / or to ensure the confidentiality of data as it traverses a network.
[0041] For example, Figure 1 The cryptographically protected communication 114 shown in can be an encrypted session in which the first client 102 and the second client 104 utilize a shared secret to ensure confidentiality of the communication conducted via the encrypted session. An example of an encrypted session is a Transport Security Layer (TLS) session such as described in RFC 5246, which is incorporated herein by reference. However, the cryptographically protected communication need not be encrypted—for example, in some embodiments, the cryptographically protected communication 114 can provide integrity guarantees rather than confidentiality guarantees, such that a third party can read the content of the cryptographically protected communication, but will not be able to modify the cryptographically protected communication without destroying the validity of the communication. In some embodiments, the cryptographically protected communication can be established using a MAC tag, a digital signature, etc.
[0042] In various embodiments, a cryptographically protected communication session is used for the purpose of accessing resources. A cryptographically protected communication session may be used, for example, to transmit data from one entity to another entity, such as from a client to a server or from the client to the server. A cryptographically protected communication session may be used to ensure the integrity of data traversing a network between entities and / or to ensure the confidentiality of data as it traverses a network.
[0043] In some embodiments, the cryptographic service may not be able to access 112 cryptographically protected communications. Accessing cryptographically protected communications may refer to a cryptographic service that can, for example, participate in a communication session by sending and receiving messages in a session. In some embodiments, the cryptographic service may not be able to decrypt data encrypted via a protocol specified in a cryptographically protected communication (e.g., the cryptographic service cannot decrypt data sent via a TLS session between clients). Although the cryptographic service can access some cryptographic keys (e.g., client master keys) in a computing environment, it may not be able to access other information necessary for accessing cryptographically protected communications (e.g., a shared secret between the first client 102 and the second client 104 can be kept secret from the cryptographic service). In some embodiments, access 112 may refer to the ability of the cryptographic service to modify communications. For example, a cryptographic service may have the ability to read communications between clients 102 and 104, but may, for example, be unable to modify communications because the communications contain a digital signature generated using a private key that is inaccessible to a key service.
[0044] Figure 2 An illustrative environment 200 is shown for exchanging ECDH key pairs using a partially trusted cryptographic service 206. A first client 202 may have an ECDH key pair 208 that includes a private key d A and public key Q A It should be noted that although Figure 2 In the illustrated embodiment, an ECDH key pair is shown, but other types of asymmetric key pairs may also be utilized in accordance with the present disclosure. In some embodiments, the client 202 may generate an ECDH key pair during the key exchange process, but in other embodiments, the key pair may be pre-generated or may be generated, for example, by a processor such as a processor. Figure 2 The key pair is provided to the client 202 by a trusted source such as a hardware security module (HSM) not shown in the figure. Figure 2 The clients 202 and 204 shown may be similar to the above combined Figure 1 The client described.
[0045] In some embodiments, cryptographic services 206 may be trusted to perform authentication and verification operations, but may not be sufficiently trusted to perform other operations, such as accessing a cryptographically protected communication session between clients 202 and 204. In some embodiments, providing cryptographic services with access to a cryptographically protected communication session may be architecturally unsound. In some embodiments, cryptographic services may potentially be accessible to parties other than clients 202 and 204. In some embodiments, it may be advantageous not to provide cryptographic services with a shared secret—for example, if a large number of clients trust a cryptographic service with a shared secret, the cryptographic service may in this case become an identifiable target for malicious attacks.
[0046] In some embodiments, cryptographic service 206 may store a set of cryptographic keys in, for example, Figure 2 The cryptographic service may have a set of client master keys, each of which is associated with and owned by a particular client. The client master keys may be associated with their respective clients as part of a registration process, wherein the cryptographic service establishes a trust relationship with the registrant, such as by requiring the registrant to enter a password, provide a security token, or provide other proof of the registrant's identity to prevent spoofing attacks.
[0047] Cryptographic services 206 can allow callers to perform several cryptographic operations. A specific client can call cryptographic services to perform various cryptographic operations, and in some embodiments, other clients can be allowed to use their cryptographic keys to perform all or some of the cryptographic operations supported by cryptographic services. For example, a specific client can use its client master key to generate a digital signature to prove that a specific message comes from the client service. Related to the above example, other clients can request cryptographic services to verify whether the digital certificate is valid. In some embodiments, the client can also use cryptographic services to encrypt data to produce ciphertext output and decrypt data to produce plaintext output (for example, when multiple layers of encryption are applied to data, the plaintext output may still be fuzzy). These operations can be performed using the client master key stored in a secure manner by the cryptographic services.
[0048] The cryptographic service can also provide authenticated encryption operations. In some embodiments, the cryptographic service can support encryption (key ID, data, AAD) requests, APIs or commands. The key ID can be associated with a specific client and can be associated with a specific client master key internally by the cryptographic service. In some embodiments, the key ID can be an optional input or can be implicit (for example, the key ID can be determined using the identity of the caller). Additional authentication data (AAD) can be used for various purposes and can be data that does not need to be encrypted but is authenticated by, for example, an electronic signature, a message authentication code, or a hash value with a key generally included in the AAD. In some embodiments, a ciphertext including at least a portion of the AAD is generated. In some other embodiments, the AAD is provided separately during decryption. In some other embodiments, the AAD is generated at least partially based on the request and or other metadata when decrypting, so that the decryption will succeed only when the metadata is passed. In some embodiments, the policy can constrain whether a cryptographic operation can be performed on a specific AAD. Through programming logic and / or policies implemented by the cryptographic service, the processing of an Encrypt (Key ID, Data, AAD) request may require both that the AAD contains a specific value and that the AAD is authentic (e.g., has not been modified since the original transmission). Similarly, a Decrypt (Key ID, Ciphertext, AAD, Tag) request may be used to cause the cryptographic service to decrypt the specified ciphertext using the key identified by the Key ID. The AAD in the Decrypt (Key ID, Ciphertext, AAD, Tag) request may be used as described above to generate an authentication tag that is compared to the input tag. For example, through programming logic and / or policies implemented by the cryptographic service, the processing of a Decrypt (Key ID, Ciphertext, AAD, Tag) may require both that the AAD contains a specific value and that the AAD is authentic (e.g., has not been modified since the original transmission). In some embodiments, the Decrypt () request will fail if the generated authentication tag does not match the input tag.
[0049] In some embodiments, the Encrypt() API generates metadata associated with the ciphertext. For example, the Encrypt() API may generate a ciphertext and append to it metadata containing the key ID used in the encryption operation. In this embodiment, the Decrypt() API may not require the key ID as input (i.e., a Decrypt(ciphertext, AAD, tag) request may replace or be a substitute for a Decrypt(key ID, ciphertext, AAD, tag) request). In some embodiments, the cryptographic service may generate an authentication tag on the ciphertext and metadata during the encryption operation, and verify the authentication tag during decryption to ensure that the correct cryptographic key is used for decryption.
[0050] In some embodiments, an ECDH key pair 208 is generated by client 202. The ECDH key pair may include a private key dA and public key Q A . However, other types of asymmetric key pairs may be generated instead, and the private key kept secret from other parties. ECDH key pairs may be generated, for example, as part of a handshake protocol, or may be pre-generated (e.g., one or more ECDH key pairs are generated at one point in time and distributed for later use in forming a cryptographically protected communication session). In some embodiments, the ECDH key pair may be a temporary cryptographic key that is usable only for a single session and is invalid thereafter. In some embodiments, an ECDH key pair may be usable only for a single message, and is invalid thereafter (requiring a second ECDH key pair for a second message).
[0051] Message 210 can be generated by first client 202 and include at least the identity and public key of the sender. The message can be used to bind the identity of the sender to the public key by proving that the public key is associated with the sender and that the sender has the corresponding private key. In this regard, binding can refer to the association between a cryptographic public key and a client or entity that can access the corresponding cryptographic private key. Binding can be implicit (e.g., the protocol defines a message or message format containing a public key and a client ID to bind the key to the client) or can be explicitly stated in the message. In some embodiments, the message binding the cryptographic public key to the sender information can be digitally signed, or a MAC tag can be generated via binding.
[0052] The identity of the first client can be encoded as, for example, a user ID, a GUID, a machine ID, a media access control address (MAC address), etc. In addition, a dynamic identifier such as a dynamic IP address can be used to identify the first client. As part of the handshake protocol, a message 210 can be provided to a cryptographic service to establish a communication session protected in a cryptographic manner. A message 210 can be provided to a cryptographic service together with a request to authenticate the message. Authentication can be performed by a cryptographic service using a client master key associated with the first client 202. As part of the request, the client can provide a key identifier to the cryptographic service. In some embodiments, the cryptographic service can perform security and parameter checks to ensure that a request should be made, for example, to check whether the client has enough privileges to authenticate data, or more specifically, to authenticate data according to a specific key identifier. In some embodiments, the message can also contain a key identifier corresponding to the key used in the authentication operation, a key identifier corresponding to the key that can be used in the corresponding verification operation, or both.
[0053] In some embodiments, the authentication request is processed by the cryptographic service by generating a MAC tag over the contents of the message using a cryptographic hash function. The MAC tag 212 may be provided by the cryptographic service to the first client 202, for example, as part of a response. The MAC tag 212 may be provided synchronously or asynchronously. In some embodiments, a cryptographic private key associated with the first client 202 may be used to generate a digital signature instead of a MAC tag. In this embodiment, the authenticity of the digital signature may be verified using a corresponding cryptographic public key. In some embodiments, the public key may also be stored in the cryptographic service, but in other embodiments, the public key may be associated with a separate entity (e.g., a certificate authority (CSA)). Figure 2 The MAC tag and the sender client information and the public key Q may be provided to the second client 204. A In some embodiments, the first client 202 may transmit the data directly to the second client 204, for example, via a network connection. In other embodiments, the first client 202 may transmit the data indirectly to the second client 204, for example, by storing the information in a predetermined location from which the second client 204 can retrieve it.
[0054] In some embodiments, the second client may receive a packet containing the sender's identity information and the public key Q A The second client 204 may provide the message and the MAC tag together with a request to verify the authenticity of the message to the cryptographic service 212. In some embodiments, the second client 204 may also provide a key identifier corresponding to a cryptographic key to be used in the verification operation. In some embodiments, the cryptographic service 206 may determine that the message provided with the MAC tag is authentic and provide an indication 214 that the information is valid. In some embodiments, in addition to or instead of the success indication, a failure indication may be provided when the verification operation fails or the message is determined to be unauthentic. When it is determined that the message is valid (for example, when the indication 214 that the information is valid is received), the second client 204 may obtain the public key Q included in the message. A The public key may be saved, archived, cached, or stored in short-term storage.
[0055] In an alternative embodiment, encryption and decryption may be used to perform the key exchange shown in environment 200. For example, first client 202 may provide a cryptographic service with sender identity information and a public key Q AThe cryptographic service may encrypt the message 210 using the client master key and return the encrypted message to the first client 202, which then provides the encrypted message to the second client 204. The second client may provide the encrypted message to the cryptographic service as part of the decryption request, and the cryptographic service may decrypt the message and, as part of fulfilling the request, provide a key identifier corresponding to the client master key used to decrypt the message in response to the second client 204. Upon receiving the response, the second client 204 may check that the key identifier used to decrypt the message corresponds to the first client 202. As long as the first client 202 does not allow access to other parties to encrypt using its client master key, the second client 204 may be assured that the public key contained in the encrypted message is from the first client and may be used for cryptographically protected communications with the first client. In this embodiment, the second client 204 may not be required to process unauthenticated public keys, and may be used in accordance with Figure 2 In some embodiments, before receiving the indication 214 that the information is valid, the second client 204 may access the plaintext public key Q from the unavailable message. A , because the public key has not yet been authenticated.
[0056] In some embodiments, in addition to including the public key Q A In addition, the encrypted message may also include a random number that the first client 202 requires the second client 204 to confirm before establishing a cryptographically protected communication session. For example, as part of the handshake protocol, the first client 202 may refuse to accept the public key Q from the second client 206 if the public key is not accompanied by a random number. B (For example, combined with Figure 3 ). In some embodiments, requiring the reply to include a random number can provide additional security by preventing replay attacks or freshness assurance of messages received by the first client 202 from the second client 204. In some embodiments, the random number can include a timestamp.
[0057] Figure 3 An illustrative environment 300 is shown for exchanging ECDH key pairs using a partially trusted cryptographic service 306. The first client 302, the second client 304, and the cryptographic service 306 may be similar to the one described above according to Figure 1 and 2 The ECDH key pair 308 may include a private key d A and public key Q A , where the private key d AThe ECDH key pair 308 may be generated by the first client 302 as part of the handshake protocol. The second client 304 may have a public key Q A 310. In addition, the second client 304 may have a private key d B and public key Q B The second ECDH key pair 312 can be used with Figure 2 The public key Q of the second client is provided to the first client 302 in a similar manner to the key exchange described above. B 320. The cryptographic service 306 may be provided with the identity information and public key Q of the second client. B As part of the authentication request, the first client may provide the message 314 as part of the authentication request, and may generate a MAC tag 316 using the client master key associated with the second client 304, provide the MAC tag to the second client 304 and forward it to the first client 302. As part of the authentication request, the first client may provide the message and the MAC tag to determine the authenticity of the message, thereby determining whether the message was actually edited by client B 304. After indicating 318 that the message is authentic, client A 302 may store the public key Q B For establishing a shared secret with client B 304. For example, the shared secret can be used to establish a cryptographically protected communication session between clients. Encryption and decryption operations can also be used instead of authentication and verification operations to combine with the above Figure 2 The same or similar method as described above is used to exchange the public key Q B .
[0058] Figure 4 An illustrative environment 400 is shown in which two clients establish a cryptographically protected communication session. The first client 302, the second client 304, and the cryptographic service 306 may be similar to those described above according to Figure 1-3 In some embodiments, the first client 402 may have generated a private key d A and public key Q A ECDH key pair, where the public key Q A Perhaps according to the above Figure 2 Similarly, the second client 404 may have generated a private key d B and public key Q B The second ECDH key pair, where the public key Q B Perhaps according to the above Figure 2-3 The implementation scheme described in is assigned to the first client 402.
[0059] In some embodiments, the first client 402 has a device that can use at least d Aand Q B The shared secret 406 is generated and the second client 404 has at least d B and Q A Generated shared secret 408. In an embodiment using the Elliptic Curve Diffie-Hillman key agreement protocol, the shared secret can be calculated by both parties, because d A Q B =d B Q A The shared secret may be used to establish a cryptographically protected communication session 410. In some embodiments, the cryptographic service 406 may not have access to the two private keys d A and d B , and will not be able to access 412 the cryptographically protected communication session. In some embodiments, access 412 to the cryptographically protected communication session 410 may refer to a cryptographic service that is able to participate in the communication session, for example, by sending and receiving messages in the session. In some embodiments, the cryptographic service may be unable to decrypt data encrypted via a protocol specified in the cryptographically protected communication (e.g., the cryptographic service is unable to decrypt data sent via a TLS session between clients). Although the cryptographic service may have access to some cryptographic keys in the computing environment (e.g., a client master key), it may not be able to access other information necessary to access the cryptographically protected communication (e.g., shared secrets 406 and 408 and / or private keys d A and d B ). In some embodiments, access 412 may refer to the ability of the cryptographic service to modify communications. For example, the cryptographic service may have the ability to read communications between clients 402 and 404, but may not be able to modify the communications, for example, because the communications contain a digital signature generated using a private key that the key service cannot access.
[0060] Figure 5 A diagram illustrating a handshake protocol between a first client 502, a second client 504, and a cryptographic service 506, according to an embodiment, is shown. As part of the handshake protocol, the first client may generate 508 a private key d A and public key Q A In some embodiments, the ECDH key pair can be pre-generated before the handshake begins.
[0061] After the ECDH key pair has been generated, client A can generate 510 a public key Q identifying the sender. A The message can be combined with the above Figure 1-3Those described. Client A can then provide 512 the message to be authenticated to the cryptographic service. In some embodiments, the message can be provided to the cryptographic service via a network API. The cryptographic service 510 can generate a digital signature or MAC tag on the message using a cryptographic key. As part of the authentication request, client A can provide the cryptographic service with a unique identifier corresponding to the cryptographic key used by the cryptographic service to authenticate the message. In some embodiments, the key identifier can be provided in the message, but in other embodiments, the key identifier can be provided as a separate parameter in the network API request, and in other embodiments, the key identifier can be implied based on the identity of the caller. The cryptographic service can return an authenticated message including the message and the MAC tag to client A. In some embodiments, client A can keep a copy of the original message and the cryptographic service returns the MAC tag.
[0062] In some embodiments, client A may provide 514 a request for a cryptographically protected communication session (including authenticated messages) to client B. The request may be, for example, a combination of Figure 1-3 The request may include the identity information of client A and the public key Q A message and the corresponding MAC tag.
[0063] In some embodiments, client B may receive 516 a request to establish a cryptographically protected communication session (including authenticated messages). In some embodiments, client B receives the request indirectly from client A—for example, client A may send the request via a middleman client X (not shown) that forwards the request to client B. Note that in some embodiments, the middleman may be another computer system, but may also be other types of computing entities that are capable of modifying messages, such as a router or switch. Therefore, upon receiving the request, client B may need to verify that the request is authentic and that the content has not been modified when sent from client A. In some cases, a malicious party that intercepts client A's messages may attempt to modify the public key Q. A This may include, for example, cryptographically protected communication sessions.
[0064] In some embodiments, client B may provide 518 the authenticated message to the cryptographic service 506 and request the cryptographic service to verify the authenticated message. The cryptographic service 506 may receive the authenticated message from client B along with instructions to verify its authenticity. A key identifier may also be provided as part of the request to verify the authenticated message. In some embodiments, a cryptographic key is obtained and a MAC tag is generated on the message, and the generated MAC tag is compared to the received MAC tag to determine whether the message is authentic. In some embodiments, the cryptographic service may receive a digital signature received in place of the MAC tag, generate a digital signature, and compare the generated digital signature to the received digital signature. After verifying that the message is authentic, client B 504 may extract the public key Q A , generate 520ECDH key pair d B and Q B , and use d B and Q A A shared secret is calculated 522.
[0065] After receiving the ECDH public key Q A Afterwards, client B 604 may, for example, Figure 6 Exchange ECDH public key Q with client A602 in the described manner B Environment 600 may be combined with the above Figure 5 The environment described is the same as or similar to the environment 500. Public key Q B The exchange can be part of the handshake protocol and can occur at Figure 5 It should be noted that the key may be generated elsewhere, such as in conjunction with Figure 5 During the described process (see, in particular, step 520). Client B may generate 610 a message identifying the sender as client B and public key QB, and provide the message to cryptographic service 606 for authentication, which may authenticate 612 the message, for example, by generating a MAC tag or digital signature on the message, and provide the authenticated message to client B 604. Figure 5 Client B may reply 614 to the request to establish a cryptographically protected communication session and include the authenticated message as part of the reply. Client A may receive 616 the reply and perform verification by using a cryptographic service to determine whether the authenticated message in the reply is valid. If the request is determined to be valid, the public key Q may be used to authenticate the client A. B For example, d is used in the elliptic curve Diffie-Hellman key exchange. A and Q BTo calculate 620 the shared secret.
[0066] When both parties have calculated the shared secrets 620 and 622, a cryptographically protected communication session may be established using the shared secrets. Once established, client A and client B may then communicate via cryptographically protected communication, where the cryptographic service is guaranteed not to know the shared secret and therefore the private key used in the cryptographically protected communication session. This provides greater security because the cryptographic service cannot participate in the cryptographically protected communication session, and no other party can intercept the public key Q contained in the cryptographically protected communication session. A and Q B Authenticated message.
[0067] Figure 7 An illustrative example of a process 700 for performing a handshake according to an embodiment is shown. Process 700 may be performed by any suitable system, such as described above in Figure 1-6 . However, it should be noted that process 700 can be performed by any computer system participating in the handshake process. It should also be noted that the handshake process can be any handshake for establishing a cryptographically protected communication session, such as a protocol including a handshake protocol and a record protocol for a cryptographically protected communication session. In an embodiment, the system performing process 700 can generate 702 a first asymmetric key pair including a first private key and a first public key. In some embodiments, the asymmetric key pair can be an elliptic curve key pair. The system can also generate 704 a first message including sender identity information and a first public key. It should be noted that the first message can be partially generated before the asymmetric key pair is generated in stage 702. For example, in some embodiments, the message can be partially generated before the first asymmetric key pair is generated. The sender identity information can be encoded as, for example, a user ID, a GUID, a machine ID, a media access control address (MAC address), etc. In addition, a dynamic identifier such as a dynamic IP address can be used to identify the identity of the sender.
[0068] In some embodiments, the system may then provide 706 a first message containing the sender identity information and the first public key to the cryptographic service. In some embodiments, the system may alternatively send the sender identity information and the first public key separately to the cryptographic service, and the cryptographic service generates a MAC tag or digital signature on both the sender identity information and the first public key after receiving at least the sender identity information and the first public key.
[0069] The system can receive 708 a first authenticated message corresponding to the first message from the cryptographic service after providing the first message to the cryptographic service, wherein the first authenticated message can be verified by the second client. The authenticated message can include the original message or another message including the sender identity information and the public key and the corresponding MAC tag. The authenticated message must be cryptographically verifiable by the client that will establish a communication session protected by a cryptographic method with it. In some embodiments, it may be necessary to access the cryptographic key that may be protected by the cryptographic service to verify the MAC tag. In such embodiments, a subset of callers attempting to verify the MAC tag can receive an error indicating that the caller cannot access the resources required to complete the verification request from the cryptographic service. In other embodiments, a general error is provided so that the failure indication does not further indicate that the cryptographic key required to perform the verification operation is inaccessible. In some embodiments, the real message can be encrypted so that the sender identity information and / or the public key are encrypted using a cryptographic key that can be accessed by the cryptographic service, and the real message can be decrypted by the client that the system is trying to establish a communication session protected by a cryptographic method with it.
[0070] The system may then identify a client with which a cryptographically protected communication session is to be established and provide 710 a first authenticated message to the client. The authenticated message may be provided directly (e.g., by including the message as part of a handshake protocol or request), or indirectly (e.g., by providing a uniform resource identifier (URI) that can be used to locate and retrieve the authenticated message). Note that in some embodiments, the request may pass through one or more computer systems or computing entities, such as routers or switches, which may have the ability to inspect and / or modify the content of the authenticated message. However, modifications to the message content may be detected without the proper corresponding modification of the MAC tag.
[0071] In some embodiments, the system may receive 712 a second authenticated message from a client with which a cryptographically protected communication session is to be established. In some embodiments, the second authenticated message includes a message containing identity information and a second public key and a MAC tag that can be used to verify that the message is authentic. In some embodiments, the authentic message includes a ciphertext of the second public key and / or identity information of the second client. The system may verify 714 the authenticity of the second authenticated message using a cryptographic service. In some embodiments, a MAC tag is generated on the message and the generated MAC tag is compared with the provided MAC tag; in some embodiments, a digital signature may be verified. In some embodiments, the authenticated message may be an encrypted message that is verified by being decrypted and verifying that the cryptographic key used is associated with the second client so that other parties cannot encrypt the message. In the event that the verification successfully determines that the message is authentic, the system may generate 716 or calculate a shared secret using at least the second public key and the first private key. In some embodiments, the second public key may be an elliptic curve public key Q2, the first private key may be an elliptic curve private key d1, and the shared secret may be d1Q2.
[0072] The system can complete the handshake and use at least the shared secret to establish 718 a cryptographically protected communication session or a cryptographically protected communication session. In some embodiments, the cryptographically protected communication session provides confidentiality guarantees, such as a TLS session. In other embodiments, the session may not provide confidentiality guarantees, but may provide other guarantees, such as integrity and authenticity of messages in the session.
[0073] As used herein, the term "envelope encryption" refers to a technology for improving the performance of data encryption and decryption in an environment with limited computing resources. Computing resources may include CPU resources, memory, resources, bandwidth, etc. In the envelope encryption scheme, there may be a client and a cryptographic service that can be used to perform cryptographic operations such as encryption () and decryption () described above. In addition, the cryptographic service can store the client's master key that the client can use to perform cryptographic operations. In some embodiments, there may be disadvantages in using a cryptographic service to perform all encryption and decryption operations. For example, in the case where the client is connected to the cryptographic service via a broadband Internet connection (e.g., a throughput of about 100Mb / s), the encryption of a large amount of data (e.g., gigabytes of data) may have undesirable poor performance due to the overhead involved in transmitting data to the cryptographic service for encryption via a broadband connection. For example, it will take more than 177 hours (>1 week) to complete the transmission of 8TB files via a 100Mbps broadband connection. Therefore, in some systems, it may be advantageous to avoid transmitting the entire data block via the network for encryption.
[0074] An envelope encryption scheme may be used to improve the performance of cryptographic operations. To encrypt large amounts of data, an encryption service may generate a symmetric data key and encrypt the data key according to a client master key. The encrypted data key may include additional information (possibly in plain text) indicating how the encrypted data key may be decrypted (e.g., a metadata field may include a key ID that may be used to decrypt the encrypted data key). The plaintext data key and the encrypted data key may be transmitted to the client, and the client may use the data key to encrypt the data. The encrypted data (encrypted according to the data key) and the encrypted data key (encrypted according to the client master key) may be stored together or associated together (e.g., stored in a database record).
[0075] To decrypt the encrypted data, a client (which may be a different client than the client that encrypted the data) may obtain the encrypted data key and request the cryptographic service to decrypt the encrypted data key. As part of the decryption request, the cryptographic service may require a key ID. If the requester has sufficient access privileges (e.g., by being granted access rights by the client that encrypted the data) and uses the correct cryptographic key to decrypt the encrypted data key, the plaintext data key may be returned and subsequently used to decrypt the encrypted data.
[0076] Figure 8 A diagram 800 is shown that illustrates a context in which various techniques of the present disclosure may be utilized. In this specific example, diagram 800 illustrates a first client "Client A" 802, a second client "Client B" 804, and a third client "Client C" 806. Diagram 800 also illustrates a message 808, a message protected according to an enhanced envelope encryption scheme 810 (hereinafter "protected message"), and a fraudulent message 814. Clients 802, 804, and 806 may be clients such as those described elsewhere in this disclosure. In some embodiments, a client may be a computer system, but may also be other types of computing entities that are capable of modifying message 802, such as a router or switch.
[0077] In some embodiments, client A802 generates message 808 or, more generally, generates data and protects the data according to an enhanced envelope encryption scheme. In some embodiments, messages protected according to the enhanced envelope encryption scheme 810 can be read by other clients that have access to the data key used to perform the envelope encryption, but cannot be modified by those clients. In some embodiments, a cryptographic service can be used to verify whether the protected message has been inappropriately modified. In some embodiments, client A can modify the protected message, and the ability to modify the protected message can be delegated to other parties, for example, to a subset of clients that have access to the data key used to perform the envelope encryption. Thus, in some embodiments, the parties that can read and modify the protected message 810 can be different from the parties that can read the protected message 810—in some embodiments, the parties that can read and modify the protected message 810 can be different from the parties that can read the protected message 810 according to the enhanced envelope encryption scheme 810. Figure 8 In the embodiment of , client A 802 can read and modify the protected message, while clients A, B and C 802-806 can read the protected message.
[0078] In some embodiments, the sender of the protected message 810 (e.g., the source address of the TCP packet) is Client A 802, and the recipient of the message (e.g., the destination address of the TCP packet) is Client B 804. In some embodiments, the sender of the protected message 810 is Client A 802, the recipient is Client C 806, and Client B may be another computer system that facilitates communications between Client A and Client C. In some embodiments, the sender of the protected message 810 is Client A 802, the recipient is Client B 804, and there is an arrangement between Client A and Client B (e.g., a technical arrangement such as described in a network protocol specification, or a non-technical arrangement such as a contractual obligation or service level agreement (SLA)).
[0079] In some embodiments, client B 804 may attempt to perform an unauthenticated modification of a protected message 816. Client B 804 may obtain the data key, decrypt the protected message 810, modify the message (e.g., change the message from "123..." to "789..."), and then encrypt the modified message 812 using the data key, thereby generating a fraudulent message 814. Client B 804 may then provide the fraudulent message 814 to client C 806. However, using the techniques disclosed herein, client C 806 may use cryptographic services to verify whether the message it received (i.e., the fraudulent message 814) was improperly modified.
[0080] Fig. 9A diagram 900 is shown that illustrates a context in which various techniques of the present disclosure may be utilized. In this specific example, diagram 900 illustrates how a protected message may be generated and transmitted. A first client 902 and a second client 904 are shown. The first client 902 may be combined with the above Figure 8 The second client 802 may be the same as or similar to the first client 802 described above. Figure 8 The second client 804 described above is the same or similar, but in some instances, can be combined with the above Figure 8 The described third client 806 is the same or similar. Likewise, the client may be a computer system or computing entity described elsewhere in this disclosure.
[0081] The cryptographic service 906 can be a cryptographic service described elsewhere in this disclosure. In some embodiments, the cryptographic service can support at least two operations—(1) generating data keys; and (2) performing authenticated encryption of data. In some embodiments, a client can request (e.g., via a network API request) that the cryptographic service 906 generate a data key that can be used for envelope encryption. The cryptographic service 906 can generate the data key, encrypt the data key using a client master key associated with the caller-client, and return both the data key and the encrypted data key to the caller-client (e.g., via a network API response). In some embodiments, the caller-client can use the cryptographic service to decrypt the encrypted data key, and the caller-client can also allow other parties to decrypt the encrypted data key, for example, using a security policy on the client master key that grants specific other parties (e.g., Client B 904) the ability to decrypt data using the client master key associated with the caller-client. For example, in accordance with Figure 9-10 In some embodiments, client A 902 has granted client B 904 the ability to decrypt data keys encrypted with a customer master key associated with client A. In some embodiments, a client may request (e.g., via a network API request) cryptographic service 906 to encrypt data using an API that is the same as or similar to the Encrypt() API described above.
[0082] In some embodiments, the first client 902 may generate, obtain, and / or store a message 906, a data key 908, optional additional authentication data (AAD) 910, and a private key d A and public key Q AECDH key pair 912. Message 906 can be a plaintext message, and can be a ciphertext message that has been previously encrypted. Data key 908 can be a cryptographic key generated by cryptographic service 906. In some embodiments, first client 906 may have obtained both plaintext data key 908 and a data key encrypted according to a client master key associated with the first client from the cryptographic service. In some embodiments, the first client may not have optional AAD 910 (e.g., the optional AAD may not be used, may not exist, or may be represented by a null value). In some embodiments, client 902 generates a private key d A and public key Q A ECDH key pair 912. In some embodiments, the private key d A Keep it secret from other parties. In some embodiments, other types of asymmetric key pairs can be used instead of elliptic curve key pairs.
[0083] Message 906 can be data of any form, and in some embodiments, can be edited by client 902 (i.e., generated by client 902), but can also be data obtained from another source. Data key 908 can be a cryptographic key that can be used in, for example, the envelope encryption scheme previously described in this disclosure. The data key can be a symmetric key or an asymmetric key. Additional authentication data 910 can be used as part of authenticated encryption. In some embodiments, authenticated encryption generates an authentication tag (e.g., a MAC tag) based on plaintext data input (e.g., the plaintext itself or a ciphertext version of the plaintext) and AAD. AAD 910 may need to be presented for successful decryption of the corresponding authenticated decryption. In some embodiments, AAD 910 is not encrypted during the authenticated encryption process and can be transmitted in an unobfuscated format (i.e., unencrypted).
[0084] The protected message 924 may include several components, such as Fig. 9 In some embodiments, protected message 924 includes a digitally signed payload 914 that includes at least an encrypted message 916. Encrypted message 916 may be encrypted according to data key 908. Digitally signed payload 914 may be encrypted using ECDH private key d A The ECDH public key Q generated on the encrypted message 916 and can be used A Verify the digital signature.
[0085] In some embodiments, the protected message also includes an ECDH public key Q A However, in other embodiments, the ECDH public key may be included as part of another component of the protected message (e.g., AAD may include the public key Q A ).
[0086] In some embodiments, the protected message also includes an authenticated payload 920, which includes (1) a ciphertext of the data key encrypted according to the client master key 922; and (2) an authentication tag (e.g., a MAC tag) generated (directly or indirectly) on the data key and including the optional AAD 910 and ECDH public key Q A In some embodiments, the authenticated payload 920 may be generated using authenticated encryption operations, such as those described in RFC 5084, which is incorporated herein by reference. For example, the authenticated payload 920 may be generated by performing AES-CCM encryption by the cryptographic service 906 using the following input parameters:
[0087] AES key: Client master key (in Fig. 9 not shown),
[0088] Random number: (any unique value),
[0089] Plain text: Data Key 908, and
[0090] Optional additional authentication data: AAD 910 and public key Q A .
[0091] AES-CCM encryption generates: (1) the ciphertext of the data key 922; and (2) the ciphertext of the data key and the AAD 910 and the ECDH public key Q A MAC tag 920 on the amplified AAD. In some embodiments, the amplified AAD may consist of only the ECDH public key (e.g., AAD 910 is empty). AES-GCM encryption may be performed in the same or similar manner as described above.
[0092] In some embodiments, the structure of the authentication payload 920 can be similar to Fig. 9 In one example, the authenticated payload may include: data key 908 and ECDH public key Q A The ciphertext of both, and optionally the AAD (which can be empty). In this example, the authentication tag can be generated on the ciphertext and AAD using the client master key of client A.
[0093] In some embodiments, the structure of the authentication payload 920 can be similar to Fig. 9In one example, the payload of the authentication may include: a ciphertext including the data key 908 and optionally an AAD (which may be empty). In this example, the authentication tag may be generated on the ciphertext and AAD using the client master key of client A, and the same key may be used to generate the authentication tag on the ECDH public key Q A A second authentication tag is generated.
[0094] In some embodiments, the first client 902 may make the protected message available to other computing entities, such as the second client 904. The system may make the protected message available directly (e.g., by including the message as part of a handshake protocol or request), or indirectly (e.g., by providing a uniform resource identifier (URI) that can be used to locate and retrieve the protected message). Note that in some embodiments, the message, when available, may pass through one or more computer systems or computing entities, such as routers or switches, which may have the ability to inspect and / or modify the content of the message. However, modifications to the content of the message (e.g., modifying the ciphertext message without modifying the digital signature and / or modifying the ciphertext data key without modifying the authentication tag) will be detectable.
[0095] Fig.10 A diagram 1000 is shown that illustrates a context in which various techniques of the present disclosure may be utilized. In this particular example, diagram 1000 illustrates how a protected message may be received and verified. A first client 1002 and a second client 1004 are shown. The first client 1002 is shown transmitting a protected message 1018 to the second client 1004. It should be noted that the various relationships between the transmitting client, the receiving client, and the protected message are accomplished within the scope of the present disclosure—the transmitting client may have generated the protected message (e.g., Figure 8 or may be a client A in which a fraudulent message is generated and sent to a receiving client (e.g., Figure 8 In either case, the client receiving the protected message (i.e., Client C 1004) can verify whether the protected message has been inappropriately modified. Fig.10 The clients described may be computer systems or computing entities (eg, routers or switches) described elsewhere in this disclosure.
[0096] The cryptographic service 1006 may be a cryptographic service described elsewhere in this disclosure. In some embodiments, the cryptographic service may support at least two operations—(1) obtaining a client key ID; and (2) decrypting data. In some embodiments, a client may request (e.g., via a network API request) the cryptographic service 1006 to obtain a client key ID and return the key ID to a caller client. In some embodiments, the caller client provides identity information such as a user ID, a GUID, a machine ID, a media access control address (MAC address), etc. The cryptographic service may map the identity information to the client key ID, for example, by storing an association between the identity information and the client key ID in a database record of one or more database tables, in an array (e.g., a two-dimensional array), in a hash map (e.g., a hash map in which the key is the sender information and the value is the key ID), or in other appropriate data structures. The client key ID may be represented as a user name, an integer, an alphanumeric string, a character array, a GUID, or other such data types. The mapping of the identity information to the key ID may be injective (i.e., one-to-one) and / or bijective (i.e., one-to-one mapping). In some embodiments, the client may request (eg, via a network API request) that the cryptographic service 906 encrypt data using an API that is the same as or similar to the Decrypt() API described above.
[0097] In some embodiments, the first client 1002 transmits a protected message 1018 to the second client 1004. The protected message 1018 may be combined with Figure 9-10 The protected message 1018 is the same or similar to the protected message described above. In some embodiments, the protected message includes an encrypted payload 1008, which includes a ciphertext 1010 and a digital signature on the ciphertext 1008 that can be verified by the ECDH public key. In some embodiments, the protected message further includes an ECDH public key 1012. In some embodiments, the protected message further includes an authenticated payload 1014, which includes a ciphertext 1016 and an authentication tag on the ciphertext 1016 and an amplified AAD including the AAD and the ECDH public key. It should be noted that the content of the protected message 1018 received by client C may have been inappropriately modified. The technology now described allows a client receiving a protected message to determine whether the protected message has been inappropriately modified.
[0098] In some embodiments, a client receiving a protected message ( Fig.10 Client C 1004 in uses the cryptographic service to decrypt the authenticated payload 1014. As part of the network API request, the client can provide the cryptographic service with the ciphertext, the amplified AAD (which includes AAD 1024 and the ECDH public key Q A1026 both) and the authentication tag generated on the ciphertext and the amplified AAD. A ), an AAD may be provided in place of an amplified AAD. In some embodiments, as part of an API request, the client may also provide a key ID to the cryptographic service for decryption. The client may determine the key ID based on a variety of information. For example, protected message 1018 may be sent as part of a communication session between client C and another client whose identity is known. In this example, the key ID may be associated with the party with which client C is participating in the communication session. As a second example, information in the protected message (e.g., Fig.10 As a third example, the message may be received as part of one or more TCP packets and the key ID may be determined based on the sender identity (eg, the source address of the TCP header).
[0099] In some embodiments, the cryptographic service decrypts the ciphertext 1016 included in the authentication message. In some embodiments, the ciphertext may include metadata (e.g., attached to the ciphertext) including a key ID for decryption. The cryptographic service decrypts the ciphertext using the key ID and uses the decrypted plaintext to generate an authentication tag using the plaintext and the provided AAD. If the generated tag does not match the tag provided in the decryption request, the decryption may fail. In a successful decryption, the cryptographic service 1006 may return the decrypted plaintext and, in some embodiments, the key ID of the client master key used to perform the decryption to the client. In some embodiments, the plaintext is a data key 1022 that can be used to decrypt the encrypted message 1010.
[0100] In some embodiments, as a response to the decryption request, the client 1004 can receive the decrypted plaintext 1020 and the key ID from the cryptographic service. The client can further compare the received key ID with the expected key ID. The expected key ID can be the key ID associated with the expected sender. The client can determine the expected sender based on the protocol or other information. If the received key ID does not match the expected key ID, an error may be caused, and the protected message may be discarded as invalid. However, if the received key ID matches the expected key ID, the client can store and / or cache the decrypted data key 1022 in a memory.
[0101] In some embodiments, the client may receive a digitally signed payload 1008. In some embodiments, the ECDH public key Q ATo verify the digital signature on the digitally signed payload 1008. In an embodiment, the public key Q A Included as part of the amplified AAD, the amplified AAD is authenticated as part of the decryption operation. After authentication, the public key Q A To verify the digital signature. If the digital signature is invalid, the protected message may be discarded as invalid. However, if the digital signature is valid, the encrypted message 1010 can be decrypted using the data key 1022 obtained from the decryption of the authenticated payload 1018. After the decryption is completed, the client 1004 obtains the plaintext message 1020 that has not been improperly modified.
[0102] Fig.11 A diagram 1100 is shown showing a first client 1102 generating a protected message. First, client A 1102 may generate 1108 a private key d A and public key Q A ECDH key pair. The keys may be generated in various ways as described elsewhere in this disclosure. In addition, other types of asymmetric key pairs may be used in place of elliptic curve key pairs. Client A may also request 1100 to generate a data key. The data key may be used to perform envelope encryption. The request may be made as a network API request to a cryptographic service 1106 that supports the functionality described elsewhere in this disclosure. The cryptographic service 1106 may receive the request and generate 1112 a data key and provide the data key to the client in response to the request. In some embodiments, the data key may be generated prior to the ECDH key pair.
[0103] Client A may receive the data key from the cryptographic service (e.g., in response to a network API request) and encrypt the message with the data key 1114. After encrypting the message, the ECDH private key d A To generate a 1116 digital signature on the ciphertext of the message. The corresponding ECDH public key Q A To verify the validity of the generated digital signature. The digitally signed payload, which includes the digital signature and the ciphertext message, can be included as part of the protected message.
[0104] After receiving the data key, client A can make a request to the cryptographic service 1106 to perform authenticated encryption. The request can be a network API request, and as part of the network request, client A can provide the data key, additional authentication data (AAD), and ECDH public key Q AIn some embodiments, AAD is optional and may be omitted. The cryptographic service may encrypt 1118 the data key using a client master key associated with client A, and encrypt the data key over the data key (directly using plaintext or indirectly using a ciphertext of the data key), over AAD (if not omitted), and over the ECDH public key Q. A An authentication tag is generated on the ciphertext. An authenticated payload including the generated ciphertext and the authentication tag may be included as part of the protected message.
[0105] In some embodiments, the cryptographic service may store, cache, or archive a copy of the data key after generating the data key. In this embodiment, the cryptographic service may also store, cache, or archive the data key encrypted using the customer master key of client A. The encrypted data key may be generated at any time after the data key is generated (e.g., after the data key is generated and before the authentication encryption request 1118). In this embodiment, client A may omit providing the data key in the encryption request, and the cryptographic service may encrypt the data key from storage, cache, or archive.
[0106] After client A obtains both the digitally signed payload and the authenticated payload, client A may provide 1120 both the digitally signed payload and the authenticated payload to client B 1104. In some embodiments, client A generates a protected message including the digitally signed payload and the authenticated payload, and transmits the protected message. Client B may receive 1122 the digitally signed payload and the authenticated payload, or in some embodiments, at least a protected message constructed from the digitally signed payload and the authenticated payload.
[0107] Fig.12 A diagram 1200 is shown showing a first client 1202 sending a purportedly protected message to a second client 1204, where the second client can verify whether the message has been inappropriately modified. In some embodiments, client C 1204 receives a message that is purported to be a protected message that has not been inappropriately modified. In some embodiments, the message can be provided 1208 by the original author of the message (e.g., the party that created the message), and in some cases it can be an unrelated third party (e.g., a computer system or router or switch within the network). Client C can obtain 1210 the purportedly protected message and obtain a digitally signed payload and an authenticated payload from the message. The purportedly protected message can have the same format as the protected message (e.g., as combined with Fig.11 Described)—however, in some embodiments, client C may not verify that the digital signature and / or authentication tag is valid.
[0108] In some embodiments, the message purportedly protected includes an authenticated payload that includes the ciphertext, the AAD, and the ECDH public key Q A . Client C can issue a request (e.g., a network API request) to the cryptographic service 1206 to perform a decryption operation. As part of the request, client C can provide 1212 the ciphertext of the authenticated payload, the AAD, and the authentication tag. The cryptographic service can select 1214 a cryptographic key to use for decrypting the ciphertext. The key can be selected, for example, based on metadata included in the ciphertext, which contains a key ID corresponding to a client master key that can be used to decrypt the ciphertext. The cryptographic key and key ID can be associated using database records in one or more database tables, in an array (e.g., a two-dimensional array), in a hash map (e.g., a hash map where the key is the sender information and the value is the key ID), or other appropriate data structures.
[0109] In some embodiments, the cryptographic service decrypts the ciphertext 1216. In some embodiments, the ciphertext may include metadata (e.g., attached to the ciphertext) including a key ID for performing the decryption. The cryptographic service may decrypt the ciphertext using the key ID and use the decrypted plaintext to generate an authentication tag using the plaintext and the provided AAD. If the generated tag does not match the tag provided in the decryption request, the decryption may fail. In a successful decryption, the cryptographic service may return the decrypted plaintext to the client and, in some embodiments, a key ID of the client master key used to perform the decryption. In some embodiments, the plaintext is a data key that can be used to decrypt the encrypted message. In some embodiments, the AAD may be augmented to include a public key Q. A (For example, by attaching the key to AAD).
[0110] In some embodiments, as a response to the decryption request, client C 1204 can receive the plain text and key ID of decryption from the cryptographic service. The client can further verify 1218 the key ID received and the expected key ID. The expected key ID can be the key ID associated with the expected sender. The client can determine the expected sender based on the protocol or other information. If the received key ID does not match with the expected key ID, an error may be caused, and the message allegedly protected may be discarded as invalid. However, if the received key ID matches with the expected key ID, the client can store and / or cache the data key of decryption in a memory.
[0111] In some embodiments, client C may receive a digitally signed payload (e.g., as part of a purportedly protected message). In some embodiments, the ECDH public key Q ATo verify the digital signature on the digitally signed payload 1008. In an embodiment, the public key Q A Included as part of the amplified AAD, the amplified AAD is authenticated as part of the decryption operation. After authentication, the public key Q A The digital signature is verified 1220. If the digital signature is invalid, the purportedly protected message may be discarded as invalid. However, if the digital signature is valid, the encrypted message contained in the digitally signed payload may be decrypted 1222 using the data key obtained from the decryption of the authenticated payload. Upon completion of the decryption, Client C obtains the plaintext message that has not been inappropriately modified.
[0112] Fig.13 An illustrative example of a process 1300 for generating a message protected under an enhanced envelope encryption scheme according to an embodiment is shown. Process 1300 may be performed by any suitable system, such as described above in Figure 8-12 In an embodiment, the system performing process 1300 may generate 1302 an asymmetric key pair including a private key and a public key. In some embodiments, the asymmetric key pair may be an elliptic curve key pair. The system may also obtain 1304 a cryptographic data key that may be used for envelope encryption from a cryptographic service. The data key may be a symmetric key. In some embodiments, the data key may be obtained before generating the asymmetric key pair.
[0113] In some embodiments, the data key may be used to encrypt the message 1306. After the message is encrypted, the private key may be used to generate 1308 a digital signature on at least the encrypted message. In some embodiments, the public key may be used to verify that the digital signature is authentic. For example, the digital signature may be generated 1308 based on the above in conjunction with the public key. Figure 9-10 The embodiments described herein perform encryption and digital signature generation. In some embodiments, the payload of the digital signature may include a ciphertext of a private key (including metadata associated with a client master key used to perform encryption, in some embodiments) and a digital signature generated by an asymmetric private key.
[0114] In some embodiments, additional authentication data (AAD) can be obtained and the AAD can be augmented with an asymmetric public key 1310. For example, the AAD can be augmented by pre-populating or appending an asymmetric public key to the AAD. In some embodiments, the AAD can be a data structure and the asymmetric public key can be inserted or copied into a data element within the data structure. In some embodiments, the AAD can be optional and / or empty.
[0115] In some embodiments, as part of a request to perform authenticated encryption, the data key and the amplified AAD may be provided 1312 to the cryptographic service. In some embodiments, the AAD may be optional, in which case the data key and the asymmetric public key (or just the data key) may be provided to the cryptographic service as part of a request to perform authenticated encryption. Figure 9-10 The described implementation performs authenticated encryption by a cryptographic service.
[0116] In some embodiments, (i.e., where the cryptographic service successfully performs authenticated encryption of the data key), Fig.13 The system may receive 1314 from the cryptographic service a ciphertext of the data key and an authentication tag that may be verified using the amplified AAD. In some embodiments, the AAD may be optional, in which case an asymmetric public key may be used to verify the authentication tag. In some embodiments, Fig.13 The system may, for example, transmit or provide 1316 a protected message including the ciphertext message, the digital signature, the ciphertext data key, the augmented AAD, and the authentication tag to another computer system. The system may make the protected message available, for example, by transmitting the protected message including the digitally signed payload and the authenticated payload in one or more TCP packets to another client.
[0117] Fig.13 Variations of the process 1300 described in are also possible. In some embodiments, the system may amplify the AAD with a public key, provide the amplified AAD to the cryptographic service, and receive a ciphertext data key and an authentication tag from the cryptographic service that can be verified using the amplified AAD. In this embodiment, before, simultaneously with, or after receiving the ciphertext data key, a plaintext data key may also be received from the cryptographic service. In some embodiments, the system may receive the ciphertext data key, generate an authenticated payload including the ciphertext data key, the authentication tag, the AAD, and an asymmetric public key. In some embodiments, after generating the authenticated payload, the system may obtain the ciphertext data key, use the data key to generate the ciphertext of the first message, and use the asymmetric private key to digitally sign the ciphertext of the first message. The system may make available a first protected message including an authenticated payload and a first digital payload based on the ciphertext of the first message according to the above-described embodiments. The system may also generate the ciphertext of the second message using the data key, and digitally sign the ciphertext of the second message using the asymmetric key. The system can then make available a second protected message including the same authenticated payload as the first message and a second digital payload based on the ciphertext of the second message according to the above embodiments. Thus, in various embodiments, the system can generate multiple protected messages using the same authenticated payload.
[0118] Fig.14 An illustrative example of a process 1400 for verifying that a protected message has not been improperly modified in an embodiment is shown. Process 1400 may be performed by any suitable system, such as described above in Figure 8-12 In an embodiment, a system performing process 1400 may receive 1402 a protected message including a protected message, the protected message including: a first ciphertext; a digital signature on the first ciphertext; a second ciphertext; an amplified AAD; and an authentication tag on the second ciphertext and the amplified AAD. The protected message may have been inappropriately modified by another computer system or another computing entity, such as a router or switch involved in the transmission of the protected message.
[0119] In some embodiments, as part of a request (e.g., a network API request), the system can provide 1404 the second ciphertext, the amplified AAD, and the authentication tag to the cryptographic service to decrypt the second ciphertext. Figure 9-10 The described implementation has the decryption performed by a cryptographic service.
[0120] As part of the response to the request, the system may receive 1406 an indication of authenticity from the cryptographic service based on at least the second ciphertext, the amplified AAD, and the authentication tag. In some embodiments, such as embodiments in which the ciphertext, AAD, and / or the authentication tag have been modified during transmission, a failure or invalid indication may be received instead. As part of the response to the request, the system may also receive 1408 a plaintext and a key ID for the second ciphertext. The plaintext may include a cryptographic data key. The key ID may correspond to a client master key used by the cryptographic service to decrypt the second ciphertext. In some embodiments, an indication of authenticity may be received after or simultaneously with receiving the plaintext and the key ID. Note that the plaintext may still be in an obfuscated format (e.g., where multiple layers of encryption are applied to the data key).
[0121] In some embodiments, the system may verify 1410 that the received key ID matches the expected key identifier. The expected key ID may be a key ID associated with the expected sender. The client may determine the intended sender based on the protocol or other information. If the received key ID and the expected key ID do not match, an error may be raised and the protected message may be discarded as invalid. The system may, for example, ... Figure 9-10 The described embodiments perform this verification. In some embodiments, the system can decrypt the first plaintext using the data key and obtain a plaintext message that has not been improperly modified.
[0122] In some embodiments, the digital signature on the first ciphertext may be verified 1412 using an asymmetric public key. In some embodiments, the digital signature may be verified prior to receiving 1406 an indication of authenticity and / or prior to receiving the decrypted data key. After the second ciphertext has been decrypted and the data key obtained, the system may decrypt the first ciphertext using the data key and obtain the plaintext message. In some embodiments, the ciphertext may be decrypted prior to receiving 1406 an indication of authenticity and / or prior to verifying the digital signature 1412. In such embodiments, the obtained plaintext message may be marked as unsafe for use until the verification step is successfully completed.
[0123] As used herein, the terms "private key" and "public key" may be used to refer to a private key and a public key, respectively, used as part of an asymmetric cipher ("public key cryptography"). Asymmetric cryptography refers to a class of cryptographic protocols in which a private key and a public key may be mathematically linked. In public key cryptography, the parties are not required to exchange shared secrets. Instead, the public key may be published and may be generally available (even to untrusted parties), while the private key should not be disclosed to untrusted parties. A key pair (of the corresponding private key and public key) may be used to perform cryptographic operations. For example, a plaintext message may be encrypted using a public key, thereby producing a ciphertext, and the ciphertext may be decrypted using the corresponding private key, thereby producing the original plaintext message. As a second example, a private key may be used to generate a digital signature to authenticate a message, and the corresponding public key may be used to verify that the digital signature is correct and therefore the message is authentic.
[0124] Fig.15Various aspects of the example environment 1500 for implementing various aspects according to various embodiments are shown. As will be appreciated, although a network-based environment is used for explanation purposes, various embodiments can be implemented using different environments when appropriate. Environment includes electronic client device 1502, which may include any suitable device operable to send and / or receive requests, messages or information via appropriate network 1504 and in some embodiments, convey information back to the device user. Examples of such client devices include personal computers, mobile phones, handheld messaging devices, laptop computers, tablet computers, set-top boxes, personal data assistants, embedded computer systems, e-book readers, etc. The network may include any suitable network, including intranets, the Internet, cellular networks, local area networks, satellite networks or any other such networks and / or combinations thereof. The components used by such systems may depend at least in part on the type of selected network and / or environment. Many protocols and components for communicating via such networks are well known, and will not be discussed in detail herein. Communication via a network may be realized by wired or wireless connections and combinations thereof. In this example, the network includes the Internet and / or other publicly addressable communications network, as the environment includes a network server 1506 for receiving requests and providing content in response to the requests, however for other networks, alternative devices for similar purposes may be used, as will be apparent to those skilled in the art.
[0125] The illustrative environment includes at least one application server 1508 and a data storage 1510. It should be understood that there may be several application servers, layers or other elements, processes or components that can be linked or otherwise configured, and the application servers, layers or other elements, processes or components can interact to perform tasks such as obtaining data from appropriate data storage. As used herein, the server can be implemented in various ways, such as hardware devices or virtual computer systems. In some cases, the server may refer to a programming module executed on a computer system. As used herein, unless otherwise stated or clearly in context, the term "data storage" refers to any device or device combination capable of storing, accessing and retrieving data, which may include any combination and any number of data servers, databases, data storage devices and data storage media in any standard, distributed, virtual or clustered environment. The application server may include any appropriate hardware, software and firmware, which may be integrated with the data storage, handle some or all of the data access and business logic of the application program depending on the needs of various aspects of one or more application programs of the execution client device. The application server can provide access control services in cooperation with the data storage, and can generate content that can be provided to the user, including but not limited to text, graphics, audio, video and / or other content, which can be provided to the user by the network server in the form of hypertext markup language ("HTML"), extensible markup language ("XML"), JavaScript, cascading style sheets ("CSS"), JavaScript object representation (JSON) and / or another appropriate client-side structured language. The content transmitted to the client device can be processed by the client device to provide the content in one or more forms, including but not limited to forms that are perceptible to the user auditorily, visually and / or via other senses. The handling of all requests and responses and the delivery of content between the client device 1502 and the application server 1508 can be handled by the network server using PHP: in this example, hypertext preprocessor ("PHP"), Python, Ruby, Perl, Java, HTML, XML, JSON and / or another appropriate server-side structured language. In addition, unless otherwise clear from the context, the operations described herein as being performed by a single device can be performed jointly by multiple devices that can form a distributed and / or virtual system.
[0126] The data storage 1510 may include several separate data tables, databases, data files, dynamic data storage schemes and / or other data storage mechanisms and media for storing data related to specific aspects of the present disclosure. For example, the data storage shown may include mechanisms for storing production data 1512 and user information 1516, which can be used to provide content for the production end. The data storage is also shown as including mechanisms for storing log data 1514, which can be used for reporting, analysis or other such purposes. It should be understood that there may be many other aspects that may need to be stored in the data storage, such as page image information and access rights information, which may be stored in any of the mechanisms listed above or in additional mechanisms stored in the data storage 1510 when appropriate. The data storage 1510 can be operated by logic associated with it so as to receive instructions from the application server 1508, and obtain, update or otherwise process data in response to the instructions. The application server 1508 can provide static data, dynamic data or a combination of static data and dynamic data in response to the received instructions. Dynamic data (such as data used in web logs (blogs), shopping applications, news services, and other such applications) can be generated by a server-side structured language as described herein, or can be provided by a content management system ("CMS") running on an application server or under its control. In one example, a user can submit a search request for a certain type of item through a device operated by the user. In this case, the data storage may access user information to verify the identity of the user, and can access directory details to obtain information about the item of the type. Then the information can be returned to the user, such as with the results listed on a web page that the user can view via a browser on the user device 1502. Information about a specific item of interest can be viewed in a dedicated page or window of the browser. However, it should be noted that the embodiments of the present disclosure are not necessarily limited to the context of a web page, but can be more generally applicable to generally processing requests, where the request is not necessarily a request for content.
[0127] Each server will typically include an operating system that provides executable program instructions for general administration and operation of the server, and will typically include a computer-readable storage medium (e.g., a hard disk, random access memory, read-only memory, etc.) storing instructions that, when executed by (i.e., as a result of being executed by) the server's processor, enable the server to perform its desired functions.
[0128] In one embodiment, the environment is a distributed and / or virtual computing environment utilizing several computer systems and components interconnected via communication links, using one or more computer networks or direct connections. However, those skilled in the art will appreciate that such a system may be used in environments having more than Fig.15 The system shown may operate equally well with fewer or more components. Fig.15 The depiction of system 1500 in FIG. 1 should be regarded as illustrative in nature and not limiting the scope of the present disclosure.
[0129] Additionally, various embodiments of the present disclosure may be described in terms of the following:
[0130] 1. A computer-implemented method, the method comprising:
[0131] Under control of one or more computer systems configured with executable instructions, as part of a handshake protocol for establishing a cryptographically protected communication session, obtaining a first message including sender identity information and a first asymmetric public key and a corresponding first asymmetric private key supported by a client for communicating via the cryptographically protected communication session;
[0132] providing the first message, a key identifier, and instructions for generating a first authentication message corresponding to the first message to a cryptographic service, wherein the first authentication message can be verified by the client providing the first authentication message to the cryptographic service for verification;
[0133] receiving, from the cryptographic service, the first authentication message corresponding to the first message;
[0134] providing the first authentication message to the client as part of the handshake protocol;
[0135] receiving a second authentication message from the client, the authentication message including at least second sender identity information and a second asymmetric public key;
[0136] verifying the authenticity of the second authentication message using the cryptographic service;
[0137] receiving an indication from the cryptographic service that the second authentication message is authentic;
[0138] As part of the handshake protocol, generating a shared secret using at least the second asymmetric public key and the first asymmetric private key; and
[0139] The cryptographically protected communication session is established with the client using, at least in part, the shared secret, which may also be determined by the client.
[0140] 2. A computer-implemented method as described in clause 1, wherein the first asymmetric public key is an elliptic curve public key Q A , the corresponding private key is the corresponding elliptic curve private key d A , and the second asymmetric public key is an elliptic curve public key Q B , and partly based on the calculation of d A and Q B The shared secret is generated using the elliptic curve point multiplication algorithm.
[0141] 3. A computer-implemented method as described in clause 1 or 2, wherein:
[0142] The instructions for generating the first authentication message corresponding to the first message include requesting, from the cryptographic service, generation of a message authentication code (MAC) tag based at least in part on the first message; and
[0143] The first authentication message includes the first message and the MAC tag based at least in part on the first message.
[0144] 4. A computer-implemented method as described in any of clauses 1 to 3, wherein the cryptographically protected communication session is a Transport Layer Security (TLS) session.
[0145] 5. A system, comprising:
[0146] one or more processors; and
[0147] a memory storing executable instructions that, when executed by the one or more processors, cause the system to:
[0148] Obtaining from a cryptographic service that the binding between the public key and the sender's identity is a true indication;
[0149] providing, as part of a handshake protocol, to a client said public key bound to said sender identity and said indication that said binding is authentic;
[0150] receiving a second public key from the client;
[0151] generating a shared secret using at least the private key and the second public key; and
[0152] A cryptographically protected communication session is established with the client using the shared secret.
[0153] 6. A system as described in clause 5, wherein:
[0154] the second public key is bound via a second binding to a second sender identity and a second indication cryptographically verifiable by the cryptographic service; and
[0155] The instructions also cause the system to:
[0156] verifying, using the cryptographic service, that the second binding is authentic; and
[0157] Responsive to successfully verifying that the second binding is authentic, generating the shared secret.
[0158] 7. A system as described in clause 5 or 6, wherein the asymmetric key pair comprises an elliptic curve public key Q A and the corresponding elliptic curve private key d A The second public key is an elliptic curve key pair Q B , and partly based on the calculation of d A and Q B The shared secret is generated using the elliptic curve point multiplication algorithm.
[0159] 8. A system as described in clause 6, wherein:
[0160] The system binds the public key to the sender identity by generating at least a message including the public key and the sender identity;
[0161] the system obtaining the indication that the binding is authentic by obtaining a key identifier and requesting the cryptographic service to generate a message authentication code (MAC) tag on the message using a cryptographic key associated with the key identifier;
[0162] The second indication includes a second MAC tag; and
[0163] The verifying that the second binding is authentic includes providing the second MAC tag and the second binding to the cryptographic service.
[0164] 9. A system as described in clause 6, wherein:
[0165] The system binding the public key to the sender identity includes generating a message including the public key and the sender identity;
[0166] the system obtaining the indication that the binding is authentic by obtaining a key identifier and requesting the cryptographic service to encrypt the message using a cryptographic key associated with the key identifier;
[0167] The second indication includes ciphertext; and
[0168] The system also includes instructions for verifying that the second binding is authentic by:
[0169] providing the ciphertext to the cryptographic service for decryption;
[0170] receiving, from the cryptographic service, plaintext corresponding to the ciphertext and a second key identifier; and
[0171] It is determined that the second key identifier is associated with the client.
[0172] 10. The system of clause 9, wherein:
[0173] The message also includes a random number; and
[0174] The system also includes instructions for verifying that the second binding is authentic to determine that the plaintext corresponding to the ciphertext includes the random number.
[0175] 11. A system as described in any of clauses 5 to 10, wherein the instructions further cause the system to obtain data after establishing the cryptographically protected communication session, generate a digital signature on the data using the private key, and transmit the data and the digital signature to the client via the cryptographically protected communication session.
[0176] 12. The system of any one of clauses 5 to 11, wherein the cryptographically protected communication session is a Transport Layer Security (TLS) session.
[0177] 13. A non-transitory computer-readable storage medium having executable instructions stored thereon, the instructions, when executed by one or more processors of a computer system, causing the computer system to at least:
[0178] Obtain an asymmetric key pair including a private key and a public key;
[0179] As part of the handshake protocol, providing the public key to the client;
[0180] receiving from the client a second public key bound to a second sender identity and a second indication via a second binding, wherein the second indication is cryptographically verifiable via a cryptographic service;
[0181] verifying, using the cryptographic service, that the second binding is authentic;
[0182] In response to determining that the second binding is authentic, generating a shared secret using at least the private key and the second public key; and
[0183] A cryptographically protected communication session is established with the client.
[0184] 14. The non-transitory computer-readable storage medium of clause 13, wherein the executable instructions further cause the computer system to:
[0185] obtaining from the cryptographic service an indication that the binding between the public key and the sender identity is authentic;
[0186] providing said indication to the client that said binding is genuine as part of the handshake protocol; and
[0187] Wherein the public key provided to the client is bound to the sender identity.
[0188] 15. The non-transitory computer-readable storage medium of clause 13 or 14, wherein the asymmetric key pair comprises an elliptic curve public key Q A , and the corresponding elliptic curve private key d A The second asymmetric public key is an elliptic curve key pair Q B .
[0189] 16. The non-transitory computer-readable storage medium of clause 14, wherein:
[0190] The system binding the public key to the sender identity includes generating a message including the public key and the sender identity;
[0191] the system obtaining the indication that the binding is authentic via instructions to obtain a key identifier and request the cryptographic service to generate a message authentication code (MAC) tag on the message using a cryptographic key associated with the key identifier;
[0192] The second indication includes a second MAC tag; and
[0193] The system verifies that the second binding is authentic via providing the cryptographic service with instructions for the second MAC tag and the second binding.
[0194] 17. The non-transitory computer-readable storage medium of clause 14, wherein:
[0195] Binding the public key to the sender identity comprises generating a message comprising the public key and the sender identity;
[0196] Obtaining the indication that the binding is authentic comprises obtaining a key identifier and requesting the cryptographic service to encrypt the message using a cryptographic key associated with the key identifier;
[0197] The second indication includes ciphertext; and
[0198] The verifying that the second binding is authentic comprises:
[0199] providing the ciphertext to the cryptographic service for decryption;
[0200] receiving, from the cryptographic service, plaintext corresponding to the ciphertext and a second key identifier; and
[0201] It is determined that the second key identifier is associated with the client.
[0202] 18. The non-transitory computer-readable storage medium of clause 17, wherein:
[0203] The message also includes a timestamp; and
[0204] The verifying that the second binding is authentic further comprises determining that the plaintext corresponding to the ciphertext includes the timestamp.
[0205] 19. The non-transitory computer-readable storage medium of clause 14, wherein the encryption request is an authenticated encryption request.
[0206] 20. The non-transitory computer-readable storage medium of any of clauses 13 to 19, wherein the cryptographically protected communication session is a Transport Layer Security (TLS) session.
[0207] 21. A system, comprising:
[0208] A first computer system, the first computer system comprising:
[0209] first one or more processors; and
[0210] a first memory storing executable instructions that, when executed by the first one or more processors, cause the first computer system to:
[0211] generating a first ciphertext based at least in part on the message by obtaining a cryptographic data key and encrypting at least the message using the data key;
[0212] generating a digitally signed payload, the digitally signed payload comprising the first ciphertext and a digital signature generated using at least the first ciphertext and a private key; and
[0213] obtaining an authenticated payload comprising a second ciphertext based at least in part on the data key, a public key corresponding to the private key, and an authentication tag verifiable using data comprising at least the data key and the public key; and
[0214] A second computer system, the second computer system comprising:
[0215] a second one or more processors; and
[0216] a second memory storing executable instructions that, when executed by the second one or more processors, cause the second computer system to:
[0217] receiving the digitally signed payload and the authenticated payload;
[0218] obtaining the data key and the key identifier based on at least the second ciphertext, the public key, and the authentication tag;
[0219] verifying that the key identifier matches an expected key identifier associated with the first computer system and that the digital signature is valid; and
[0220] The message is obtained by decrypting the first ciphertext using the data key.
[0221] 22. A system as described in clause 21, wherein:
[0222] Obtaining the second ciphertext is also based on additional authentication data;
[0223] The generated authenticated payload also includes the additional authentication data; and
[0224] Obtaining the data key and the key identifier is also based on the additional authentication data.
[0225] 23. A system as described in clause 21 or 22, wherein:
[0226] Generating the first ciphertext is based on encrypting at least the message and the public key; and
[0227] The second memory further stores executable instructions that cause the second computer system to obtain the public key based on at least the second ciphertext and the authentication tag.
[0228] 24. The system of any one of clauses 21 to 23, wherein the private key is an elliptic curve private key and the public key is an elliptic curve public key.
[0229] 25. A computer-implemented method, the method comprising:
[0230] Under the control of one or more computer systems configured with executable instructions,
[0231] generating a first ciphertext based at least in part on the message by obtaining a cryptographic data key and encrypting at least the message using the data key;
[0232] generating, using an asymmetric private key, a digital signature based at least in part on the first ciphertext;
[0233] generating a digitally signed payload including at least the first ciphertext and the digital signature;
[0234] requesting authenticated encryption from a cryptographic service by providing at least the cryptographic data key and an asymmetric public key corresponding to the asymmetric private key, wherein at least the cryptographic data key is indicated as being to be encrypted;
[0235] receiving, in response to said request for said authenticated encryption, a second ciphertext and an authentication tag;
[0236] generating an authenticated payload including at least the second ciphertext, the asymmetric public key, and the authentication tag; and
[0237] Another computer system is enabled to obtain at least the digitally signed payload and the authenticated payload.
[0238] 26. The computer-implemented method of clause 25, wherein:
[0239] Requesting the authenticated encryption further comprises providing additional authentication data; and
[0240] The authenticated payload also includes the additional authentication data.
[0241] 27. The computer-implemented method of clause 25 or 26, wherein the asymmetric private key is an elliptic curve private key and the asymmetric public key is an elliptic curve public key.
[0242] 28. The computer-implemented method of any of clauses 25 to 27, wherein a network API request is used to request the authenticated encryption.
[0243] 29. The computer-implemented method of any of clauses 25 to 28, wherein requesting the cryptographic service to perform the authenticated encryption further comprises indicating that the asymmetric public key is to be encrypted.
[0244] 30. The computer-implemented method of clause 26, wherein requesting the authenticated encryption further comprises providing a random number.
[0245] 31. The computer-implemented method of clause 30, wherein the authenticated encryption is AES-CCM or AES-GCM encryption.
[0246] 32. A computer-implemented method as described in any of clauses 25 to 31, wherein at least the digitally signed payload and the authenticated payload are made available by transmitting the digitally signed payload and the authenticated payload in one or more TCP packets.
[0247] 33. The computer-implemented method of any of clauses 25 to 32, wherein a network API request is used to obtain the cryptographic data key from the cryptographic service.
[0248] 34. A non-transitory computer-readable storage medium having executable instructions stored thereon, the instructions, when executed by one or more processors of a computer system, causing the computer system to at least:
[0249] A protected message is received, the protected message comprising:
[0250] a digitally signed payload, the digitally signed payload further comprising a first ciphertext and a digital signature on the first ciphertext; and
[0251] an authenticated payload, the authenticated payload further comprising a second ciphertext, an asymmetric public key, and an authentication tag;
[0252] requesting authenticated decryption of the second ciphertext from a cryptographic service by providing at least the second ciphertext, the asymmetric public key, and the authentication tag;
[0253] receiving at least a cryptographic data key and a key identifier in response to said request for said authenticated decryption;
[0254] verifying that the key identifier matches an expected key identifier associated with an expected client and that the digital signature of the digitally signed payload is valid; and
[0255] A message is obtained by decrypting the first ciphertext of the digitally signed payload using the cryptographic data key.
[0256] 35. The non-transitory computer-readable storage medium of clause 34, wherein the asymmetric public key is an elliptic curve public key.
[0257] 36. The non-transitory computer-readable storage medium of clause 34 or 35, wherein the protected message further comprises the asymmetric public key.
[0258] 37. The non-transitory computer-readable storage medium of any of clauses 34 to 36, wherein a network API request is used to request the authenticated decryption.
[0259] 38. Non-transitory computer-readable storage media as described in any of clauses 34 to 37, wherein the instructions also include instructions that, as a result of being executed by the one or more processors, cause the computer system to perform the following operations: in response to the request for the authentication decryption, receive at least the cryptographic data key, the asymmetric public key, and the key identifier.
[0260] 39. The non-transitory computer-readable storage medium of any of clauses 34 to 38, wherein the cryptographic data key is a symmetric cryptographic key.
[0261] 40. The non-transitory computer-readable storage medium of any one of clauses 34 to 39, wherein:
[0262] obtaining the message after the digital signature is verified;
[0263] verifying the digital signature after receiving at least the cryptographic data key and the key identifier; and
[0264] The digital signature is verified after verifying that the key identifier matches the expected key identifier associated with the expected client.
[0265] 41. The non-transitory computer-readable storage medium of any of clauses 34 to 40, wherein the protected message is received as part of one or more TCP packets.
[0266] Each embodiment can further be implemented in a wide range of operating environments, in some cases, the environment may include one or more user computers, computing devices or processing devices that can be used to operate any of a plurality of applications. A user or client device may include any of a plurality of computers, such as a desktop computer, a laptop computer or a tablet computer running a standard operating system, and a cellular device, a wireless device and a handheld device running mobile software and capable of supporting a plurality of network connection protocols and message delivery protocols. Such a system may also include a plurality of workstations, which run a variety of commercially available operating systems and any of other known applications for purposes such as development and database management. These devices may also include other electronic devices, such as virtual terminals, thin clients, gaming systems and other devices capable of communicating via a network. These devices may also include virtual devices, such as virtual machines, hypervisors and other virtual devices capable of communicating via a network.
[0267] Various embodiments of the present disclosure utilize at least one network with which those skilled in the art will be familiar to support communications using any of a variety of commercially available protocols, such as the Transmission Control Protocol / Internet Protocol ("TCP / IP"), the User Datagram Protocol ("UDP"), protocols operating in various layers of the Open Systems Interconnection ("OSI") model, the File Transfer Protocol ("FTP"), the Universal Plug and Play ("UPnP"), the Network File System ("NFS"), the Common Internet File System ("CIFS"), and AppleTalk. The network may be, for example, a local area network, a wide area network, a virtual private network, the Internet, an intranet, an extranet, a public switched telephone network, an infrared network, a wireless network, a satellite network, and any combination thereof. In some embodiments, a connection-oriented protocol may be used to communicate between network endpoints. A connection-oriented protocol (sometimes referred to as a connection-based protocol) is capable of transmitting data in an ordered stream. A connection-oriented protocol may be reliable or unreliable. For example, the TCP protocol is a reliable connection-oriented protocol. Asynchronous Transfer Mode ("ATM") and frame relay are unreliable connection-oriented protocols. Connection-oriented protocols are in contrast to packet-oriented protocols such as UDP, which transmit packets without guaranteed ordering.
[0268] In embodiments utilizing a web server, the web server can run any of a variety of server or middle-tier applications, including a Hypertext Transfer Protocol ("HTTP") server, an FTP server, a Common Gateway Interface ("CGI") server, a data server, a Java server, an Apache server, and a business application server. The server can also respond to requests from user devices, such as by executing a program that can be implemented in any programming language (such as C, C# or C++) or any scripting language (such as Ruby, PHP, Perl, Python or TCL) and their combinations to execute programs or scripts. The server may also include a database server, including but not limited to database servers that can be accessed from and Commercially available servers as well as open source servers such as MySQL, Postgres, SQLite, MongoDB, and any other server capable of storing, retrieving, and accessing structured or unstructured data. The database servers may include table-based servers, document-based servers, unstructured servers, relational servers, non-relational servers, or a combination of these and / or other database servers.
[0269] The environment may include a variety of data storages and other storage and storage media as discussed above. These may reside in a variety of locations, such as on one or more local (and / or resident in one or more of the computer) storage media, or across a network away from any or all of the computers. In a specific set of embodiments, information may reside in a storage area network ("SAN") familiar to those skilled in the art. Similarly, any necessary files for performing functions belonging to a computer, server, or other network device may be stored locally or remotely when appropriate. In the case where the system includes a computerized device, each such device may include hardware elements that may be electrically coupled via a bus, including, for example, at least one central processing unit ("CPU" or "processor"), at least one input device (e.g., a mouse, keyboard, controller, touch screen, or keypad), and at least one output device (e.g., a display device, printer, or speaker). Such a system may also include one or more storage devices, such as hard disk drives, optical storage devices, and solid-state storage devices such as random access memory ("RAM") or read-only memory ("ROM"), as well as removable media devices, memory cards, flash memory cards, etc.
[0270] Such devices may also include a computer-readable storage media reader, a communication device (e.g., a modem, a network card (wireless or wired), an infrared communication device, etc.), and a working memory, as described above. The computer-readable storage media reader may be connected to or configured to receive a computer-readable storage media, which represents a remote, local, fixed and / or removable storage device and a storage medium for temporarily and / or more permanently containing, storing, transmitting and retrieving computer-readable information. The system and various devices will also typically include a plurality of software applications, modules, services or other elements located within at least one working memory device, including an operating system and applications, such as a client application or a web browser. In addition, custom hardware may also be used, and / or specific elements may be implemented in hardware, software (including portable software, such as applets), or both. In addition, connections to other computing devices such as network input / output devices may be employed.
[0271] Storage media and computer-readable media for containing code or a portion of code may include any suitable media known or used in the art, including storage media and communication media, such as but not limited to volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing and / or transmitting information (such as computer-readable instructions, data structures, program modules or other data), including RAM, ROM, electrically erasable programmable read-only memory ("EEPROM"), flash memory or other memory technology, compact disk read-only memory ("CD-ROM"), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tapes, magnetic disk storage or other magnetic storage devices, or any other media that can be used to store the desired information and can be accessed by the system device. Based on the disclosure and teachings provided herein, those skilled in the art will understand other ways and / or methods to implement various embodiments.
[0272] Accordingly, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense.It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention as set forth in the claims.
[0273] Other variations are within the spirit of the present disclosure. Therefore, although the disclosed technology is susceptible to various modifications and alternative constructions, certain illustrated embodiments thereof have been shown in the drawings and described in detail above. However, it should be understood that it is not intended to limit the invention to the specific forms disclosed, but rather, the invention is intended to cover all modifications, alternative constructions and equivalents that fall within the spirit and scope of the invention as defined by the appended claims.
[0274] In the context of describing the disclosed embodiments (especially in the context of the attached claims), unless otherwise indicated herein or clearly contradicted by the context, the use of the terms "one" and "the" and similar indicators should be interpreted as covering both the singular and the plural. Unless otherwise noted, the terms "include", "have", "include" and "contain" should be interpreted as open terms (i.e., meaning "including but not limited to"). The term "connected" should be interpreted as partially or completely included, attached to or combined together when it is not modified and refers to a physical connection, even if there is an intervening object. Unless otherwise noted herein, the reference to the value range herein is only intended to serve as a simple method of individually referring to each individual value within the range, and each individual value is incorporated into this specification as if it is individually narrated herein. Unless otherwise noted or contradicted by the context, the term "set" (e.g., "item set") or "subset" should be interpreted as a non-empty set including one or more members. Furthermore, unless otherwise noted or contradicted by context, the term "subset" of a corresponding set does not necessarily mean a proper subset of the corresponding set, but a subset and a corresponding set may be equivalent.
[0275] Unless otherwise specifically stated or otherwise clearly contradicted by context, conjunction language such as phrases of the form "at least one of A, B, and C," or "at least one of A, B, and C" is otherwise understood as commonly used context to indicate that an item, term, etc. may be A or B or C, or any non-empty subset of the set of A and B and C. For example, in the illustrative example of a set having three members, the conjunction phrases "at least one of A, B, and C" and "at least one of A, B, and C" refer to any of the following sets: {A}, {B}, {C}, {A,B}, {A,C}, {B,C}, {A,B,C}. Thus, such conjunction language is not generally intended to imply that certain embodiments require various presentations of at least one of A, at least one of B, and at least one of C.
[0276] Unless otherwise indicated herein or otherwise clearly contradictory to the context, the process operations described herein may be performed in any suitable order. The processes described herein (or variations and / or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as codes (e.g., executable instructions, one or more computer programs, or one or more applications) executed on one or more processors together, by hardware or a combination thereof. The code may be stored on a computer-readable storage medium, for example, in the form of a computer program including multiple instructions executable by one or more processors. The computer-readable storage medium may be non-transitory. In some embodiments, the code is stored on a collection of one or more non-transitory computer-readable storage media, one or more non-transitory computer-readable storage media having executable instructions stored thereon, which, when executed by one or more processors of a computer system (i.e., due to being executed by one or more processors), cause the computer system to perform the operations described herein. The collection of non-transitory computer-readable storage media may include a plurality of non-transitory computer-readable storage media, and one or more of the individual non-transitory storage media in the plurality of non-transitory computer-readable storage media may lack all codes, while the plurality of non-transitory computer-readable storage media may store all codes together. Furthermore, in some instances, the executable instructions are executed such that different instructions are executed by different processors. As an illustrative example, a non-transitory computer-readable storage medium may store the instructions. The main CPU may execute some instructions, and the graphics processor unit may execute other instructions. In general, different components of a computer system may have separate processors, and different processors may execute different subsets of the instructions.
[0277] Thus, in some instances, a computer system is configured to implement one or more services that individually or collectively perform the operations of the processes described herein. For example, such a computer system may be configured with applicable hardware and / or software capable of performing the operations. Furthermore, in some instances, a computer system implementing various embodiments of the present disclosure may be a single device, while in other instances, it may be a distributed computer system including multiple devices operating in different ways, such that the distributed computer system performs the operations described herein and such that a single device may not be able to perform all operations.
[0278] The use of any and all examples or exemplary language (e.g., "such as") provided herein is intended only to better illustrate embodiments of the invention and will not impose limitations on the scope of the invention unless otherwise required. Language in this specification should not be construed as indicating any non-claimed element as essential to the practice of the invention.
[0279] Embodiments of the present disclosure are described herein, including the best mode known to the inventor for carrying out the present invention. Variations of those embodiments may become apparent to those skilled in the art after reading the above description. The inventors hope that the skilled person will adopt such variations when appropriate, and the inventors intend to practice the embodiments of the present disclosure in a manner different from that specifically described herein. Therefore, as long as the law permits, the scope of the present disclosure includes all modifications and equivalents of the subject matter recited in the claims attached hereto. In addition, unless otherwise indicated herein or otherwise clearly contradictory to the context, the scope of the present disclosure covers any combination of the above elements in all possible variations thereof.
[0280] All references, including publications, patent applications, and patents, cited herein are hereby incorporated by reference to the same extent as if each reference were individually and specifically indicated to be incorporated by reference and were set forth in its entirety herein.
Claims
1. A system comprising a memory for storing instructions, the instructions being executed by one or more processors to cause the system to perform the following steps: A first set of information is obtained from a partially trusted cryptographic service via a network API request, wherein the first set of information include: an encrypted cryptographic key that can be used to obtain the cryptographic key; and an authentication tag, the validity of which can be cryptographically derived from at least the cryptographic key and the public key; The second set of information is generated by at least the following steps: encrypting data using the cryptographic key to generate a second ciphertext; and generating a digital signature based at least in part on the data using a private key corresponding to the public key, Wherein, the validity of the digital signature can be verified by the public key; The first set of information and the second set of information are provided to another computer system.
2. The system according to claim 1, in: further using at least the additional authentication data to produce a second ciphertext; The first set of information also includes additional authentication data; and Based on the additional authentication data, the cryptographic key and key identifier are obtained.
3. The system according to claim 1, in: further using at least the additional authentication data, generating a first ciphertext; and The system also includes another system, the other system including a second memory to store instructions, the instructions being executed by the second one or more processors to cause the other system to: receiving the first set of information and the second set of information; obtaining the cryptographic key and key identifier based at least in part on the first ciphertext, the public key, and the authentication tag; verifying that the key identifier matches an expected key identifier and that the digital signature is valid; and The second ciphertext is decrypted using the cryptographic key to obtain the data.
4. The system according to claim 1, in, The private key is an elliptic curve private key, and the public key is an elliptic curve public key.
5. A computer-implemented method, include, A first set of information is obtained from a partially trusted cryptographic service, the first set of information comprising: an encrypted cryptographic key that can be used to obtain the cryptographic key; and an authentication tag, the validity of which can be cryptographically derived from at least the cryptographic key and the public key; The second set of information is generated by at least the following steps: encrypting data using the cryptographic key to generate a second ciphertext of the data; and generating a digital signature of at least the data using a private key corresponding to the public key; The first set of information and the second set of information are provided to another computer system.
6. The computer-implemented method of claim 5, in, The first set of information also includes additional authentication data; and Obtaining the first set of information includes: requesting authenticated encryption from the partially trusted cryptographic service by providing at least the cryptographic key, the public key, the additional authentication data, and an indication to use the public key to encrypt the cryptographic key; as well as In response to the request, an encrypted cryptographic key and the authentication tag are received.
7. The computer-implemented method of claim 5, in, The private key is an elliptic curve private key, and the public key is an elliptic curve public key.
8. The computer-implemented method of claim 6, further comprising providing the additional authentication data to the other computer system.
9. The computer-implemented method of claim 6, wherein requesting the authenticated encryption further comprises providing a random number.
10. The computer-implemented method of claim 9, wherein the authenticated encryption is AES-CCM encryption or AES-GCM encryption.
11. The computer-implemented method of claim 5, providing the first set of information and the second set of information comprises sending the first set of information and the second set of information in one or more TCP packets.
12. The computer-implemented method of claim 5, further comprising using a second network API request to obtain the cryptographic data key.
13. A non-transitory computer-readable storage medium having executable instructions stored thereon, the instructions being executed by one or more processors of a computer system to cause the computer system to at least: receiving a first set of information, the first set of information comprising: A cryptographic key that can be used to obtain the encryption of the cryptographic key ; and an authentication tag, the validity of which can be cryptographically derived from at least the cryptographic key and the public key; receiving a second set of information, wherein the second set of information includes: a ciphertext generated by encrypting the data using the cryptographic key; and a digital signature generated at least in part based on the data using a private key corresponding to the public key, the authenticity of the digital signature being verifiable at least in part by the public key; providing the encrypted cryptographic key, the public key, and the authentication tag to a partially trusted cryptographic service via a network API request; receiving, in response, at least the cryptographic key and a key identifier; verifying that the key identifier matches an expected key identifier associated with an expected client, and verifying that the digital signature is valid; and The ciphertext is decrypted using the cryptographic key to obtain plaintext, wherein the partially trusted cryptographic service lacks cryptographic material sufficient to generate the digital signature from the plaintext.
14. The non-transitory computer-readable storage medium of claim 13, in, The public key is an elliptic curve public key.
15. The non-transitory computer-readable storage medium of claim 13, in, The second set of information also includes the public key.
16. The non-transitory computer-readable storage medium of claim 13, in, The instructions for providing the encrypted cryptographic key, the public key, and the authentication tag to the partially trusted cryptographic service and via the network API request include instructions executed by the one or more processors of the computer system to cause the computer system to request authenticated decryption of the encrypted cryptographic key.
17. The non-transitory computer-readable storage medium of claim 13, in, The instructions also include instructions that are executed by the one or more processors to cause the computer system to: in response, receive at least a cryptographic data key, the public key, and the key identifier.
18. The non-transitory computer-readable storage medium of claim 13, in, The cryptographic key is a symmetric cryptographic key.
19. The non-transitory computer-readable storage medium of claim 13, in, Get the message after verifying the digital signature; upon receiving at least the cryptographic key and the key identifier, verifying the digital signature; as well as After verifying that the key identifier matches an expected key identifier associated with an expected client, the digital signature is verified.
20. The non-transitory computer-readable storage medium of claim 13, in, The first set of information or the second set of information is received as part of one or more TCP packets.
21. A system, include: one or more processors; as well as A memory storing computer executable instructions executable to cause the one or more processors to perform the following steps: encrypting the message using a cryptographic key accessible to the second system to produce an encrypted message; Generate a protected message, the protected message comprising: a digital signature generated based on the encrypted message using a private key of an asymmetric key pair, wherein the digital signature can be used to detect modification of the protected message, and the second system cannot access the private key; a public key of the asymmetric key pair; An authentication tag generated based on the public key and the ciphertext of the cryptographic key; and the encrypted message; The protected message is sent to the second system, wherein the second system is capable of detecting whether there is any modification to the protected message based at least in part on determining the validity of an authentication tag generated based on the public key and the ciphertext of the cryptographic key, and verifying the digital signature using the public key, wherein the validity of the authentication tag generated based on the public key and the ciphertext of the cryptographic key is determined by at least using plaintext including the cryptographic key.
22. The system of claim 21, wherein the instructions are executable to further cause the one or more processors to perform the following steps: generating encrypted cryptographic keys; The instructions are executable to further cause the one or more processors to store the encrypted cryptographic key in association with the encrypted message; and The instructions for sending the protected message to the second system include executable instructions for sending to the second system a storage location where the encrypted cryptographic key is stored in association with the encrypted message.
23. The system according to claim 21, in, The system includes the second system, the second system including a second memory for storing instructions, the instructions being executed by a second one or more processors to cause the second system to perform the following steps: obtaining the protected message; obtaining the cryptographic key and key identifier based at least in part on the encrypted message, the public key, and the authentication tag generated from a ciphertext of the public key and the cryptographic key; verifying that the key identifier matches an expected key identifier and that the digital signature is valid; and Using the cryptographic key, the encrypted message is decrypted to obtain the message.
24. The system according to claim 21, in, The validity of the authentication tag generated based on the public key and the ciphertext of the cryptographic key is determined at least in part based on a comparison between the authentication tag generated based on the public key and the ciphertext of the cryptographic key and an authentication tag, wherein the authentication tag is generated by plain text, and the plain text includes the cryptographic key.
25. A computer-implemented method, include: A first set of information is obtained at a first computing entity from a second computing entity, the first set of information comprising: an encrypted cryptographic key that can be used to obtain the cryptographic key; and an authentication tag, the validity of which can be cryptographically derived from at least the cryptographic key and the public key; The second set of information is generated by at least the following steps: encrypting data using the cryptographic key to generate a ciphertext of the data; using a private key corresponding to the public key to generate a digital signature of at least the data; and generating a certificate encoding the public key and a ciphertext of the cryptographic key; The first set of information and the second set of information are sent to a third computing entity computer system, wherein the first set of information and the second set of information are collectively sufficient for the third computing entity to determine whether the second set of information has been modified by at least determining whether the plain text of the cryptographic key is associated with the first computing entity.
26. The computer-implemented method of claim 25, in: The second computing entity is a partially trusted cryptographic service; and The first computing entity is a client computer system of a partially trusted cryptographic service.
27. The computer-implemented method of claim 25, in: The first set of information also includes additional authentication data; and Obtaining the first set of information includes: submitting a request to the second computing entity to perform authenticated encryption by sending at least the cryptographic key, the public key, the additional authentication data, and an indication to encrypt the cryptographic key using the public key; as well as In response to the request, the encrypted cryptographic key and the authentication tag are obtained.
28. The computer-implemented method of claim 27, wherein submitting the request further comprises sending a random number.
29. The computer-implemented method of claim 25, in: further generating the ciphertext using at least additional authentication data; The first set of information also includes additional authentication data; and Based on the additional authentication data, the cryptographic key and key identifier are obtained.
30. The computer-implemented method of claim 25, in, Sending the first set of information and the second set of information includes sending the first set of information and the second set of information in one or more TCP packets.
31. The computer-implemented method of claim 25, in, The private key and the public key are corresponding keys of an elliptic curve key pair.
32. A non-transitory computer-readable storage medium comprising executable instructions, wherein the executable instructions are executed by one or more processors of a computer system, causing the computer system to perform at least the following steps: Obtain a first set of information, the first set of information include: an encrypted cryptographic key that can be used to obtain the cryptographic key; as well as an authentication tag, the validity of which can be cryptographically derived from at least the cryptographic key and the public key; A second set of information is obtained, wherein the second set of information includes: a ciphertext generated by encrypting the data using the cryptographic key; a digital signature generated at least in part based on the data using a private key corresponding to the public key, the authenticity of the digital signature being verifiable by at least the public key; and An authentication tag generated based on the public key and the ciphertext of the cryptographic key; providing the encrypted cryptographic key, the authentication tag generated based on the public key and the ciphertext of the cryptographic key, and the authentication tag to another computer system; obtaining, in response, at least the cryptographic key, a key identifier, and an indication of authenticity, wherein the indication of authenticity is based at least in part on a comparison between the authentication tag and a second authentication tag, wherein the second authentication tag is generated from plaintext including at least the cryptographic key; verifying that the key identifier matches an expected key identifier associated with an expected client and that the digital signature is valid by at least using the public key to determine whether the second set of information has been inappropriately modified; and The ciphertext is decrypted using the cryptographic key to obtain plaintext.
33. The non-transitory computer-readable storage medium of claim 32, in, The other computer system is a partially trusted cryptographic service that lacks cryptographic material sufficient to generate the digital signature from the plaintext.
34. The non-transitory computer-readable storage medium of claim 32, in: The first set of information also includes additional authentication data; the validity of the authentication tag is cryptographically derivable from at least the cryptographic key, the public key and the additional authentication data; and The instructions also include instructions that are executed by the one or more processors to cause the computer system to provide the additional authentication data to the other computer system.
35. The non-transitory computer-readable storage medium of claim 32, wherein the instructions for providing the encrypted cryptographic key, the public key, and the authentication tag to the other computer system include instructions executed by the one or more processors of the computer system to cause the computer system to request authenticated decryption of the encrypted cryptographic key.
36. The non-transitory computer-readable storage medium of claim 32, wherein the instructions further comprise instructions that are executed by the one or more processors to cause the computer system to responsively obtain at least the cryptographic key, the public key, and the key identifier.
37. The non-transitory computer-readable storage medium of claim 32, in, The second set of information also includes the public key.
38. The non-transitory computer-readable storage medium of claim 32, in: The instruction for verifying that the digital signature is valid is: an instruction for verifying that the obtained key identifier matches the expected key identifier as a result, thereby verifying that the digital signature is valid; and The instructions for decrypting the ciphertext by the cryptographic key to obtain the plaintext are instructions for decrypting the ciphertext using the cryptographic key as a result of verifying that the digital signature is authentic.
