Key Block Enhanced Encapsulation

The key is encrypted and obfuscated through SHA-256 hashing and XOR link technology, which solves the problems of insufficient integrity protection and key length obfuscation in key encapsulation, and significantly improves the security of the key.

CN114629633BActive Publication Date: 2024-10-18INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111441445.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2024-10-18
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

The existing technology lacks effective integrity protection and key length confusion during the key encapsulation process, resulting in insufficient key security and easy attack.

Method used

The SHA-256 hash function and XOR link method are used to encrypt the three parts of the key, and the CMAC is calculated in the control vector to hide the true length of the key, and a pseudo-random function is used to derive the encapsulated key to ensure the key's Integrity and security.

Benefits of technology

By providing key integrity protection and key length obfuscation, the security of the key is significantly improved, preventing the key from being reverse engineered and attacked, and enhancing the security of the key encapsulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114629633B_ABST
    Figure CN114629633B_ABST
Patent Text Reader

Abstract

The present disclosure relates to key block enhanced encapsulation. Aspects of the present invention include providing a transparent key having attributes that control the use of a transparent key. The transparent key includes key data in at least a first 8-byte portion and a second and third 8-byte portion and an encapsulation key for encapsulating the transparent key. The computer-implemented method further includes: chaining the first, second, and third 8-byte portions together with zeros for those 8-byte portions that are not filled into chain key data, deriving an encryption key and an authentication key from the encapsulation key, calculating an authentication code on the transparent key and the attribute using the authentication key, performing encryption on the chain key data using the encryption key to generate encrypted chain key data, and adding the authentication code, the attribute, and the encrypted chain key data to form a key block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention generally relates to key block enhanced wrapping, and more particularly to a key block enhanced wrapping method. Background Art

[0002] Cryptography is the conversion of intelligible information into an apparently incomprehensible form in order to hide the information from unauthorized parties. Cryptography is used for various purposes, such as protecting information transmitted over a communication network. It can also be the most economical way to protect stored data. Cryptographic processes can be used to protect not only the privacy of data, but also the integrity of data.

[0003] Cryptographic transformations of data are usually defined by a chosen algorithm or process under the control of a secret key. Since the algorithm is usually public knowledge, the protection of the transformed or encrypted data depends on the secrecy of the secret key. Therefore, the key must be kept secret to prevent an adversary from simply recovering the encrypted data using a known algorithm and key. Therefore, the protection of the data depends on the protection of the secret key. Summary of the invention

[0004] Embodiments of the present invention relate to a computer-implemented method of enhanced key encapsulation. A non-limiting example of a computer-implemented method includes providing a clear key having an attribute that controls the use of a clear key. The clear key includes key data in at least a first 8-byte portion and a second and third 8-byte portion and an encapsulation key for encapsulating the clear key. The computer-implemented method further includes: chaining the first, second, and third 8-byte portions together with zeros for those 8-byte portions that are not filled into the chain key data, deriving encryption and authentication keys from the encapsulation key, calculating an authentication code for the clear key and the attribute using the authentication key, performing encryption on the chain key data using the encryption key to generate encrypted chain key data, and adding the authentication code, the attribute, and the encrypted chain key data to form a key block.

[0005] Other embodiments of the present invention implement the features of the above-described methods in computer systems and computer program products.

[0006] Additional technical features and benefits are achieved through the technology of the present invention. Embodiments and aspects of the present invention are described in detail herein, and these embodiments and aspects are considered to be part of the claimed subject matter. For a better understanding, reference is made to the specific implementation and the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] The details of the exclusive rights described herein are particularly pointed out and distinctly claimed in the claims at the end of the specification. The foregoing and other features and advantages of the embodiments of the present invention are apparent from the following detailed description taken in conjunction with the accompanying drawings, in which:

[0008] Figure 1 Depicted are Common Cryptography Architecture (CCA) key tokens and Advanced Encryption Standard (AES) key wrapping (AESKW) key tokens for AES key wrapping of CCA key tokens according to one or more embodiments of the present invention;

[0009] Figure 2 Described is a system for key encapsulation of a CCA key token in accordance with one or more embodiments of the present invention;

[0010] Figure 3A -B depicts an AESKW encapsulation and decapsulation functional system for AES key encapsulation of a CCA key token according to one or more embodiments of the present invention;

[0011] Figure 4 is a graphical flow chart depicting a method of enhanced key encapsulation according to one or more embodiments of the present invention;

[0012] Figure 5 is a flow chart illustrating a method of enhanced key encapsulation according to one or more embodiments of the present invention;

[0013] Figure 6 is a flowchart describing a method of enhanced key decapsulation according to one or more embodiments of the present invention; and

[0014] Figure 7 A computer system is depicted that implements one or more embodiments of the present invention.

[0015] The figures described herein are illustrative. Without departing from the spirit of the present invention, many changes may be made to these figures or the operations described therein. For example, these actions may be performed in different orders, or actions may be added, deleted or modified. Similarly, the term "coupling" and its variants describe having a communication path between two elements and do not imply a direct connection between these elements, without an intermediate element / connection between them. All these changes are considered as a part of the specification. DETAILED DESCRIPTION

