1. Technical Field
This invention applies to software components that interconnect, as in a frameworks, such that only components “certified” by some designated authority can participate, partly or wholly, in the intended operation of the application. The main emphasis is to limit the set of such software components to those that have been deemed to operate in some specific manner and/or in the scope of some specified set of constraints. The initial application for this invention is to prevent piracy of copyrighted data in multimedia frameworks such as Microsoft DirectShow, but the general invention has much wider applicability.
This invention has as its root the concepts of self-signatures (such as a complex hash of a file or executing program image) and “chains of trust,” where each component in a network is validated by the component supplying the data to the component in question. Naturally, the component originating data into such a network would have no predecessor, and thus would not be constrained by a signature or lack thereof, but all other components in the network could be validated using a standard, consistent methodology. The “initial input component” will have to be protected against counterfeiting in some manner other than that described by the current invention.
Although numerous authentication schemes have been developed over the years, the current invention invokes several novel concepts that significantly differentiate it from other techniques in the literature and in current practice.
2. Description of the Prior Art
As just noted, software component authentication is an established field of endeavor. Most solutions in common use involve the use of standard digital signature concepts. While these ideas are good, they can still leave openings for reverse engineering unless elaborate steps are taken to avoid it. This increases the complexity of the overall system, can provide scalability problems, and have other drawbacks that to some degree limit their usefulness in many applications.
The technique employed by the current invention is significantly different from other authentication methods. While it also employs a form of digital signing, it has a completely novel approach to insuring that the signature cannot be subverted by any modification to the corresponding disk file nor by playing tricks with file names across directories (one attack mode that has become popular since most authentication schemes have little protection against this kind of trickery).
Most authentication systems perform their actions prior to using the software component in question. This invention differs significantly in that it performs validation at runtime, rather than before the component is run. Thus, the validation is always at the most vulnerable point in a component's lifetime so far as counterfeiting is concerned.
The current invention operates by computing a complex calculation of the software component's executing image, and comparing it against an embedded, encrypted signature in the same executing image or, if necessary, in a “companion” signature file. The encryption uses an asymmetric (“public-key”) algorithm of the sort where the encryption key cannot be deduced from the decryption key. In the preferred embodiment, this is the standard RSA algorithm, although in theory any asymmetric algorithm having the same characteristics of not revealing the encryption key via the decryption key could work as well.
A characteristic of this invention is that the decryption key need not be kept secret; instead, it is the encryption key that must be protected (this is the reverse of how asymmetric encryption algorithms are usually used). Since the calculation of the executing image cannot in practice be kept secret, there is little purpose served by making the decryption key secret either. So the current invention addresses this, as described elsewhere in this Disclosure, by keeping the encryption key secret and implementing a novel protocol to do the authentication.
Some terminology will simplify this discussion: Two components are said to be connected if they have formed some communications channel between them where (possibly valuable) data can be transferred from one component to the other. The source side of the connection is the side supplying the data, while the sink side is the receiver of the data (it is possible for a connection to be bi-directional, in which case this invention treats the connection as two separate connections for the purposes of authentication). The source side authenticates the sink side before sending it any “protected” data (what is meant by “protected” is up to the designers of the overall system, and is out of the scope of this invention). The mechanics of this authentication are covered in the Detailed Description section of this Disclosure.
If the sink side fails authentication, it is up to the source side to decide on the proper course of action. This could entail not sending any data at all to the sink side, sending only “unprotected” data, forcibly terminating the connection, or some other action decided upon by the system's designer. It is an important concept of this invention that the source side of the connection is always in control of the authentication operation; the source side instigates the operation and makes the decision on what to do based on the outcome of the operation; the sink side exercises no influence on this whatsoever (so it cannot take any actions to subvert the security).
Additional aspects, features and advantages of the present invention are included in the following description of exemplary embodiments, which description should be read in conjunction with the accompanying drawings.
The problem of counterfeiting or hacking componental software to make it operate in way unintended by or contrary to the intents or requirements of either the original module provider or the terms of a license under which the module is obligated to operate is addressed by this invention. The core concept is a authentication process in which the “authenticable credentials” of a given software component or other executable module are either embedded in the module's disk image or in a separate signature file in such a manner that:
The software component or other executable module can be partitioned such that the signature (e.g., an SHA-1 hash calculation) can be performed on the executing image of the software component or other executable module when that module is deployed in a manner that can be compared with a similar signature calculated by a legitimate signing authority (which might determine the module's signature either from the module's disk file or from its executing image, depending on the characteristics of the deployment environment, e.g., the operating system). The module signature as determined by the signing authority is encrypted using a key or keys known only to the signing authority (or authorities, depending on how the system's designer wants to partition the signing authority capability). The corresponding decryption key(s) are known to every software implementation that will want to authenticate software components or other executable modules employing the current invention. There is no need for these decryption keys to be kept secret, nor is there any need for the module signatures themselves to be secret. The overall security of this scheme rest on the principle that the encryption keys cannot be inferred or reverse-engineered from the decryption key(s), even if one or more samples of ciphertext (in the form of encrypted module signatures) are available. Only certain encryption algorithms, such as RSA, possess this characteristic, so implementations of the current invention will require constraining the selection of algorithms for encrypting module signatures to those possessing this characteristic. In the preferred embodiment, RSA is used as the encryption algorithm for encrypting and decrypting module signatures.
Signing a module can take any of a number of protocols, decided upon by the system's designer; these include a single sole signing authority, a set of alternate authorities, etc, as described elsewhere in this Disclosure. In a typical scenario, the signing authority (or authorities) are accessed over a network connection (e.g., the Internet), and files representing software components or other executable modules are transmitted to the signing authority via that medium. The signing authority creates the module's signature and either embeds it into the module's disk file or stores it in a separate signature file. In either case, the result of the singing authority's actions are replied back to the individual, organization, etc. making the original request. Once signed, the software component or other executable module can be distributed in the normal manner (this might also entail distributing the signature file, if that option was used for one or more modules being distributed).
When the software component or other executable module is deployed by a user (i.e., someone besides the signing authority), the context of that deployment can authenticate the component or module by re-calculating the module signature, decrypting the reference signature (embedded in the module or from a signature file) and comparing the two to decide on authenticity.
A module signature can comprise more than just a hash of the module's binary (or part of the binary); frequently, additional data such as time stamps, serial and/or revocation IDs, and the like are bundled into a module signature, which is encrypted and decrypted as a unit.
The drawings provided here use the Window PE file format to provide a concrete example of how the invention could be used. The invention is not limited to the PE file format or to Microsoft products; it can be applied as a general concept to virtually any file-based architecture (and possibly to more unusual architectures).
In
This is further depicted in
Further details on authentication and various other aspects of the present invention are described further in the following co-assigned patent applications, all of which are by the same inventor, filed concurrently with the present application, and which are hereby incorporated by reference: a patent application entitled “Secure Protocols for use with Microsoft DirectShow Filters” that claims priority from provisional application No. 60/317,754 filed Sep. 6, 2001; a patent application entitled “Deterring Reverse-Engineering of Software Systems by Randomizing the Siting of Stack-Based Data” that claims priority from provisional application No. 60/317,753 filed Sep. 6, 2001; and a patent application entitled “Asymmetric Encryption to Prevent Fraudulent Replacement of Data” that claims priority from provisional application No. 60/317,751 filed Sep. 6, 2001.
Finally,
The fundamental goal of the invention is to provide a secure method whereby a software component can be verified as having been vouched for by a trusted agency. It is assumed as part of the deployment model that no internetworking support can be relied upon being available during the authentication process, so this operation must be completely self-contained. A design goal is to allow new software components to be introduced to a given deployment machine without any alteration to other components on the machine. If needed, it is considered allowable to update “companion” data files on the deployment machine so long as anything that had been running on that machine prior to the introduction of the new component would continue to operate without change (i.e., additions are “purely additive”).
The primary goals to be addressed by this invention can be listed thus:
In the Windows/PE implementation, segments of the executable file (which could also be a dynamic link library) are evaluated with the SHA-1 hash as defined by the National Security Agency of the United States Government. Not the entire file is used for this computation; for practical reasons, only certain sections (plus the PE header itself) is used. A characteristic of the PE file format is that the same SHA-1 calculation can with some extra work be applied to the executing image and obtain the same results as was generated for the disk file of that executing image. For deployment environments where this is not true, the signing authority may have no option but to execute the software component in order to generate the correct signature data. In any case, it is a fundamental concept of the current invention that the digital signature of a component be verified while the component is executing, regardless of how the signature was generated.
In the expected use of the current invention, a software component is signed by a trusted entity, and then subsequently authenticated and verified (that it was in fact signed by a trusted entity) when it is actually used. The exact condition upon which this authentication is invoked is up to the system's designer, but it typically occurs when the software component in question is going to be on the receiving end of an inter-component connection (i.e., when the software component in question is going to be a connection sink, to use terminology defined earlier in this Disclosure). The authentication in this case would be invoked by the other side (the source side) of the connection. Note that a given software component is never expected to authenticate itself; it is always some other executing software entity (typically, the source side of a connection) that performs the authentication.
The signing process involves the signing authority calculating the digital signature (in the preferred embodiment, this is the SHA-1 hash of specific sections of the PE file) of the software component, either from its disk file or (if necessary) from a “locally executing” image of the software component. This signature is represented by a byte buffer of some characteristic length (e.g., for SHA-1, 20 bytes). The signing authority then encrypts this signature (and optionally other useful data) using one key (or set of keys) of an asymmetric encryption algorithm (in the preferred embodiment, RSA). This encryption key(s) is/are known only to the signing authority, and is kept highly secret. Once encrypted, the signature is then embedded into the software component's disk file in such a manner that it doesn't otherwise impact the usefulness of the software component when it is subsequently run, and is easy to locate in the software component's executing image when the component is subsequently authenticated. The disk file of the software component may then be distributed.
When the software component is later used in an application where it is necessary to authenticate it, the software performing the authentication re-calculates the digital signature (e.g., the SHA-1 hash) of the executing image (not the disk file), and uses the built-in decryption key(s) to decrypt the embedded signature placed there by the signing authority. It can then compare the re-calculated signature with the data from the decryption for a match, and take appropriate action on the outcome of that test.
The current invention is not limited to “top level” components in specific network facility. Any dependent modules (e.g., dynamic link libraries) could also be included in the authentication facility. In these cases, it might not be practical to embed the signature, encrypted or otherwise, in the disk file of the module. Thus, the current invention also makes provisions for signatures to be alternatively loaded out of a separate signature file. It is an option for the system developer whether to use a separate signature file for each such module or combine multiple signatures into one or a few “aggregated” signature files. In any case, the signature is encrypted in the same manner as it would be if it was embedded into the software component's own disk file. The authentication mechanism must be able to determine that a given module does not have an embedded signature, and know how to find the proper “external” signature file and fetch the (encrypted) signature out of that file.
In a typical use of the current invention, each software component in a network of such components will incorporate the features of the current invention. In this case, each component is authenticated by the component(s) that source data to the component in question. Each such component will thus have an (encrypted) digital signature to provide its sourcing component(s) and the mechanism to authenticate the signature(s) of all its sinking component(s). To improve security, the decryption key(s) used to decrypt embedded digital signatures in sinking components is part of the file covered by that component's own signature, which means that it is part of the verification process when that filter is authenticated by its own sourcing filters. Thus, any attempt to modify the built-in decryption key(s) (to allow the filter in question to authenticate a component signed by an entity other than a legitimate signing authority) will cause the so-modified filter to fail authentication by its sourcing components, thus maintaining the “chain of trust” model that is a feature of the current invention.
Although the invention has been described with respect to various exemplary embodiments, it will be understood that the invention is entitled to protection within the full scope of the appended claims.
This application claims priority to provisional application No. 60/317,844 filed Sep. 6, 2001.
| Number | Date | Country | |
|---|---|---|---|
| 60317844 | Sep 2001 | US |