[0016] One or more embodiments of the present invention provide a system in which a key block and encapsulation method are enhanced with integrity checking and key obfuscation. The integrity check involves the offset of a 64-byte structure that now has an 8-byte triple data encryption standard ciphertext-based message authentication code (TDES-CMAC). Key obfuscation is characterized in that all three parts of the key block used to store the 8-byte portion of the encrypted key material are always filled with encrypted data, thereby hiding the true length of the key. The encapsulation method is characterized in that the control vector is no longer XORed into the encapsulation key, the CMAC is calculated on all bytes of the key block with transparent key material as an integrity check, and then placed at offset 40, the three parts of the key are linked together using SHA-256 and XOR, and the three parts of the key are always encrypted and then always placed back into the token using 24 bytes of space.

[0017] As a review, a control vector is a data structure that includes one or more fields of predefined values ​​that collectively describe the intended use of the cryptographic key associated with it. The control vector is specified by the key initiator at key creation time. In a public encryption architecture (CCA) key token, key attributes are stored in an unencrypted control vector. The CCA key can be encapsulated using different types of encryption (e.g., AES key encapsulation (AESKW)) to produce an AESKW key token that holds the CCA key and its attributes. AESKW is defined in the American National Standards Institute (ANSI) standard X9.102. In the resulting AESKW key token, some attributes that are not encrypted in the control vector portion of the CCA key token are moved to the encrypted portion of the AESKW key token. These attributes are split from the control vector so that some attributes from the control vector are bound to the key but not encrypted, while other attributes are encrypted with the key itself. In different embodiments, any appropriate type of encryption can be used to encapsulate the CCA key.

[0018] The key is typically encrypted when it is outside of a protected environment. The encrypted key is carried in a protected data structure called a key token or key block (hereinafter referred to as a key token). The AESKW key token contains two parts: the key data, which is encrypted to keep the key secret; and attributes, which are cryptographically bound to the key to protect from changes, but are not encrypted and do not need to be secret. The CCA key token includes a control vector that is bound but not encrypted, a flag part that is neither encrypted nor bound, and the encrypted key data.

[0019] In various embodiments, a traditional CCA key (which may include a Data Encryption Standard (DES) key or a double-length or triple-length Triple DES (TDES) key) may be exported to an AES-protected token for transmission, and the AES-protected token may be imported into a TDES format for use on a receiving system. The CCA key at the receiving system corresponds to the CCA key on the sending system; the keys and attributes in the CCA key on the imported system may be the same as the CCA key on the exporting system, except for system-dependent values. When encryption is performed using symmetric key technology, the CCA key is encrypted using other CCA keys, which are referred to as key encryption keys (KEKs). However, the AES encryption algorithm is stronger than TDES, and therefore, encapsulating the traditional CCA key with an AES KEK may be performed to enhance the security of the CCA key.

[0020] For DES or TDES keys, the control vector is a bit sequence of the same length as the key itself, such as 8, 16 bytes. For example, for a 16-byte control vector, the second 8 bytes are the same as the first 8 bytes, except for a field called the key form field, which identifies it as the second part of a double-length (16-byte) control vector. The control vector consists of a number of bit fields of different lengths. Each bit field contains a value indicating the attributes of the key, and the control vector field is checked by the CCA firmware to determine whether the key is eligible for the requested operation. Many bits in the control vector are polymorphic, which means that their definition changes depending on the overall type of key indicated by the fixed definition field in the control vector. Different types of information can be encoded into the control vector of the CCA key, such as key length, and key type and subtype, which define the operation that the key can be used for, such as: encrypting / decrypting data; calculating / verifying message authentication codes; encrypting other keys (KEK); protecting financial personal identification numbers (PINs); deriving other keys; and / or calculating credit card verification values. The export control field in the control vector indicates whether the key can be exported to another system. For most key types, the control vector further includes one or more fields that indicate specific low-level operations that the key can be used for, or specific data formats that the key can be used for. The key length can be indicated by a three-bit key form field in the control vector of the CCA token.

[0021] The AESKW process encrypts the key to be encapsulated, but it does not encrypt the key's associated data. The associated data is cryptographically bound to the key so that any changes can be detected, but the associated data is transmitted in plaintext (unencrypted) form along with the key. As a result, information that could reduce security if its value were disclosed is not placed in the associated data. Attributes that do no harm because they appear in plaintext (and sometimes must be visible without decrypting the key token) are carried in the associated data, while those attributes that must be secret for security reasons are carried in the encrypted payload. During the encapsulation of the CCA key in AESKW form, an indication of the key length is moved from the plaintext control vector in the CCA token and placed in the encrypted payload of the AESKW token. This allows the strength of the encryption key to be hidden while the key is in encrypted token form; because shorter keys are easier to attack, knowing the length of the key will help attackers identify the keys that are easiest to try and break.

[0022] Now go to Figure 1, showing a CCA key token 100 and an AESKW key token 104 for AES key encapsulation of a CCA key. In various embodiments, the CCA key token 100 may include a DES or TDES key, and include key data 101, a control vector 102, and a flag 103. The key data 101 holds the key itself, and is encrypted for transmission to keep the key data 101 secret, but is not encrypted when the CCA key token 100 is stored on a secure system such as a hardware security module (HSM). The control vector 102 holds additional attributes and information about the key in the key data 101 in the CCA key token 100, and is not encrypted for transmission, but is bound to the CCA key token 100 to protect the data in the control vector 102 from being altered. The control vector 102 consists of a first group of fields CV1 102A, which are security-critical and must be kept secret and may include the length of the key, and a second group of fields CV2 102B, which are security-critical and must be protected from alteration, but do not need to be kept secret. The flag 103 is not encrypted or bound and holds non-security critical information about the CCA key token 100. The AESKW key token 104 includes encrypted key data 105, which holds the key itself in addition to other information about the key and is encrypted. The associated data 106 is bound to the AESKW key token 104, but is not encrypted. In order to encapsulate the CCA key token 100 using AES, the key data 101 is encrypted using AES in the encrypted key data 105. The field in CV1 102A in the control vector 102 (which may include, for example, a key length indicator for the CCA key token 100) is encrypted with the key data 101 in the encrypted key data 105. The field in CV2 102B in the control vector 102 is used to create the bound but unencrypted associated data 106. Further, the non-bound flag 103 in the CCA key token 100 is bound to the AESKW key token in the associated data 106. In some embodiments, CV2 102B and flag 103 may also be transmitted from the exporting system to the importing system separately from the AESKW key token 104. In various embodiments, any suitable fields from the control vector 102 may be included in CV1 102A or CV2 102B.

[0023] Additional layout information is available for some embodiments of key data 101, control vector 102, flags 103, encrypted key data 105, and associated data 106. In some embodiments, flags 103 may be 1 byte in size, and therefore eight 1-bit flags may be supported.

[0024] Figure 2An embodiment of a system 200 for AES key encapsulation of a CCA key token is shown. The system 200 includes an export system 201 and an import system 206, each of which may include any suitable type of computer system, including, for example, a processor and a memory. A CCA key token 202A is stored in an HSM 207 on the export system 201, the CCA key token 202A including information about Figure 1 The fields of the CCA key token 100 are shown and include a control vector, such as control vector 102. To derive the CCA key token 202A, the export system 201 encapsulates the CCA key token 202A using a key derivation function 203, which is also located in the HSM 207 and is described below with respect to the AESKW key token 204. Figure 3A The AESKW key token 204 is encrypted for transmission and includes information about Figure 1 The AESKW key token 104 of the export system 201 is received by the import system 206 via the network 209. The import system 206 uses the key import function 205, which is located in the HSM 208 and is described below in detail, to decapsulate the AESKW key token 204 and generate the CCA key token 202B for use on the import system 206. Figure 3B Further detailed discussion. In some embodiments, the CCA key token 202B on the import system 206 is securely stored in the HSM 208 and corresponds to the CCA key token 202A on the export system 201. In other embodiments, the CCA key token 202B is encrypted and stored on the import system 208 outside the HSM 208. The CCA key token 202B can be used, for example, for communication between the export system 201 and the import system 206 or for verification of sensitive data (such as a personal identification number (PIN)) on the import system 206.

[0025] Figure 3A An embodiment of a key derivation function 300A is shown, which may include Figure 2 The key derivation function 203 and see Figure 1 and 2106. In some embodiments, the key derivation function 300A may be implemented in the HSM 207 in the derivation system 201. The key derivation function 300A receives the unencrypted key data 101 and CV1 102A as the key and CV1 303 from the control vector 102 in the CCA key token 100 / 202. CV2 102B and the flag 103 are received by the key derivation function 300A as CV2 and the flag 301, and the hash of CV2 and the flag 301 is input from the hash function 302 into the AESKW package 304. In some embodiments, the hash function 302 may use a secure hash algorithm (SHA)-256 hash function to compress the CV2 and the flag 301, thereby providing a value that is short enough for input to the AESKW package 304. In some embodiments, the hash function 302 may be omitted, and the CV2 and the flag 301 may be directly input into the AESKW package 304 to create the associated data 106. The key and CV1 303 are encrypted by AESKW encapsulation 304 using AES KEK 305 to generate encrypted key data 105 that encapsulates the key block 306. The encrypted key data includes: Figure 1 . CV2 and flag 301 are not encrypted, but a hash of CV2 and flag 301 is included in the encapsulation key block 306 as associated data 106. CV2 and flag 301 are also bound to the encapsulation key block 306 by including binding information in the encapsulation key block 306. CV2 and flag 301 are also transmitted from the exporting system 201 to the importing system 206 as unencrypted plaintext along with the encapsulation key block 306. The binding of CV2 and flag 301 to the encapsulation key block 306 ensures that any changes in CV2 and flag 301, which may have occurred, for example, during transmission, will be detected.

[0026] Figure 3B An embodiment of a key import function 300B is shown, which may include Figure 2 The key import function 205 and about Figure 1 and Figure 2306 . In some embodiments, the key import function 300B may be implemented in the HSM 208 in the import system 206. The key import function 300B receives the AESKW key token 104 / 204 including the encapsulation key block 306, and the plaintext CV2 and flag 301 including the associated data 106. The CV2 and flag 301 are hashed by the hash function 307 and input to the AESKW decapsulation 308 together with the encapsulation key block 306. The hash function 307 may be omitted, and the CV2 and flag 301 may be directly input to the AESKW decapsulation 308. The encapsulation key block 306 is decrypted by the AESKW decapsulation 308 using the AES KEK 309 and output as the key and CV1 303. The AESKW decapsulation 308 also determines whether the CV2 and flag 301 have been changed during transmission based on the hash of the CV2 and flag 301 and the binding information included in the encapsulation key block 306. If it is determined that CV2 and flag 301 have not been changed, a valid flag is output at valid / invalid output 310, and the received key can be used by import system 206; otherwise, an invalid flag is output at valid / invalid output 310, and the received key is not used; in some embodiments, AESKW decapsulation 308 may not output key and CV1 303 based on the invalid flag. The key portion of key and CV1 303 includes Figure 1 The unencrypted key data 101; CV1 (from the key and CV1 303) and CV2 (from CV2 and the flag 301) together include Figure 1 The control vector 102, and the flags from CV2 and flag 301 include the flag 103 of the CCA key token 100 / 202.

[0027] It has been seen that in some cases, the integrity protection of the CV may be lacking and the key length cannot be obfuscated.

[0028] One or more embodiments of the present invention address one or more of the above-mentioned shortcomings of the prior art by providing an enhanced key wrapping (WRAPENH3) method that provides integrity protection and key length obfuscation of CV.

[0029] The following sections will refer to the DES key token structure, which is shown with updates for WRAPENH3.

[0030]

[0031]

[0032]

[0033]

[0034] The CCA cryptographic commands form a complete, consistent and secure command set that executes within tamper-resistant hardware. The cryptographic commands use a set of different DES key types that provide a secure cryptographic system that resists many attacks that can be directed against it. The CCA implementation uses control vectors to separate fixed-length DES keys into different key types and further restrict the use of the keys. A control vector is a non-secret value that is carried in plain text in a DES / TDES key token along with the encryption key it specifies.

[0035] The CV is cryptographically associated with the DES / TDES key through the key block encapsulation method. This permanently binds the CV to the key encapsulated in the key block. Any changes to the original control vector will result in an error returned from the integrity check process of the decapsulation process.

[0036] After the DES key is encrypted, the originator of the key can ensure that the intended use of the key is preserved by only giving the key encryption keys to systems that implement the CCA control vector design and are managed by the auditing organization.

[0037] The DES control vector is checked before processing the cipher command.

[0038] Before the CCA cryptographic facility processes a command that uses a DES / TDES key, the facility's logic checks the control vector associated with the key. The control vector must indicate a valid key type for the requested command, and any control vector restriction (key usage) bits must be set appropriately for the command. If the command allows the use of the control vector, the cryptographic facility decapsulates the key and uses the key to process the command.

[0039] The control vector has sections for these purposes: General Key Management and Key Type and Key Usage Control. For General Key Management, these bytes have control bits that apply to multiple key types (such as import / export of keys). For Key Type and Key Usage Control, these bytes indicate what services and operations the key can be used for.

[0040] Common Key Management CV Bytes

[0041] The XPRTCPAC bit (bit 59) controls the export of TDEA keys using services within the system, and defaults to '0' which does not allow export. Note the numbering 'Byte 0 ... Byte 7' at the top. The breakdown of each byte for key type and usage is generally: Byte 0: calculation / method bits, applicable to some key types, Byte 1: key type and subtype, Byte 2: usage or service control bits, and export control, and the bits in positions 16-22 and 33-37 generally have different meanings for each key class.

[0042] Key type / key usage CV bytes

[0043] The following table shows the default CV byte settings for the key type when it is generated or imported. The left and right halves are depicted.

[0044]

[0045]

[0046]

[0047] Packaging Operation

[0048] See also Figure 4 , WRAPENH3 processing includes the following operations: concatenation of key data (1), wrapping key derivation (2), TDES-CMAC key derivation (3), TDES-CMAC calculation (4), and CBC encryption of the key (5). The wrapping key and TDES-CMAC key derivation operations use a unique 16-tag as input to the key derivation function. Concatenation of key data involves using SHA-256 as the hash function for WRAPENH3. The TDES-CMAC calculation involves calculating the TDES-CMAC on the full key block using the derived CMAC key placed in the CV2 field.

[0049] Figure 4 A link to the key data of operation (1).

[0050] The keys to be wrapped (*K) are chained from right to left to create the key to be wrapped (*KC).

[0051] 1. Processing

[0052] a. The key is always wrapped as a 168-bit key

[0053] i. Keys shorter than 168 bits are padded to the right with 0x00 bytes.

[0054] b.K3C=K3

[0055] c.K2C=K2^hash(K3)

[0056] i. Ensure that K2 and K3 parity are adjusted

[0057] d.K1C=K1^hash(K2)

[0058] i. Ensure that K1 parity is adjusted

[0059] e.*KC=K1C||K2C||K3C

[0060] 2. Among them:

[0061] a.^ means bitwise XOR

[0062] b.|| indicates cascade

[0063] c.hash is a hash function that depends on the algorithm

[0064] i.For WRAPENH3: hash = SHA-256

[0065] Figure 4 The encapsulation key is derived from operation (2).

[0066] The derived encapsulation key is input to the encapsulation process for the target key token. The derived encapsulation key is derived by a derivation process utilizing a 16-byte string unique to the implemented key hierarchy. For WRAPENH3, the encapsulation key derivation tag is a unique 16-byte tag. The key is derived using the method defined in the National Institute of Standards and Technology (NIST) Standard SP 800-108, Recommendation for Key Derivation Using Pseudo-Random Functions (October 2009). The derivation will use the pseudo-random function (PRF) HMAC-SHA256 using method KDF in counter mode. The (PRF) HMAC-SHA256 algorithm provides sufficient strength to derive keys for any algorithm used. The HMAC algorithm is defined as:

[0067] a.HMAC(K,text) = H((K0 XOR opad)||H((K0 XOR ipad)||text))

[0068] b. Among them:

[0069] iH is an approved hash function.

[0070] ii. K is a secret key shared between the initiator and the intended recipient.

[0071] iii. The K0 key K forms a key of appropriate length after any necessary preprocessing.

[0072] iv.ipad is a constant X'36' that is repeated to form a string of the same length as K0

[0073] v.opad is the constant X'5C' that is repeated to form a string of the same length as K0 text, which is the text to be hashed.

[0074] vi.|| indicates cascade

[0075] vii.XOR stands for bitwise exclusive OR

[0076] c. If the key K is equal in length to the input block size of the hash function (512 bits for SHA-256), then K0 is set to the value of K. Otherwise, K0 is formed from K by hashing or padding.

[0077] The NIST Key Derivation Function (KDF) specification requires the optional input of two byte strings, a tag and a context. The context will not be used. Because the security of the derivation process derives from the security of the derived key and the HMAC and the Key Derivation Function (KDF) itself, this tag string does not have to have any specific minimum size. A separation indicator byte of X'00' as specified in the NIST document will follow the tag.

[0078] a. The tag used is specific to the encapsulation method used in the token.

[0079] b. The parameters for the counter mode KDF defined in NIST standard SP 800-108 are:

[0080] i. Fixed value:

[0081] 1.h PRF output length, 256 bits

[0082] 2.r The length of the counter in bits, 32. The counter will be an unsigned 4-byte value.

[0083] ii. Input:

[0084] 1. KI (Entry Key) - The key from which it is derived. This is the Entry Master Key or KEK.

[0085] 2. Labels - mapped to KDF values ​​as shown above

[0086] 3. Delimiter byte – X'00' after the tag value.

[0087] 4.Context - Empty string. No context is used.

[0088] 5. L - the length of the derived key to be generated, rounded to the next multiple of 256.

[0089] 6.PRF-HMAC-SHA256.

[0090] Figure 4 Operation (3) of TDES-CMAC.

[0091] The derived TDES-CMAC key is used to create a TDES-CMAC on the target key token. This operation is the same as the WRAPENH3 "wrapping key derivation", with a different derivation tag. The wrapping key and the TDES-CMAC key are not allowed to be related except through an irreversible process. The derivation process utilizes a 16-byte string that is unique to the key hierarchy being implemented. For WRAPENH3, the TDES-CMAC key derivation tag is a unique 16-byte tag.

[0092] Figure 4 Operation (4) of TDES-CMAC calculation.

[0093] Calculate TDES-CMAC on the completed key block and place it in the CV2 position (offset 40). Process as follows:

[0094] 1. Fill in the key block with the following

[0095] a.Normal value, used for:

[0096] i.tokenFlag,

[0097] ii.reserved1,

[0098] iii.Oldmkvp,

[0099] iv.version(0x00),

[0100] v.reserved2,

[0101] vi.flags,

[0102] vii.mkvp,

[0103] b. Set to 0x00

[0104] i.CV2 / CMAC field,

[0105] ii. tokenmarks,

[0106] iii.tvv

[0107] c.flags2 has '3', binary '011', in bits 0-2 and 0b0 in the remaining bits

[0108] d.CV1 is in place, but the key pattern is set to '011' in all cases

[0109] e. The transparent key value is as follows

[0110] i.K1,

[0111] ii. K2 in position K2 (or a byte of 0 for a single-length key)

[0112] 1. Never set K2 = K1 when storing a double-length key, which weakens the key because K1 and K2 cancel each other out, turning what appears to be a double-length key into an actual single-length key

[0113] iii. K3 in position K3 (or a byte of 0 for single or double length keys)

[0114] 2. Compute an 8-byte TDES-CMAC over the full key block using the derived CMAC key from the “TDES-CMAC Key Derivation” step.

[0115] 3. Place 8 bytes of TDES-CMAC in the CV2 field

[0116] Figure 4 CBC encryption of the key of operation (5).

[0117] The encryption of the wrapped key *KEKC and *K proceeds as follows:

[0118] e*KEK(*KC)=ecbc KEK3 (dcbc KEK2 (ecbc KEK1 (K1C||K2C||K3C)))

[0119] in:

[0120] 1. K1C, K2C, K3C are modified segments of *KC from the "Key Data Linking" step

[0121] 2. KEK1, KEK2, KEK3 are the output parts of *KEK from the "wrapping key derivation" step

[0122] a. There is no XOR of content to *KEK, no key variant is created to be used as a wrapping key

[0123] b. For 112-bit* KEKs, KEK1 is used for KEK3

[0124] 3.|| indicates cascade

[0125] 4.ecbc means encryption using cipher block chaining mode

[0126] 5.dcbc indicates decryption using cipher block chaining mode.

[0127] 6. 8 bytes of 0x00 are used as the initialization vector for encryption0

[0128] See also Figure 5 , a method for enhanced key encapsulation is provided, the method comprising providing a transparent key having an attribute controlling the use of a transparent key (501). The transparent key comprises key data in at least a first 8-byte portion and a second and third 8-byte portion that are filled with key data or not filled, and an encapsulation key for encapsulating the transparent key. The method further comprises: chaining together the first, second, and third 8-byte portions with zeros for those 8-byte portions that are not filled into the chain key data (502); deriving an encryption key and an authentication key from the encapsulation key (503); calculating an authentication code on the transparent key and the attribute using the authentication key (504); performing encryption on the chain key data using the encryption key to generate encrypted chain key data (505); and adding the authentication code, the attribute, and the encrypted chain key data to form a key block (506).

[0129] According to one or more embodiments of the present invention, the attributes may include a set of attributes that control how to use the transparent key. In addition, the encapsulation key may be derived using at least one of a pseudo-random function (PRF) algorithm and a key derivation function (KDF) algorithm. In addition, the authentication code may be a triple length data encryption standard ciphertext-based message authentication code (TDES-CMAC), and the encryption includes cipher block chaining (CBC) encryption.

[0130] Reference Figure 6 , and according to a further embodiment of the present invention, the method may further include decapsulating the key block. Figure 6 As shown, the decapsulation of the key block includes: providing a decapsulation key based on the encapsulation key used to decapsulate the key block (601); deriving a decryption key and an authentication key from the decapsulation key (602); decrypting the encrypted chain key data using the decryption key to generate the chain key data (603); unlinking the chain key data to generate the key data (604); and calculating an authentication code for the key data and the attribute using the authentication key (605). The decapsulation of the method may also include verifying that the authentication code matches the authentication code of the key block (606) and returning an error if the authentication code does not match the authentication code of the key block / if the authentication code does not match the authentication code of the key block, (607).

[0131] Now go to Figure 7, which is a computer system 700 for enhanced key encapsulation. The methods described herein may be implemented in hardware, software (e.g., firmware), or a combination thereof. In an exemplary embodiment, the methods described herein are implemented in hardware as part of a microprocessor of a special-purpose or general-purpose digital computer (such as a personal computer, workstation, minicomputer, or mainframe computer). Thus, system 700 may include a general-purpose computer or mainframe computer capable of running multiple instances of an O / S simultaneously.

[0132] In an exemplary embodiment, in terms of hardware architecture, Figure 7 As shown, the computer includes one or more processors 705, a memory 710 coupled to a memory controller 715, and one or more input and / or output (I / O) devices 740, 745 (or peripheral devices) communicatively coupled via a local input / output controller 735. The input / output controller 735 can be, for example, but not limited to, one or more buses or other wired or wireless connections, as known in the art. The input / output controller 735 can have additional elements omitted for simplicity, such as controllers, buffers (cache), drivers, repeaters, and receivers to enable communication. Further, the local interface can include address, control, and / or data connections to enable appropriate communication between the aforementioned components. The input / output controller 735 can include multiple subchannels configured to access output devices 740 and 745. The subchannels can include fiber optic communication ports.

[0133] Processor 705 is a hardware device for executing software, particularly software stored in storage 720 (such as cache storage) or memory 710. Processor 705 can be any custom or commercially available processor, a central processing unit (CPU), a secondary processor among several processors associated with a computer, a semiconductor-based microprocessor (in the form of a microchip or chipset), a macroprocessor, or generally any device for executing instructions.

[0134] The memory 710 may include any one or combination of volatile memory elements (e.g., random access memory (RAM, such as DRAM, SRAM, SDRAM, etc.) and non-volatile memory elements (e.g., ROM, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic tape, compact disk read-only memory (CD-ROM), magnetic disk, floppy disk, cartridge, cassette, etc.). In addition, the memory 710 may contain electronic, magnetic, optical and / or other types of storage media. Note that the memory 710 may have a distributed architecture in which different components are located remotely from each other but can be accessed by the processor 705.

[0135] The instructions in memory 710 may include one or more separate programs, each of which includes an ordered list of executable instructions for implementing logical functions. Figure 7 In the example of , the instructions in the memory 710 form a suitable operating system (OS) 711. The operating system 711 substantially controls the execution of other computer programs and provides scheduling, input-output control, file and data management, memory management, and communication control and related services.

[0136] The memory 710 may include multiple logical partitions (LPARs), each running an instance of an operating system. The LPARs may be managed by a hypervisor, which may be a program stored in the memory 710 and executed by the processor 705.

[0137] In an exemplary embodiment, a conventional keyboard 750 and mouse 755 may be coupled to the input / output controller 735. Other output devices such as I / O devices 740, 745 may include input devices such as, but not limited to, printers, scanners, microphones, and the like. Finally, the I / O devices 740, 745 may further include devices that transmit both input and output such as, but not limited to, network interface cards (NICs) or modulators / demodulators (for accessing other files, devices, systems, or networks), radio frequency (RF) or other transceivers, telephone interfaces, bridges, routers, and the like. The system 700 may further include a display controller 725 coupled to the display 730. In an exemplary embodiment, the system 700 may also include a network interface 760 for coupling to a network 765. The network 765 may be an IP-based network for communicating between the computer and any external servers, clients, and the like via a broadband connection. The network 765 transmits and receives data between the computer and external systems. In an exemplary embodiment, the network 765 may be a managed IP network managed by a service provider. The network 765 can be implemented wirelessly, for example, using wireless protocols and technologies such as WiFi, WiMax, etc. The network 765 can also be a packet switching network, such as a local area network, a wide area network, a metropolitan area network, an Internet network, or other similar types of network environments. The network 765 can be a fixed wireless network, a wireless local area network (LAN), a wireless wide area network (WAN), a personal area network (PAN), a virtual private network (VPN), an intranet, or other suitable network system, and includes devices for receiving and transmitting signals.

[0138] If the computer is a PC, workstation, smart device, etc., the instructions in the memory 710 may also include a basic input and output system (BIOS) (omitted for simplicity). The BIOS is a collection of basic software routines that initialize and test hardware at startup, start the OS 711, and support data transfer between hardware devices. The BIOS is stored in the ROM so that the BIOS can be executed when the computer is activated.

[0139] When the computer is in operation, the processor 705 is configured to execute instructions stored within the memory 710, to communicate data to and from the memory 710, and to generally control the operation of the computer in accordance with the instructions.

[0140] Different embodiments of the present invention are described herein with reference to the accompanying drawings. Without departing from the scope of the present invention, alternative embodiments of the present invention may be designed. Various connections and positional relationships (e.g., above, below, adjacent, etc.) are described between the elements in the following description and the accompanying drawings. Unless otherwise indicated, these connections and / or positional relationships may be direct or indirect, and the present invention is limited in this respect by the schematic diagram. Thus, the coupling of entities may refer to direct or indirect coupling, and the positional relationship between entities may be direct or indirect positional relationships. In addition, various tasks and processing steps described herein may be incorporated into a more comprehensive program or process with additional steps or functions not described in detail herein.

[0141] One or more of the methods described herein may be implemented using any one or a combination of the following technologies, which are well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits (ASICs) having appropriate combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0142] For the sake of brevity, conventional techniques related to making and using various aspects of the present invention may or may not be described in detail herein. In particular, various aspects of computing systems and specific computer programs for implementing the various technical features described herein are well known. Thus, for the sake of brevity, many conventional implementation details are only briefly mentioned herein, or omitted entirely, without providing well-known system and / or process details.

[0143] In some embodiments, different functions or actions can occur in a given location and / or in combination with the operation of one or more devices or systems. In some embodiments, a portion of a given function or action can be performed at a first device or location, and the remainder of the function or action can be performed at one or more additional devices or locations.

[0144] The terms used herein are only used for the purpose of describing specific embodiments and are not intended to be limiting. As used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that when the terms "comprise" and / or "include" are used in this specification, they specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, element components, and / or groups thereof.

[0145] All means or steps in the following claims plus corresponding structures, materials, actions, and equivalents of functional elements are intended to include any structure, material, or action for performing a function in conjunction with other claimed elements as specifically claimed. The present disclosure has been presented for purposes of illustration and description, but the disclosure is not intended to be exhaustive or limited to the disclosed forms. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the present disclosure. The embodiments are selected and described in order to best explain the principles and practical applications of the present disclosure, and to enable those of ordinary skill in the art to understand the present disclosure for different embodiments with different modifications suitable for the intended specific use.

[0146] The figures described herein are illustrative. Without departing from the spirit of the present disclosure, many changes may be made to the diagrams or steps (or operations) described herein. For example, these actions may be performed in different orders, or actions may be added, deleted or modified. Similarly, the term "coupling" describes having a signal path between two elements, and does not imply a direct connection between these elements, without intermediate elements / connections therebetween. All these changes are considered as a part of the present disclosure.

[0147] The following definitions and abbreviations are used to interpret the claims and specification. As used herein, the terms "comprises / comprising," "includes / including," "has / having," or "contains / containing" or any other variation thereof are intended to cover a non-exclusive inclusion. For example, a composition, mixture, process, method, article, or apparatus that includes a list of elements is not necessarily limited to only those elements but may include other elements not expressly listed or inherent to such composition, mixture, process, method, article, or apparatus.

[0148] Additionally, the term "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any embodiment or design described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. The terms "at least one" and "one or more" should be understood to include any integer greater than or equal to one, i.e., one, two, three, four, etc. The term "plurality" should be understood to include any integer greater than or equal to 2, i.e., two, three, four, five, etc. The term "connected" may include both indirect "connections" and direct "connections."

[0149] The terms "about", "substantially", "approximately" and variations thereof are intended to include the degree of error associated with the measurement of a particular quantity based on the equipment available at the time of filing this application. For example, "about" may include a range of ±8% or 5%, or 2% of a given value.

[0150] The present invention may be a system, method and / or computer program product of any possible integrated technical detail level. The computer program product may include a computer-readable storage medium (or medium) having computer-readable program instructions thereon, the computer-readable program instructions being used to cause a processor to perform aspects of the present invention.

[0151] Computer readable storage medium can be a tangible device that can retain and store instructions for use by instruction execution devices. Computer readable storage medium can be, for example, but not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer readable storage medium includes the following: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, such as punch card or a mechanical encoding device with a raised structure in a groove with instructions recorded thereon, and any suitable combination of the foregoing. Computer readable storage medium as used herein should not be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (e.g., a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.

[0152] The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a corresponding computing / processing device, or downloaded to an external computer or external storage device via a network (e.g., the Internet, a local area network, a wide area network, and / or a wireless network). The network may include copper transmission cables, optical transmission fibers, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in a computer-readable storage medium within the corresponding computing / processing device.

[0153] The computer-readable program instructions for performing the operation of the present invention can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, configuration data of integrated circuits, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​(such as Smalltalk, C++, etc.) and procedural programming languages ​​(such as "C" programming language or similar programming languages). The computer-readable program instructions can be executed completely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer, partially on a remote computer, or completely on a remote computer or server. In the latter case, the remote computer can be connected to the user's computer through any type of network (including a local area network (LAN) or a wide area network (WAN)), or can be connected to an external computer (for example, by using the Internet of an Internet service provider). In some embodiments, an electronic circuit (including, for example, a programmable logic circuit, a field programmable gate array (FPGA) or a programmable logic array (PLA)) can execute a computer-readable program instruction to personalize the electronic circuit by utilizing the state information of the computer-readable program instructions, so as to perform aspects of the present invention.

[0154] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0155] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine, such that the instructions executed via the processor of the computer or other programmable data processing device create a device for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions may also be stored in a computer-readable storage medium, which may direct a computer, a programmable data processing device, and / or other device to operate in a particular manner, such that a computer-readable storage medium having instructions stored therein includes an article of manufacture, which includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0156] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, so that a series of operating steps are performed on the computer, other programmable apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable apparatus, or other device implement the functions / actions specified in one or more boxes of the flowchart and / or block diagram.

[0157] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to different embodiments of the present invention.To this end, each box in the flow chart or block diagram can represent a part of a module, segment or instruction, which includes one or more executable instructions for realizing the logical function of the specification.In some alternative embodiments, the function marked in the box may not occur in the order marked in the figure.For example, depending on the function involved, the two boxes shown in succession can actually be performed substantially at the same time, or these boxes can sometimes be performed in reverse order.It will also be noted that each box in the block diagram and / or flow chart and the combination of the boxes in the block diagram and / or flow chart can be realized by a system based on special-purpose hardware, and the system based on special-purpose hardware performs a specified function or action or performs a combination of special-purpose hardware and computer instructions.

[0158] The description of different embodiments of the present invention has been presented for the purpose of illustration, but is not intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein are selected to best explain the principles of the embodiments, practical applications, or technical improvements over technologies found in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments described herein.

Claims

1. A computer-implemented method of enhanced key encapsulation, the computer-implemented method comprising: Providing a transparent key having properties that control the use of the transparent key, the transparent key comprising: key data in at least the first 8-byte portion and the second and third 8-byte portions; and A wrapping key, used to wrap the transparent key, wherein: the second 8-byte portion is derived by bitwise XORing the hash of the third 8-byte portion with the second 8-byte portion, and the parity of the second and third 8-byte portions is adjusted, and the first 8-byte portion is derived by bitwise XORing a hash of the second 8-byte portion with the first 8-byte portion, and the parity of the first 8-byte portion is adjusted; concatenating the first, second and third 8-byte portions together with zeros for those 8-byte portions not filled into the chain key data; deriving an encryption key and an authentication key from the encapsulation key; using the authentication key to calculate an authentication code over the transparent key and the attribute; performing encryption on the chain key data using the encryption key to generate encrypted chain key data; and The authentication code, the attributes and the encrypted chain key data are added to form a key block.

2. The computer-implemented method of claim 1 , wherein: The attributes include a set of attributes that control how the transparent key is to be used.

3. The computer-implemented method of claim 1 , wherein: The wrapping key is derived using a selection from the group consisting of a pseudorandom function (PRF) algorithm and a key derivation function (KDF) algorithm.

4. The computer-implemented method of claim 1 , wherein: The authentication code is a Triple Length Data Encryption Standard Ciphertext-Based Message Authentication Code (TDES-CMAC).

5. The computer-implemented method of claim 1 , wherein: The encryption includes Cipher Block Chaining (CBC) encryption.

6. The computer-implemented method of claim 1 , further comprising decapsulating the key block, the decapsulating the key block comprising: Providing a decapsulation key based on the encapsulation key for decapsulating the key block; deriving a decryption key and an authentication key from the decapsulation key; performing decryption on the encrypted chain key data using the decryption key to generate chain key data; unlinking the chained key data to generate key data; as well as An authentication code is calculated over the key data and the attribute using the authentication key.

7. The computer-implemented method of claim 6, wherein: The decapsulation further comprises: verifying that the authentication code matches the authentication code of the key block; and An error is returned if the authentication code does not match the authentication code of the key block.

8. A computer program product comprising a computer-readable storage medium having program instructions embodied thereon, the program instructions being executable by a processor to cause the processor to perform the steps of the method according to any one of claims 1 to 7.

9. A computer-implemented system for enhanced key encapsulation, comprising: a memory having computer readable instructions; as well as One or more processors for executing the computer readable instructions, the computer readable instructions controlling the one or more processors to perform the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and system for secure storage, transmission and control of cryptographic keys

    US20040003246A1

  • Space-efficient encryption with multi-block binding

    US20120185699A1

  • Key wrapping for common cryptographic architecture (CCA) key token

    US20150270955A1

  • Apparatus and method for implementing IPSEC transforms within an integrated circuit

    US6708273B1