diff --git a/License.txt b/License.txt index ea9d7675..4c551de9 100644 --- a/License.txt +++ b/License.txt @@ -1,6 +1,6 @@ BSD License -Copyright (C) 2011-2016 Intel Corporation. All rights reserved. +Copyright (C) 2011-2017 Intel Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -30,14 +30,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================================= -SGX Eclipse plug-in is licensed under Eclipse Public License-v1.0 +Intel(R) Software Guard Extensions (Intel(R) SGX) Eclipse plug-in is licensed under Eclipse Public License-v1.0 http://www.eclipse.org/legal/epl-v10.html ============================================================== -libsgx_le.signed.so, libsgx_pce.signed.so, libsgx_pve.signed.so and libsgx_qe.signed.so are licensed as Intel redistributable binary firmware and other blobs. +libsgx_le.signed.so, libsgx_pce.signed.so, libsgx_pve.signed.so, libsgx_qe.signed.so, libsgx_pse_pr.signed.so and libsgx_pse_op.signed.so are licensed as Intel redistributable binary firmware and other blobs. Copyright (c) Intel Corporation. @@ -83,7 +83,7 @@ DAMAGE. =========================================================================================================================================================== -SGX software for Linux also uses third-party projects that may be distributed under different licenses. Please see below for details. +Intel(R) SGX software for Linux also uses third-party projects that may be distributed under different licenses. Please see below for details. 1. Android Open Source Project @@ -1394,3 +1394,44 @@ All Recipient's rights under this Agreement shall terminate if it fails to compl Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. + + + + +18. TCMALLOC + +TCMALLOC is part of Google Perf Tools, which is distributed under the terms of the BSD license. + + http://goog-perftools.sourceforge.net/ + + +Copyright (c) 2005, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + diff --git a/Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/feature.xml b/Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/feature.xml index f9047a71..d2728058 100644 --- a/Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/feature.xml +++ b/Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/feature.xml @@ -24,11 +24,11 @@ tools Plug-in to allow ISVs develop secure extensions in C or C++. The Plug-in also allows conversion of an Linux Application project into an Linux Application project with Software Guard Extensions. -Using the Plug-in features and SGX Plug-in Menu options, a developer +Using the Plug-in features and Intel(R) SGX Plug-in Menu options, a developer can modify the Signing keys and Enclave Configuration for an Enclave project and can add enclaves inside a project with SGX Nature. Once development is complete, the developer can build the Enclave -and the Linux project using the SGX SDK for Linux with Release/Debug Configurations in Simulation/Hardware +and the Linux project using the Intel(R) SGX SDK for Linux with Release/Debug Configurations in Simulation/Hardware mode and Hardware Prerelease mode. diff --git a/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/content.html b/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/content.html index c934419a..4f9e1737 100644 --- a/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/content.html +++ b/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/content.html @@ -214,7 +214,7 @@ developers by the Intel(R) SGX SDK.
Intel(R) SGX Tools
New configurations specific to SGX technology. You may see the configurations for the project by clicking to the down arrow of button
usually found at the top of the Eclipse window:
New configurations specific to Intel(R) SGX technology. You may see the configurations for the project by clicking to the down arrow of button
usually found at the top of the Eclipse window:
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Epid 1.1 issuer material parsing utilities. +More...
+#include <stddef.h>#include "epid/common/1.1/types.h"#include "epid/common/errors.h"#include "epid/common/file_parser.h"+Functions | |
| EpidStatus | Epid11ParseGroupPubKeyFile (void const *buf, size_t len, EpidCaCertificate const *cert, Epid11GroupPubKey *pubkey) |
| Extracts group public key from buffer in issuer binary format. More... | |
| EpidStatus | Epid11ParsePrivRlFile (void const *buf, size_t len, EpidCaCertificate const *cert, Epid11PrivRl *rl, size_t *rl_len) |
| Extracts private key revocation list from buffer in issuer binary format. More... | |
| EpidStatus | Epid11ParseSigRlFile (void const *buf, size_t len, EpidCaCertificate const *cert, Epid11SigRl *rl, size_t *rl_len) |
| Extracts signature revocation list from buffer in issuer binary format. More... | |
| EpidStatus | Epid11ParseGroupRlFile (void const *buf, size_t len, EpidCaCertificate const *cert, Epid11GroupRl *rl, size_t *rl_len) |
| Extracts group revocation list from buffer in issuer binary format. More... | |
Epid 1.1 issuer material parsing utilities.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
SDK data types for Intel(R) EPID 1.1. +More...
++Data Structures | |
| struct | OctStr80 |
| 80 bit octet string More... | |
| struct | OctStr600 |
| 600 bit octet string More... | |
| struct | OctStr768 |
| 768 bit octet string More... | |
| struct | Fq3ElemStr |
| Serialized Fq3 element. More... | |
| struct | Epid11G2ElemStr |
| Serialized Intel(R) EPID 1.1 G2 element. More... | |
| struct | Epid11GtElemStr |
| Serialized Intel(R) EPID 1.1 GT element. More... | |
| struct | Epid11Params |
| Intel(R) EPID 1.1 Parameters. More... | |
| struct | Epid11GroupPubKey |
| Intel(R) EPID 1.1 group public key. More... | |
| struct | Epid11BasicSignature |
| Intel(R) EPID 1.1 basic signature. More... | |
| struct | Epid11NrProof |
| Intel(R) EPID 1.1 non-revoked Proof. More... | |
| struct | Epid11Signature |
| Intel(R) EPID 1.1 Signature. More... | |
| struct | Epid11PrivRl |
| Intel(R) EPID 1.1 private-key based revocation list. More... | |
| struct | Epid11SigRlEntry |
| Intel(R) EPID 1.1 entry in SigRL (B,K) More... | |
| struct | Epid11SigRl |
| Intel(R) EPID 1.1 signature based revocation list. More... | |
| struct | Epid11GroupRl |
| Intel(R) EPID 1.1 group revocation list. More... | |
+Typedefs | |
| +typedef G1ElemStr | Epid11G1ElemStr |
| Serialized Intel(R) EPID 1.1 G1 element. | |
| +typedef G1ElemStr | Epid11G3ElemStr |
| Serialized Intel(R) EPID 1.1 G3 element. | |
| +typedef OctStr32 | Epid11GroupId |
| Intel(R) EPID 1.1 group ID. | |
SDK data types for Intel(R) EPID 1.1.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
This in-depth explanation covers the use of basenames in the Intel® EPID scheme. It provides detail on name based signatures, random base signatures and how and when they are used.
+
+
By default, members sign using a random basename that is not shared with the verifier. This signing method is also referred to as signing using random base. Signing using random base provides the strongest privacy properties for the signer. If a member signs using random base, the signature generated by the member is anonymous.
+When the signer and verifier agree to use random base, the basename is chosen at random for each signature. Two signatures using a random base cannot be linked to the same signer.
+A name based signature is a type of signature that gives the verifier the ability to link Intel® EPID signatures from the same member, reducing the member's privacy. When using name based signatures, the signer and verifier agree on an explicit basename.
+The verifier can ask the member to sign a message with a basename that the verifier chooses. If the member agrees to use a name based signature, then all the signatures created by the member using the same basename are linkable by the verifier, reducing the member's privacy.
+Reasons why a verifier might require members to use a basename when signing include the following:
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Building SDK code out of the box requires a number of tools. This section explains how to install the following tools:
+| Prerequisite | Download Link |
|---|---|
| Python | python 2.7.12 installers |
| SCons | scons-2.4.1.zip |
| Parts | parts-0.11.0.zip |
+
To verify that Python installed correctly, run:
> python --version +
+
After Python is installed, install SCons.
+> python setup.py install +
+ To verify that SCons installed correctly, run:
> scons --version +
+
After SCons is installed, install Parts.
+> python setup.py install +
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
To use the SDK in a project, the code from the SDK must be included in that project. The easiest way to do this is to link to static libraries. The SDK comes with build scripts to build static libraries for common environments.
+Building SDK code out of the box requires a number of tools. This section lists the tools used to build the SDK.
+For more information on how to install these tools, refer to Guide to Installing Build Tools.
+| Prerequisite | Notes |
|---|---|
| A C/C++ compiler | Core code in C. Unit tests need C++11 support. |
| Python | Validated with v2.7.10 |
| SCons | Validated with v2.4.1 |
| Parts | 0.10.9.2 or later |
To use the SDK, you need to build it to generate libraries compatible with your build environment.
+To build based on the default SConstruct file in the root directory of the SDK, invoke scons with no arguments.
cd <path/to/sdk-root> +scons +
By default, this performs a 64 bit release build.
+Potentially useful command line options:
+| Option | Action |
|---|---|
--cfg=debug | Build in debug mode |
--cfg=release | Build in release mode |
--target=x86 | Target x86 |
--target=x86_64 | Target x86_64 |
--tc=cl | Use MSVC to compile (Microsoft®* C/C++ Optimizing Compiler) |
--tc=gcc | Use GCC to compile (GNU* Compiler Collection) |
--tc=icl,mstools | Use Intel® C++ compiler |
build:: | Build the SDK (does not build unit tests) |
utest:: | Build unit tests |
run_utest:: | Run unit tests (builds tests if needed) |
-c | Clean the build |
Built components appear in the _install directory of the SDK root.
You can build with the make command on platforms that support Make/Autoconf.
In the root directory of the SDK, run:
./configure +make all +make check +make install +
./configure sets up the default settings:
./configure CC=/opt/intel/bin/icc CXX=/opt/intel/bin/icpc./_install. You can specify the installation directory by using ./configure --prefix=/usr/local/epid_install-m32 and -m64. For example, ./configure CFLAGS=-m32make check is optional. It builds and runs the unit tests.
Alternatively, you can use make build as a shortcut to replace make all, make check, and make install.
To clean the build, run make clean.
To remove the install directory, run make uninstall.
For higher performance, you can use the commercial version of Cryptography for Intel® Integrated Performance Primitives, available at https://software.intel.com/articles/download-ipp-cryptography-libraries.
+To build the SDK using a commercial Intel® IPP installation, the IPPROOT environment variable must be properly configured to point to the IPP installation directory, as described in Setting Environment Variables* in the Intel® IPP User's Guide (PDF link).
Once the environment is configured, you can build using commercial IPP by specifying --use-commercial-ipp as a command line option.
The SDK includes several examples that show you different aspects of how the Intel® EPID scheme works. In the SDK build, these examples are located in _install/epid-sdk/example.
| Name | Description |
|---|---|
signmsg | Create Intel® EPID signature of message |
verifysig | Verify signature is from a group member in good standing |
It is relatively straightforward to port the SDK to your build system of choice. The following dependency diagram shows the relationship between components and the sources used to build them.
+
+
+
Other names and brands may be claimed as the property of others.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
EpidNullPtrErr now return EpidBadArgErr instead.|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
To use the Intel® EPID APIs, you need to use the following items that are created by the issuer:
+If you want to use the Intel Key Generation Facility (iKGF) as the issuer, contact info@digital-cp.com to get started.
+If you choose to use iKGF as the issuer, you can take advantage of tools included in the SDK that are designed to make it easier for you to interact with iKGF by creating requests to update revocation lists and by extracting member private keys and group public keys from iKGF files.
+The Intel® EPID SDK includes tools to help you request additions to revocation lists managed by iKGF if you are using iKGF as the issuer.
+These tools are designed to create a revocation request in the format required by iKGF. In order to update a revocation list, the requests generated by these tools must be submitted to the issuer.
+To access the tools, go to _install/epid-sdk/tools in the SDK directory.
You need to build the SDK before you can use these tools. For more information, refer to Building from Source.
+The following tools are available:
+| Tool | Purpose |
|---|---|
revokegrp | Create group revocation request |
revokekey | Create member private key revocation request |
revokesig | Create signature revocation request |
The revokegrp tool adds a group to the revocation request file.
Usage: revokegrp [OPTION]... +Revoke Intel(R) EPID group + +Options: + --gpubkey=FILE + load group public key from FILE (default: pubkey.bin) + + --capubkey=FILE + load IoT Issuing CA public key from FILE + + --reason=NUM + revocation reason (default: 0) + + --req=FILE + append group revocation request to FILE (default: grprlreq.dat) + + -h, --help + display this help and exit + + -v, --verbose + print status messages to stdout +
The revokekey tool adds a member private key to the revocation request file.
Usage: revokekey [OPTION] +Revoke Intel(R) EPID private key + +Options: + --mprivkey=FILE + load private key to revoke from FILE (default: mprivkey.dat) + + --req=FILE + append private key revocation request to FILE (default: privreq.dat) + + -h, --help + display this help and exit + + -v,--verbose + print status messages to stdout + +The following options are only needed for compressed keys: + + --gpubkey=FILE + load group public key from FILE (default: pubkey.bin) + + --capubkey=FILE + load IoT Issuing CA public key from FILE +
The revokesig tool creates a request to add a signature to the revocation request file.
revokesig only accepts valid signatures for addition to the revocation request.
Usage: revokesig [OPTION]... +Revoke Intel(R) EPID signature + +Options: + --sig=FILE + load signature to revoke from FILE (default: sig.dat) + + --msg=MESSAGE + MESSAGE used to generate signature to revoke + + --msgfile=FILE + FILE containing message used to generate signature to revoke + + --gpubkey=FILE + load group public key from FILE (default: pubkey.bin) + + --capubkey=FILE + load IoT Issuing CA public key from FILE + + --req=FILE + append signature revocation request to FILE (default: sigrlreq.dat) + + -h, --help + display this help and exit + + -v, --verbose + print status messages to stdout +
The Intel® EPID SDK includes tools to help you extract individual keys from files provided by the Intel Key Generation Facility (iKGF) if you are using iKGF as the issuer.
+To access the tools, go to _install/epid-sdk/tools in the SDK directory.
You need to build the SDK before you can use these tools. For more information, refer to Building from Source.
+The following tools are available:
+| Tool | Purpose |
|---|---|
extractgrps | Extracts group public keys |
extractkeys | Extracts member private keys |
The extractgrps tool extracts group public keys from the input file to the current directory.
Usage: extractgrps [OPTION]... [FILE] [NUM] +Extract the first NUM group certs from FILE to current directory + +Options: + -h, --help + display this help and exit + + -v, --verbose + print status messages to stdout +
The extractkeys tool extracts member private keys from the input file to the current directory.
Usage: extractkeys [OPTION]... [FILE] [NUM] +Extract the first NUM private keys from FILE to current directory. + +Options: + -c, --compressed + extract compressed keys + + -h, --help + display this help and exit + + -v, --verbose + print status messages to stdout
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Intel® EPID is a cryptographic protocol which enables the remote authentication of a trusted platform whilst preserving the user's privacy.
+In the Intel® EPID scheme, there are three roles: issuers, members, and verifiers.
+The entities in these roles interact with each other in such a way that a member can prove to a verifier that it is a trusted member of a group without disclosing the identity of the member. Groups are created and managed by the issuer.
+
+The issuer is responsible for managing group membership. Issuer functionality is not included in the SDK.
+The issuer manages groups by doing the following:
+
+The member is the entity that attempts to anonymously prove its group membership to the verifier.
+
+The verifier checks an Intel(R) EPID signature to establish whether it was signed by an entity or device that is a member in good standing.
+The verifier acts on behalf of a party that needs to know it is communicating with a trusted device. Verifiers obtain group certificates and revocation lists from issuers and negotiate details of signature protocol with members.
+A verifier can do the following:
+
+An Intel® EPID group represents a set of trusted entities called members. Issuers create groups and manage group membership. For each group, the issuer creates a group public key simultaneously with the corresponding issuing private key. The issuer uses the issuing private key to create unique member private keys for each group member, and makes the group public key available to verifiers.
+All groups have the following:
+If a signature based revocation list or private key based revocation list does not exist, it is assumed to be empty.
+The Intel® EPID scheme works with three types of keys: the group public key, the issuing private key, and the member private key. A group public key corresponds to the unique member private keys that are part of the group. Member private keys are generated from the issuing private key.
+Additionally, in the Intel® EPID scheme, a private key can be revoked given a signature created by that key, even if the key itself is still unknown. Group membership can be revoked and entire groups can be revoked. For more information on revocation, refer to In-Depth Explanation of Revocation.
+The group public key is the key used by the verifier to confirm that a member belongs to a group in good standing. Each member private key in a group is associated with the group's public key.
+When a group is created, the group public key and the issuing private key are simultaneously generated by the issuer. The verifier obtains the group public key from the issuer.
+The issuing private key is the key used by the issuer to generate unique private keys for each member of a given group. For every group public key, there is a corresponding issuing private key. The issuing private key remains with the issuer and is kept private.
+The member private key is the key used by the member to digitally sign a message when attempting to prove to the verifier that the member belongs to the group and is in good standing.
+Unique member private keys are generated by the issuer for each member of a given group. The same group public key corresponds to each member private key in the group.
+Each Intel® EPID member uses its Intel® EPID private key to digitally sign a message. The resulting signature is called an Intel® EPID signature.
+The Intel® EPID verifier uses the group public key to verify the correctness of an Intel® EPID signature, i.e., to verify that the signature was indeed created by a member with a valid Intel® EPID private key.
+However, the Intel® EPID signature does not convey any information about which unique private key was used to create the signature.
+
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Several example applications are included that demonstrate how to use the SDK APIs.
+| Example Application | Concept Demonstrated |
|---|---|
signmsg | Generating an Intel® EPID Signature |
verifysig | Verifying an Intel® EPID Signature |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
The CA (Certificate Authority) public key contains the ECDSA public key of the issuing CA. The verifier uses this key to authenticate that information provided by the issuer is genuine.
+Direct Anonymous Attestation (DAA) is a digital signature algorithm that supports anonymity by providing a group public verification key associated with many unique private signing keys. Intel® EPID enhances DAA by enabling a private key to be revoked given a signature created by that key, even if the key itself is still unknown.
+In elliptic curve cryptography, an elliptic curve is an algebraic structure used to create a function whose output is easy to compute, but whose input is difficult to compute given the output. Elliptic curve cryptography requires smaller keys compared to non-elliptic curve cryptography (based on Galois fields) to provide equivalent security.
+An elliptic curve point is a point along an elliptic curve. The security of elliptic curve cryptography depends on the ability to compute a point multiplication and the inability to compute the multiplicand given the original and product points.
+An Intel® EPID group represents a set of trusted entities called members.
+Issuers create groups and manage group membership. For each group, the issuer creates a group public key simultaneously with the corresponding issuing private key. The issuer uses the issuing private key to create unique member private keys for each group member, and makes the group public key available to verifiers.
+All groups have the following:
+If a signature based revocation list or private key based revocation list does not exist, it is assumed to be empty.
+The group certificate contains the group public key. The group certificate is created by the issuer and obtained by the verifier. When the issuer creates groups, it generates one issuing private key and one group certificate for each group.
+The group public key is the key used by the verifier to confirm that a member belongs to a group in good standing. Each member private key in a group is associated with the group's public key.
+When a group is created, the group public key and the issuing private key are simultaneously generated by the issuer. The verifier obtains the group public key from the issuer.
+Enhanced Privacy ID (Intel® EPID) is a cryptographic protocol for attestation of a trusted platform while preserving the user's privacy. Intel® EPID can be used as a foundational building block for a multitude of security solutions.
+An Intel® EPID signature is a type of digital signature that preserves anonymity of the signer, while still proving the signer is a member of a trusted group.
+The issuer is the entity in the Intel® EPID scheme that is responsible for managing group membership. Issuer APIs are not included in the SDK. An example of an issuer is the Intel Key Generation Facility. For sample issuer material, refer to Sample Issuer Material. For tools that can help you if you choose to use iKGF as your issuer, refer to If You Choose iKGF as Your Issuer.
+The issuer manages groups by doing the following:
+The issuing private key is the key used by the issuer to generate unique private keys for each member of a given group. For every group public key, there is a corresponding issuing private key. The issuing private key remains with the issuer and is kept private.
+The member is the entity that attempts to prove its group membership to the verifier. Members are authorized by the issuer as part of a group and each group member has a unique Intel® EPID private key. The member uses its member private key to sign a message to prove group membership without revealing its identity. An example of a member is a PC with an embedded Intel® EPID member private key.
+A name-based signature is a type of signature that gives the verifier the ability to link Intel® EPID signatures from the same member, reducing the member's privacy.
+A name-based signature is created using the additional parameter of a basename. If a basename is not specified, a random number is chosen as the basename. If the member uses the same basename, the verifier can mathematically link signatures generated by the member, showing that the signatures are from the same member.
+The member private key is the key used by the member to digitally sign a message when attempting to prove to the verifier that the member belongs to the group and is in good standing.
+Unique member private keys are generated by the issuer for each member of a given group. The same group public key corresponds to each member private key in the group.
+A non-revoked proof is part of an Intel® EPID signature that proves that the member is not a specific revoked entity in the signature based revocation list. The member provides the signature with a number of non-revoked proofs, one per revocation list entry, to prove to the verifier that the member does not correspond to any entry in the revocation list.
+Pairing is a mathematical operation that maps two elliptic curve groups to a third multiplicative group.
+Revocation lists are data structures used by the verifier to identify members that are no longer approved members of the group.
+The verifier obtains the member private key based revocation list (PrivRL), signature based revocation list (SigRL), and group based revocation list (GroupRL) from the issuer. The verifier can also maintain its own verifier blacklist (VerifierRL). Verifier blacklist revocation only works with name based signatures.
+The verifier is the entity that checks an Intel® EPID signature to establish whether it was signed by an entity or device that is a member in good standing.
+The verifier acts on behalf of a party that needs to know it is communicating with a trusted device. Verifiers obtain group certificates and revocation lists from issuers and negotiate details of signature protocol with members.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Some SDK APIs require a random number data source. A BitSupplier provides a source of random data. This function should be a cryptographically secure random number generator.
+Member code works with private keys, so member code must be run in a trusted environment.
+The EpidZeroMemory function is used by the memory allocation routines EpidAlloc, EpidRealloc and EpidFree to wipe the memory as memory is freed.
EpidZeroMemory function may be optimized away by some compilers. If it is, you should consider using a compiler or operating system specific memory sanitization function (e.g. memcpy_s or SecureZeroMemory).SDK math primitives are designed to be replaced with your own implementation if you need to rely on custom hardware for performance. The SDK is designed to simplify this process by isolating implementation details behind a clearly defined interface, defined by the non-internal headers in the epid/common/math directory. Math functionality has detailed tests to ease validation.
Serialized information in the SDK is passed in fixed size buffer types whenever possible. Collectively these fixed size buffer types are called Octstrings.
+In epid/common/types.h, there are a large number of packed structs that contain other packed structs, which eventually contain OctStr* types. Normally these are named *Str and are refered to as Str types.
+OctStr* types are buffers that hold N bits, where N is the number at the end of the type name. These types usually represent numbers in a Big Endian format (buffer[0] is the most significant value).
+Str types generally represent fixed size groups of numbers such as a point or vector.
+OctStr* and Str types are usually populated by reading a buffer from a file or other storage, or by calling a serialize function. OctStr* and Str types must be packed so that the compiler does not insert padding. In the current code, this is done using pragmas.
+Many APIs use void* parameters where OctStr* types are expected. If more than one size is allowed, a size parameter is usually also required.
+A common idiom in the SDK is the use of flexible array types. These types are structs with the last element being an array of size 1 of some type. Flexible array types always have a size value embedded in the struct. The name of the count and array fields differs between flexible array types.
+Flexible array types are expected to be in a buffer of size sizeof(FA) + ((N-1) * sizeof(E)) where FA is the flexible array type, N is the number of elements in the array and E is the type of each element. Note that this may be smaller than sizeof(FA) if N is 0, in which case referencing any element is an error.
In many cases, functions that accept flexible array types will also expect a buffer size that is compared against the computed size of the array as a sanity check.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
The Intel® EPID SDK does not include issuer APIs. That means you cannot generate the following items for validation:
+For validation purposes, you can use pre-generated sample data. This sample issuer material includes sample groups and revocation lists.
+Sample compressed key material is not included in the package.
+Group A (groupa) contains eight group members and sample revocation lists:
+
| Group Member | Revocation Status |
|---|---|
| groupa/member0 | Non-revoked |
| groupa/member1 | Non-revoked |
| groupa/privrevokedmember0 | Revoked in PrivRL |
| groupa/privrevokedmember1 | Revoked in PrivRL |
| groupa/privrevokedmember2 | Revoked in PrivRL |
| groupa/sigrevokedmember0 | Revoked in SigRL |
| groupa/sigrevokedmember1 | Revoked in SigRL |
| groupa/sigrevokedmember2 | Revoked in SigRL |
+
| Description | Directory Location | Revoked Members |
|---|---|---|
| Private key based revocation list | groupa/privrl.bin | privrevokedmember0, + privrevokedmember1, + privrevokedmember2 |
| Signature based revocation list | groupa/sigrl.bin | sigrevokedmember0, + sigrevokedmember1, + sigrevokedmember2 |
| Empty private key based revocation list | groupa/privrl_empty.bin | None |
| Empty signature based revocation list | groupa/sigrl_empty.bin | None |
+
Group B (groupb) contains four group members and sample revocation lists:
+
| Group Member | Revocation Status |
|---|---|
| groupb/member0 | Non-revoked |
| groupb/member1 | Non-revoked |
| groupb/privrevokedmember0 | Revoked in PrivRL |
| groupb/sigrevokedmember0 | Revoked in SigRL |
+
| Description | Directory Location | Revoked Members |
|---|---|---|
| Private key based revocation list | groupb/privrl.bin | privrevokedmember0 |
| Signature based revocation list | groupb/sigrl.bin | sigrevokedmember0 |
| Empty private key based revocation list | groupb/privrl_empty.bin | None |
| Empty signature based revocation list | groupb/sigrl_empty.bin | None |
If an entire group is no longer valid, the issuer can revoke it using the group based revocation list. Two sample group based revocation lists are provided with the SDK.
+
+
| Group Based Revocation List | Description |
|---|---|
grprl_empty.bin | No entries |
grprl.bin | One entry in which groupb is revoked |
Sample Groups
+Intel® EPID SDK supports use of compressed member private keys. The groups described here use compressed compressed member private keys but structuarlly corospond to groups described above.
+Group A (groupa) contains eight group members and sample revocation lists:
+
| Group Member | Revocation Status |
|---|---|
| groupa/member0 | Non-revoked |
| groupa/member1 | Non-revoked |
| groupa/privrevokedmember0 | Revoked in PrivRL |
| groupa/privrevokedmember1 | Revoked in PrivRL |
| groupa/privrevokedmember2 | Revoked in PrivRL |
| groupa/sigrevokedmember0 | Revoked in SigRL |
| groupa/sigrevokedmember1 | Revoked in SigRL |
| groupa/sigrevokedmember2 | Revoked in SigRL |
+
| Description | Directory Location | Revoked Members |
|---|---|---|
| Private key based revocation list | groupa/privrl.bin | privrevokedmember0, + privrevokedmember1, + privrevokedmember2 |
| Signature based revocation list | groupa/sigrl.bin | sigrevokedmember0, + sigrevokedmember1, + sigrevokedmember2 |
| Empty private key based revocation list | groupa/privrl_empty.bin | None |
| Empty signature based revocation list | groupa/sigrl_empty.bin | None |
+
Group B (groupb) contains four group members and sample revocation lists:
+
| Group Member | Revocation Status |
|---|---|
| groupb/member0 | Non-revoked |
| groupb/member1 | Non-revoked |
| groupb/privrevokedmember0 | Revoked in PrivRL |
| groupb/sigrevokedmember0 | Revoked in SigRL |
+
| Description | Directory Location | Revoked Members |
|---|---|---|
| Private key based revocation list | groupb/privrl.bin | privrevokedmember0 |
| Signature based revocation list | groupb/sigrl.bin | sigrevokedmember0 |
| Empty private key based revocation list | groupb/privrl_empty.bin | None |
| Empty signature based revocation list | groupb/sigrl_empty.bin | None |
If an entire group is no longer valid, the issuer can revoke it using the group based revocation list. Two sample group based revocation lists are provided with the SDK.
+
+
| Group Based Revocation List | Description |
|---|---|
grprl_empty.bin | No entries |
grprl.bin | One entry in which groupb is revoked |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL® PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
+UNLESS OTHERWISE AGREED IN WRITING BY INTEL, THE INTEL PRODUCTS ARE NOT DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR DEATH MAY OCCUR.
+Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information.
+The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request.
+Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order.
+Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or by visiting Intel's web site http://www.intel.com.
+Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and other countries.
+*Other names and brands may be claimed as the property of others.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
This in-depth explanation covers the available options to revoke members in the Intel® EPID scheme. It also provides details on how and why each type of revocation is used.
+
+
The verifier only checks the revocation lists if the message was signed with a member private key that corresponds with the correct group public key.
+After concluding that the signer is a member of a group, the verifier proceeds to check for group based revocation, then member private key based revocation, then signature based revocation, then verifier blacklist revocation.
+If the group is revoked, the verifier stops and reports it.
+If the member private key is revoked, the verifier does not check the signature based revocation list.
+The verifier should periodically download the revocation lists (GroupRL, PrivRL, and SigRL) from the issuer and should use the latest revocation list during signature verification. The verifier should make sure that it gets the newest version of the revocation list during the update by checking RLver, the revocation list version number.
+The group based revocation list, also called the GroupRL, has a list of revoked groups.
+The issuer revokes the entire Intel® EPID group by revoking the group public key. This results in the revocation of all members of a group.
+Group revocation is expected to be a rare event and would only happen under limited criteria.
+Reasons to revoke a group might include:
+Private key based revocation is used to revoke a compromised member. For example, the issuer can revoke a member if the member private key is exposed. When a compromised member private key is identified, it needs to be communicated to the issuer so that the issuer can revoke the member private key.
+The issuer manages and publishes the member private key revocation list, also called the PrivRL, which contains member private keys that can no longer be used.
+Depending on the use case, these member private keys could belong to members whose identity was compromised. For example, if a member private key is exposed online, allowing group members to be impersonated, then the compromised member private key is known, and the issuer revokes the member private key.
+In signature based revocation, the issuer revokes a member based on the signature generated by the member. This revocation method is used when a member becomes subject to revocation criteria, but the issuer does not know the member's member private key.
+The issuer manages and publishes the signature based revocation list, also called SigRL.
+Entries in the SigRL cause signing to take longer for all members of the group. Therefore, when an issuer receives a signature revocation request, it first checks the signature against all entries in the private key based revocation list. If the signature was generated by a revoked private key, then it is not placed in the SigRL.
+For the same reason, if the issuer were requested to revoke a private key, and the current SigRL had entries that corresponded to that private key, then the issuer would remove those entries from the SigRL.
+The verifier and the member both use the SigRL managed by the issuer (the method of obtaining the SigRL is outside the scope of the SDK). The member sends the verifier an Intel® EPID signature that includes a number of non-revoked proofs that correspond to each revoked member in the SigRL.
+In other words, the member mathematically proves that it is not any of the members who created the entries on the SigRL. One proof of non-revocation is generated by the member per entry in the SigRL. A single proof indicates the member in question cannot be the one who generated that signature in the SigRL.
+For privacy, Intel® EPID signatures that are generated by the same member are unlinkable by default. This means that the verifier cannot recognize if two Intel® EPID signatures are from the same device. Therefore, multiple Intel® EPID signatures on the SigRL could be from the same member.
+Reasons for revoking a signature might include the following:
+Verifier blacklist revocation is similar to signature based revocation in that it can be used to revoke a member using only a signature from a compromised member. Unlike the procedure for the signature based revocation list, members do not have to create non-revoked proofs for each entry on the verifier blacklist. Instead, the verifier relies on the member to use a basename when creating the signature (in other words, to use a name based signature) in order to determine if the same member created any of the signatures on the verifier blacklist.
+For the verifier to determine that a member created an entry on the verifier blacklist, the member and verifier must use the same basename. The mechanism that allows them to agree on a basename is outside the scope of the SDK.
+For more information on basenames, refer to Name Based Signatures.
+The verifier adds a signature to a blacklist when the verifier does not want to trust the signer, but the verifier does not have enough reason to send a request to the issuer to revoke the member's signature.
+When the verifier tracks a member using a basename, and decides the member is not trustworthy, the verifier can add the member's signature to the verifier blacklist.
+Reasons a verifier might revoke a member based on its tracked signatures include the following:
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
The SDK is divided into logical components to separate responsibilities and create interfaces that you can re-implement using custom tools such as hardware accelerators.
+
+
+ The Intel® EPID SDK is divided into the following components:
Components in the SDK Core implement the features of Intel® EPID.
+| Component | Description |
|---|---|
| member | Library containing APIs needed to implement a member |
| verifier | Library containing APIs needed to implement a verifier |
| common | Library containing common types and functions |
| math | Math primitives used by member and verifier |
| IPP | A C-only non-optimized subset of Intel® IPP |
Examples show how to use the SDK APIs in working code.
+| Component | Description |
|---|---|
| signmsg | A sample program showing how to sign messages |
| verfifysig | A sample program showing how to verify signatures |
| util | Common utilities used by samples |
| Sample Issuer Material | Sample keys and revocation lists |
Tools implement utility code to interact with Intel® EPID related services such as the Intel® Key GenerationFacility (iKGF)".
+| Component | Description |
|---|---|
| extractgrps | A tool to extract groups from a bulk group file |
| extractkeys | A tool to extract member keys from a bulk key file |
| revokegrp | A tool to create a revocation request for a group |
| revokekey | A tool to create a revocation request for a member key |
| revokesig | A tool to create a revocation request from a signature |
The SDK comes with a number of other components that support building and validating the code.
+| Component | Description |
|---|---|
| gtest | gtest unit test framework |
| Build Scripts | Scripts to configure and build the SDK |
Math primitives are implemented in the math sub-component of common. The reference math primitive implementation is based on a non-optimized Vanilla C subset of the Intel® Performance Primitives. Math is designed so that you can replace its implementation to call custom hardware IP blocks or optimized libraries.
+In addition to the default Intel® EPID 2.0 APIs, the verifier component also includes APIs that allow verification of Intel® EPID 1.1 signatures.
+Billions of existing devices, including most Intel platforms manufactured since 2008, create signatures that need Intel® EPID 1.1 verification.
+For details on verifying Intel® EPID 1.1 signatures see EPID 1.1 support in the API Reference.
+The Intel® EPID SDK has two filesystem layouts: the Source Layout and the Install Layout.
+The Source Layout is what you find when you download the SDK and extract it to disk. This layout contains all of the files that you need to build the libraries, samples, tests, and data generated by the SDK.
+The Install Layout is the layout of files under the _install folder after you build the SDK.
The Source Layout is used by the build scripts in the Intel® EPID SDK to find components and files needed to create libraries and executables.
epid-sdk/ +|__ LICENSE.txt Distribution license +|__ NOTICE.txt Legal notices +|__ README.md Readme +|__ CHANGELOG.md Change log +|__ SConstruct Main build configuration +| +|__ doc/ +| |__ html/ HTML format documentation +| |__ index.html Entry point for HTML format documentation +| +|__ epid/ +| |__ common/ Source for Common +| |__ common-testhelper/ Source for unit test helper common helpers +| |__ member/ Source for Member +| |__ verifier/ Source for Verifier +| +|__ example/ +| |__ data/ Binary data used for testing and tutorials +| |__ compressed_data/ Compressed Member Key Binary data used for testing and tutorials +| |__ signmsg/ Source for message signing example +| |__ util/ Common utilities for examples +| |__ verifysig/ Source for signature validation signing example +| +|__ ext/ +| |__ gtest/ Third party gtest library +| |__ ipp/ IPP library +| +|__ parts-site/ Parts platform config scripts +| +|__ tools/ + |__ extractgrps/ Tool to extract groups + |__ extractkeys/ Tool to extract keys + |__ revokegrp/ Tool to create group revocation request + |__ revokekey/ Tool to create a member key revocation request + |__ revokesig/ Tool to create a signature based revocation + request +
The Install Layout contains the data developers need to develop and build their applications using the Intel® EPID SDK. Once built, the Install Layout has no dependency on the Source Layout, allowing developers to build the SDK once and reuse the built files in other locations or on other computers.
_install/ +|__ epid-sdk/ + |__ include/ C include header files for the SDK + |__ lib/ + | |__ <platform> Target specific static libraries for the SDK + | + |__example/ Sample applications and data + |__test/ Unit test executables (if unit tests built) + |__tools/ Tools
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
The Intel® EPID SDK provides example tools to show you how to use the Intel® EPID SDK APIs. These examples are called signmsg and verifysig.
+You can build these examples using the instructions in Building from Source. The tutorial assumes _install/epid-sdk/example is the current directory.
All command lines in this tutorial use posix command line conventions; for other systems, adjust accordingly.
+For the code used in this tutorial, refer to Walkthroughs of Examples Showing API Usage.
+_install/epid-sdk/example/data directory. See Sample Issuer Material.The example application signmsg shows you how to create an Intel® EPID signature of a given message.
$ ./signmsg -h
+Usage: signmsg [OPTION]...
+Create Intel(R) EPID signature of message
+
+Options:
+ --sig=FILE
+ write signature to FILE (default: sig.dat)
+
+ --msg=MESSAGE
+ MESSAGE to sign
+
+ --bsn=BASENAME
+ BASENAME to sign with (default: random)
+
+ --sigrl=FILE
+ load signature based revocation list from FILE
+
+ --gpubkey=FILE
+ load group public key from FILE (default: pubkey.bin)
+
+ --mprivkey=FILE
+ load member private key from FILE (default: mprivkey.dat)
+
+ --mprecmpi=FILE
+ load pre-computed member data from FILE
+
+ --mprecmpo=FILE
+ write pre-computed member data to FILE
+
+ --capubkey=FILE
+ load IoT Issuing CA public key from FILE (default: cacert.bin)
+
+ --hashalg={SHA-256 | SHA-384 | SHA-512}
+ use specified hash algorithm (default: SHA-512)
+
+ -h, --help
+ display this help and exit
+
+ -v, --verbose
+ print status messages to stdout
+To sign a message, a group member in good standing uses the following command:
$ ./signmsg --msg="test0" +
The above command signs a message "test0". signmsg uses default options for the group public key, member private key, hash algorithm and IoT Issuing CA public key. All other parameters that are not given are ignored. The command produces a signature file: sig.dat
The example application verifysig shows you how to verify that a given Intel® EPID signature is produced by a member in good standing.
$ ./verifysig -h
+Usage: verifysig [OPTION]...
+Verify signature was created by group member in good standing
+
+Options:
+ --sig=FILE
+ load signature from FILE (default: sig.dat)
+
+ --msg=MESSAGE
+ MESSAGE that was signed (default: empty)
+
+ --bsn=BASENAME
+ BASENAME used in signature (default: random)
+
+ --privrl=FILE
+ load private key revocation list from FILE
+
+ --sigrl=FILE
+ load signature based revocation list from FILE
+
+ --grprl=FILE
+ load group revocation list from FILE
+ (default: grprl.bin)
+
+ --verifierrl=FILE
+ load verifier revocation list from FILE
+
+ --gpubkey=FILE
+ load group public key from FILE (default: pubkey.bin)
+
+ --vprecmpi=FILE
+ load pre-computed verifier data from FILE
+
+ --vprecmpo=FILE
+ write pre-computed verifier data to FILE
+
+ --capubkey=FILE
+ load IoT Issuing CA public key from FILE
+ (default: cacert.bin)
+
+ --hashalg={SHA-256 | SHA-384 | SHA-512}
+ use specified hash algorithm for 2.0 groups (default: SHA-512)
+
+ -h, --help
+ display this help and exit
+
+ -v, --verbose
+ print status messages to stdout
+To verify that a signature is from a member in good standing, the verifier uses the following command:
$ ./verifysig --msg="test0" +signature verified successfully +
This verifies that the default signature file sig.dat is generated for the message "test0" by a member in good standing. verifysig uses default inputs for group public key, hash algorithm and IoT Issuing CA public key. All other parameters are ignored. The output verifysig: signature verified successfully denotes that the verification is successful.
A name based signature is created using the additional parameter of a basename. If the member uses the same basename, the verifier can mathematically link signatures generated by the member, showing that the signatures are from the same member.
+To validate a signature with a basename, you need to use the same basename for signing and verification. The mechanism for ensuring that the member and verifier use the same basename is outside the scope of the SDK.
+If a basename is not provided, then the member uses a random basename and the signature generated by the member is anonymous.
+For more general information on why you might want to use a basename, refer to Name Based Signatures.
+To sign message "test0" with a basename "base0":
$ ./signmsg --msg="test0" --bsn="base0" +
To verify the signature:
$ ./verifysig --msg="test0" --bsn="base0" +verifysig: signature verified successfully +
To validate a signature, you need to use the same message for signing and verification. The mechanism for ensuring that the member and verifier use the same message is outside the scope of the SDK.
+Member and verifier must also use the same hash algorithm and basename, if applicable.
+The signature verification process fails if there is a parameter mismatch between sign and verify operations. Here are some examples.
+Verification fails if there is a mismatch in the message:
$ ./signmsg --msg="test0" +$ ./verifysig --msg="test1" +verifysig: signature verification failed: invalid signature +
Verification fails if there is a mismatch in the basename:
$ ./signmsg --msg="test0" --bsn="base0" +$ ./verifysig --msg="test0" --bsn="base1" +verifysig: signature verification failed: invalid signature +
The Intel® EPID SDK supports the following hash algorithms: SHA-256, SHA-384, SHA-512. The selected hash algorithm must be the same for both sign and verify. Mismatch in hash algorithm results in verification failure:
$ ./signmsg --msg="test0" --hashalg=SHA-256 +$ ./verifysig --msg="test0" --hashalg=SHA-384 +verifysig: signature verification failed: invalid signature +
Revocation lists are data structures used by the verifier to identify members that are no longer approved members of the group.
+The verifier obtains the member private key based revocation list (PrivRL), signature based revocation list (SigRL), and group based revocation list (GroupRL) from the issuer. The verifier can also maintain its own verifier blacklist (VerifierRL).
+Verification of a signature fails if it is generated by a member of a group that is revoked in the group revocation list.
+For example,
$ ./signmsg --msg="test0" --gpubkey=data/groupb/pubkey.bin --mprivkey=data/groupb/member0/mprivkey.dat +$ ./verifysig --msg="test0" --grprl=data/grprl.bin --gpubkey=data/groupb/pubkey.bin +verifysig: signature verification failed: signature revoked in GroupRl +
The verification fails because groupb is revoked and is an entry in the group revocation list (grprl.bin).
Verification of a signature fails if it is generated by a member whose private key is revoked in a private-key based revocation list.
+For example,
$ ./signmsg --msg=test0 --gpubkey=data/groupa/pubkey.bin --mprivkey=data/groupa/privrevokedmember0/mprivkey.dat +$ ./verifysig --msg=test0 --privrl=data/groupa/privrl.bin --gpubkey=data/groupa/pubkey.bin +verifysig: signature verification failed: signature revoked in PrivRl +
The verification fails because the private key of privrevokedmember0 is revoked and is an entry in the private key based revocation list of groupa (privrl.bin).
Verification of a signature fails if it is generated by a member whose signature is revoked in a signature based revocation list.
$ ./signmsg --msg="test1" --sigrl=data/groupa/sigrl.bin --gpubkey=data/groupa/pubkey.bin --mprivkey=data/groupa/sigrevokedmember0/mprivkey.dat +signmsg: signature revoked in SigRL +$ ./verifysig --msg="test1" --sigrl=data/groupa/sigrl.bin --gpubkey=data/groupa/pubkey.bin +verifysig: signature verification failed: signature revoked in SigRl +
The message "test1" is signed by signmsg with a warning signmsg: signature revoked in SigRL. This means that the signature of sigrevokedmember0 is revoked in the signature based revocation list. The verification fails because the signature was generated by sigrevokedmember0, which is revoked and is an entry in the signature based revocation list of groupa (sigrl.bin).
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
This walkthrough of the signmsg example shows you how to use SDK APIs to generate an Intel® EPID signature. Signmsg is built during the SDK build.
+
+
First, we include headers so we have access to needed declarations.
+The prng.h header provides access to a pseudo-random number generator needed for signing, while the utility headers are used by signmsg for logging and buffer management. The epid/member/api.h header provides access to the core member APIs. The epid/common/file_parser.h header provides an API for parsing buffers formatted according to the various IoT Intel® EPID binary file formats.
+
We define a stub function responsible for checking that the CA certificate is authorized by the root CA.
+IsCaCertAuthorizedByRootCa is called from main.c to validate the CA certificate before calling SignMsg. In an actual implementation, you need to provide an implementation to validate the issuing CA certificate with the CA root certificate before using it in parse functions.
+
The core signing functionality is contained in SignMsg.
The SignMsg parameters are either received by the member, or they are part of the member's configuration. The exceptions are the sig and sig_len parameters, which are used to output the signature.
The verifier might send the message to the member or there may be another mechanism to choose the message, but the way the message is communicated is outside the scope of the Intel® EPID scheme.
+We use the parameters member_precomp and member_precomp_is_input to pass in a pre-computation blob if provided. We can use the pre-computation blob to increase performance when verifying signatures repeatedly with the same group public key.
The member knows the group public key and the member private key.
+The member and the verifier agree on the message, basename, hash algorithm, and SigRL that the member uses for signing.
+
+
Next we do basic variable setup and argument checking.
+We create pointers to resources to be allocated and use the do {} while(0) idiom so that we can reliably free resources on return from SignMsg.
We create variables on the stack to hold the group public key and member private key.
+Finally we check to make sure that sig is a vaild pointer.
+
Next, we authenticate and extract the group public key using EpidParseGroupPubKeyFile.
+EpidParseGroupPubKeyFile takes a buffer containing a group public key in issuer binary format and validates that the public key is signed by the private key that corresponds to the provided CA certificate, extracting the key in the process.
+
+
We authenticate and extract the signed SigRL using EpidParseSigRlFile.
+We use EpidParseSigRlFile to:
+To determine the required sig_rl output buffer size, we provide a null pointer for the output buffer when calling EpidParseSigRlFile. This updates sig_rl_size with the required size of the output buffer.
After we find out the required size of the sig_rl, we allocate a buffer for the sig_rl. Then we fill the buffer using EpidParseSigRlFile.
+
Next, we fill the member private key.
+If the member private key is compressed, then we decompress it using EpidDecompressPrivKey before it can be passed to the member APIs. To determine if the member private key is compressed, we check if it is the known size of a compressed key.
+If the key size is not the size of a known format, we return an error.
+
+
Next, we create a pseudo-random number generator.
+ +prng should be a cryptographically secure random number generator.
+
Now that the inputs have been prepared, we create a member context using EpidMemberCreate.
+If a pre-computation blob is provided to the top level application, we use it. Otherwise, we pass in NULL.
+
We serialize pre-computed member data using EpidMemberWritePrecomp.
+ +The serialized member pre-computation blob can be used to greatly increase performance of EpidMemberCreate in future sessions if the same member private key is used.
+
+
Next, if a basename is specified, we register it with EpidRegisterBaseName so that the member can use it.
+In a typical use case, to prevent loss of privacy, the member keeps a list of basenames that correspond to authorized verifiers. The member signs a message with a basename only if the basename is in the member's basename list.
+
+
Then we set the hash algorithm to be used by the member using EpidMemberSetHashAlg.
+ +After the hash algorithm is set, future calls to EpidSign will use the same algorithm.
+
Next, we sign the message, generating an Intel® EPID signature.
+To create a signature, first we find out the required size of the signature using EpidGetSigSize. Then we allocate a buffer for the signature and fill the buffer using EpidSign.
+It is important to compute signature size after loading sig_rl because the signature size varies with the size of the SigRL.
+
Finally, we clean up and exit.
+If we made it past signing without an error, we set the return code appropriately and fall out of the do-while loop. If there was an error earlier, all breaks in the do-while loop bring us to this point with an error status.
+Next, we free the allocated resources. EpidMemberDelete deletes an existing member context.
+We return from SignMsg with the success or error status.
+
+
This concludes the signmsg walkthrough. Now you should be able to generate an Intel® EPID signature that proves a member's group membership to a verifier without revealing the member's identity.
To learn more about the SDK APIs see the API Reference. To learn more about the Intel® EPID scheme see Introduction to the Intel® EPID Scheme in the documentation.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
This walkthrough of the verifysig example shows you how to use SDK APIs to verify an Intel® EPID 2.0 signature. Verifysig is built during the SDK build.
To verify an Intel® EPID 1.1 signature see the example code in verifysig11.c. For information on Intel® EPID 1.1 speciifc APIs see EPID 1.1 support.
+
First, we include headers so we have access to needed declarations.
+The utility headers are used by verifysig for logging and buffer management. The epid/verifier/api.h header provides access to the core verifier APIs, and the epid/common/file_parser.h header provides an API for parsing buffers formatted according to the various IoT Intel® EPID binary file formats.
+
We define a stub function responsible for checking that the CA certificate is authorized by the root CA.
+IsCaCertAuthorizedByRootCa is called from main.c to validate the CA certificate before calling Verify. In an actual implementation, you need to provide an implementation to validate the issuing CA certificate with the CA root certificate before using it in parse functions.
+
We use Verify to verify an Intel® EPID signature. Verify is a wrapper function that isolates SDK API functionality for the purpose of this walkthrough.
The Verify parameters were either sent by the verifier to the member, or they were part of the member's configuration. The exceptions are the sig and sig_len parameters, which we use to input the signature to be verified.
The verifier might send the message to the member or there may be another mechanism to choose the message, but the way the message is communicated is outside the scope of the Intel® EPID scheme.
+We use the parameters verifier_precomp and verifier_precomp_is_input to pass in a pre-computation blob if provided. We can use the pre-computation blob to increase performance when verifying signatures repeatedly with the same group public key.
The member and the verifier agree on the message, basename, hash algorithm, and SigRL that the verifier uses for verification.
+
+
Next we do basic variable setup.
+We create pointers to resources to be allocated and we use the do {} while(0) idiom so that we can reliably free resources on return from Verify. We also allocate the group public key on the stack.
+
Next, we authenticate and extract the group public key using EpidParseGroupPubKeyFile.
+EpidParseGroupPubKeyFile takes a buffer containing a group public key in issuer binary format and validates that the public key is signed by the private key that corresponds to the provided CA certificate, reading the key into pub_key in the process.
+
Next, we create a verifier context using EpidVerifierCreate.
+If a pre-computation blob is provided to the top level application, we use it. Otherwise, we pass in NULL.
+
Then we serialize pre-computed verifier data using EpidVerifierWritePrecomp.
+ +The serialized verifier pre-computation blob can be used to greatly increase performance of EpidVerifierCreate in future sessions if the same group public key is used.
+
+
We use EpidVerifierSetHashAlg to indicate the hash algorithm used for verification, which should be the same algorithm that the member used when signing.
+ +After the hash algorithm is set, future calls to EpidVerify will use the same algorithm.
+
+
We use EpidVerifierSetBasename to indicate the basename used for verification, which should be the same one that the member used when signing.
+ +After the basename is set, future calls to EpidVerify will use the same basename.
+
+
Before we verify a signature, we have to configure revocation lists so that we can check to see if a signer's group membership has been revoked.
+
+
We set the private key based revocation list using EpidVerifierSetPrivRl.
+We use EpidParsePrivRlFile to:
+To determine the required priv_rl buffer size, we provide a null pointer for the output buffer when calling EpidParsePrivRlFile.
After we find out the required size of the priv_rl buffer, we allocate memory for it. Then we fill the buffer using EpidParsePrivRlFile.
+
Next, we set the signature based revocation list using EpidVerifierSetSigRl.
+We use EpidParseSigRlFile to:
+To determine the required sig_rl buffer size, we provide a null pointer for the output buffer when calling EpidParseSigRlFile.
After we find out the required size of the sig_rl buffer, we allocate memory for it. Then we fill the buffer using EpidParseSigRlFile.
+
Next, we set the group based revocation list using EpidVerifierSetGroupRl.
+We use EpidParseGroupRlFile to:
+To determine the required grp_rl buffer size, we provide a null pointer for the output buffer when calling EpidParseGroupRlFile.
After we find out the required size of the grp_rl buffer, we allocate memory for it. Then we fill the buffer using EpidParseGroupRlFile.
+
Next, we set the verifier blacklist using EpidVerifierSetVerifierRl.
+The verifier is responsible for ensuring that the verifier revocation list is authorized. Validating it is outside the scope of this example.
+
+
Next, we use EpidVerify to verify that the Intel® EPID signature was created by a valid member of a group in good standing.
+Finally, we clean up and exit.
+If we made it past verification without an error, we set the return code appropriately and fall out of the do-while loop. If there was an error earlier, all breaks in the do-while loop bring us to this point with an error status.
Then we free the allocated resources. EpidVerifierDelete deletes the verifier context.
+After deleting the verifier context, we can also delete the revocation lists.
+We return from Verify with the success or error status.
+
This concludes the verifysig walkthrough. Now you should be able to verify an Intel® EPID signature using the SDK APIs.
To learn more about the SDK APIs see the API Reference. To learn more about the Intel® EPID Scheme see Introduction to the Intel® EPID Scheme in the documentation.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
| CBasicSignature | Intel(R) EPID 2.0 basic signature |
| CBigNumStr | Serialized BigNum |
| CCompressedPrivKey | Compressed private key |
| CEcdsaPrivateKey | ECDSA Private Key |
| CEcdsaPublicKey | ECDSA Public Key |
| CEcdsaSignature | ECDSA Signature using NIST 256-bit curve secp256r1 |
| CEpid11BasicSignature | Intel(R) EPID 1.1 basic signature |
| CEpid11G2ElemStr | Serialized Intel(R) EPID 1.1 G2 element |
| CEpid11GroupPubKey | Intel(R) EPID 1.1 group public key |
| CEpid11GroupRl | Intel(R) EPID 1.1 group revocation list |
| CEpid11GtElemStr | Serialized Intel(R) EPID 1.1 GT element |
| CEpid11NrProof | Intel(R) EPID 1.1 non-revoked Proof |
| CEpid11Params | Intel(R) EPID 1.1 Parameters |
| CEpid11PrivRl | Intel(R) EPID 1.1 private-key based revocation list |
| CEpid11Signature | Intel(R) EPID 1.1 Signature |
| CEpid11SigRl | Intel(R) EPID 1.1 signature based revocation list |
| CEpid11SigRlEntry | Intel(R) EPID 1.1 entry in SigRL (B,K) |
| CEpid11VerifierPrecomp | Intel(R) EPID 1.1 Pre-computed verifier settings |
| CEpid2Params | Intel(R) EPID 2.0 Parameters |
| CEpidCaCertificate | IoT CA Certificate binary format |
| CEpidFileHeader | Intel(R) EPID binary file header |
| CEpidSignature | Intel(R) EPID 2.0 Signature |
| CFpElemStr | Number in [0, p-1] |
| CFq12ElemStr | Serialized Fq2^3^2 element |
| CFq2ElemStr | Serialized Fq2 element |
| CFq3ElemStr | Serialized Fq3 element |
| CFq6ElemStr | Serialized Fq2^3 element |
| CFqElemStr | Number in [0, q-1] |
| CG1ElemStr | Serialized G1 element |
| CG2ElemStr | Serialized G2 element |
| CGroupPubKey | Intel(R) EPID 2.0 group public key |
| CGroupRl | Group revocation list |
| CGtElemStr | Serialized GT element |
| CIPrivKey | Intel(R) EPID 2.0 issuing private key |
| CJoinRequest | Join request |
| CMemberPrecomp | Pre-computed member settings |
| CMembershipCredential | Membership credential |
| CNrProof | Non-revoked Proof |
| COctStr128 | 128 bit octet string |
| COctStr16 | 16 bit octet string |
| COctStr256 | 256 bit octet string |
| COctStr32 | 32 bit octet string |
| COctStr512 | 512 bit octet string |
| COctStr600 | 600 bit octet string |
| COctStr64 | 64 bit octet string |
| COctStr768 | 768 bit octet string |
| COctStr8 | 8 bit octet string |
| COctStr80 | 80 bit octet string |
| CPreComputedSignature | Pre-computed signature |
| CPrivKey | Intel(R) EPID 2.0 private key |
| CPrivRl | Private-key based revocation list |
| CSha256Digest | SHA256 digest |
| CSigRl | Signature based revocation list |
| CSigRlEntry | Entry in SigRL (B,K) |
| CVerifierPrecomp | Pre-computed verifier settings |
| CVerifierRl |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
This file is used by Doxygen to generate documentation. +More...
+This file is used by Doxygen to generate documentation.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Big number interface. +More...
+#include <stddef.h>#include <stdint.h>#include "epid/common/stdtypes.h"#include "epid/common/errors.h"#include "epid/common/types.h"+Typedefs | |
| +typedef struct BigNum | BigNum |
| Internal representation of large numbers. | |
+Functions | |
| EpidStatus | NewBigNum (size_t data_size_bytes, BigNum **bignum) |
| Constructs a new BigNum. More... | |
| void | DeleteBigNum (BigNum **bignum) |
| Deletes a previously allocated BigNum. More... | |
| EpidStatus | ReadBigNum (void const *bn_str, size_t strlen, BigNum *bn) |
| Deserializes a BigNum from a string. More... | |
| EpidStatus | WriteBigNum (BigNum const *bn, size_t strlen, void *bn_str) |
| Serializes a BigNum to a string. More... | |
| EpidStatus | BigNumAdd (BigNum const *a, BigNum const *b, BigNum *r) |
| Adds two BigNum values. More... | |
| EpidStatus | BigNumSub (BigNum const *a, BigNum const *b, BigNum *r) |
| Subtracts two BigNum values. More... | |
| EpidStatus | BigNumMul (BigNum const *a, BigNum const *b, BigNum *r) |
| Multiplies two BigNum values. More... | |
| EpidStatus | BigNumDiv (BigNum const *a, BigNum const *b, BigNum *q, BigNum *r) |
| Divides two BigNum values. More... | |
| EpidStatus | BigNumMod (BigNum const *a, BigNum const *b, BigNum *r) |
| Computes modular reduction for BigNum value by specified modulus. More... | |
| EpidStatus | BigNumIsEven (BigNum const *a, bool *is_even) |
| Checks if a BigNum is even. More... | |
| EpidStatus | BigNumIsZero (BigNum const *a, bool *is_zero) |
| Checks if a BigNum is zero. More... | |
| EpidStatus | BigNumPow2N (unsigned int n, BigNum *r) |
| Raises 2 to the given power. More... | |
Big number interface.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Random data supplier interface. +More...
++Typedefs | |
| typedef int(__STDCALL * | BitSupplier) (unsigned int *rand_data, int num_bits, void *user_data) |
| Generates random data. More... | |
Random data supplier interface.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
This file is used by Doxygen to generate documentation. +More...
+This file is used by Doxygen to generate documentation.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
This file is used by Doxygen to generate documentation. +More...
+This file is used by Doxygen to generate documentation.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
This file is used by Doxygen to generate documentation. +More...
+This file is used by Doxygen to generate documentation.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
+Files | |
| file | file_parser.h |
| Epid 1.1 issuer material parsing utilities. | |
| file | types.h |
| SDK data types for Intel(R) EPID 1.1. | |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
+Files | |
| file | api.h |
| Intel(R) EPID SDK verifier Intel(R) EPID 1.1 API. | |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Math primitives.
+ +More... ++Files | |
| file | bignum.h |
| Big number interface. | |
| file | ecdsa.h |
| Ecdsa interface. | |
| file | ecgroup.h |
| Elliptic curve group interface. | |
| file | finitefield.h |
| Finite field interface. | |
| file | hash.h |
| Hash primitives. | |
| file | pairing.h |
| Pairing interface. | |
| file | printutils.h |
| Print helper interface. | |
| file | tatepairing.h |
| Intel(R) EPID 1.1 Pairing interface. | |
Math primitives.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Common code shared between core sub-components.
+ +More... ++Directories | |
| directory | math |
| Math primitives. | |
+Files | |
| file | bitsupplier.h |
| Random data supplier interface. | |
| file | errors.h |
| Error reporting. | |
| file | file_parser.h |
| Epid issuer material parsing utilities. | |
| file | stdtypes.h |
| C99 standard data types. | |
| file | types.h |
| SDK data types. | |
Common code shared between core sub-components.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Ecdsa interface. +More...
+#include <stddef.h>#include "epid/common/errors.h"#include "epid/common/types.h"#include "epid/common/bitsupplier.h"+Functions | |
| EpidStatus | EcdsaVerifyBuffer (void const *buf, size_t buf_len, EcdsaPublicKey const *pubkey, EcdsaSignature const *sig) |
| Verifies authenticity of a digital signature over a buffer. More... | |
| EpidStatus | EcdsaSignBuffer (void const *buf, size_t buf_len, EcdsaPrivateKey const *privkey, BitSupplier rnd_func, void *rnd_param, EcdsaSignature *sig) |
| Creates ECDSA signature of buffer. More... | |
Ecdsa interface.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Elliptic curve group interface. +More...
+#include "epid/common/stdtypes.h"#include "epid/common/errors.h"#include "epid/common/math/bignum.h"#include "epid/common/math/finitefield.h"#include "epid/common/types.h"+Typedefs | |
| +typedef struct EcGroup | EcGroup |
| Elliptic curve group over finite field. | |
| +typedef struct EcPoint | EcPoint |
| Point on elliptic curve over finite field. | |
+Functions | |
| EpidStatus | NewEcGroup (FiniteField const *ff, FfElement const *a, FfElement const *b, FfElement const *x, FfElement const *y, BigNum const *order, BigNum const *cofactor, EcGroup **g) |
| Constructs a new EcGroup. More... | |
| void | DeleteEcGroup (EcGroup **g) |
| Deletes a previously allocated EcGroup. More... | |
| EpidStatus | NewEcPoint (EcGroup const *g, EcPoint **p) |
| Creates a new EcPoint. More... | |
| void | DeleteEcPoint (EcPoint **p) |
| Deletes a previously allocated EcPoint. More... | |
| EpidStatus | ReadEcPoint (EcGroup *g, void const *p_str, size_t strlen, EcPoint *p) |
| Deserializes an EcPoint from a string. More... | |
| EpidStatus | WriteEcPoint (EcGroup *g, EcPoint const *p, void *p_str, size_t strlen) |
| Serializes an EcPoint to a string. More... | |
| EpidStatus | EcMul (EcGroup *g, EcPoint const *a, EcPoint const *b, EcPoint *r) |
| Multiplies two elements in an elliptic curve group. More... | |
| EpidStatus | EcExp (EcGroup *g, EcPoint const *a, BigNumStr const *b, EcPoint *r) |
| Raises a point in an elliptic curve group to a power. More... | |
| EpidStatus | EcSscmExp (EcGroup *g, EcPoint const *a, BigNumStr const *b, EcPoint *r) |
| Software side-channel mitigated implementation of EcExp. More... | |
| EpidStatus | EcMultiExp (EcGroup *g, EcPoint const **a, BigNumStr const **b, size_t m, EcPoint *r) |
| Multi-exponentiates elements in elliptic curve group. More... | |
| EpidStatus | EcMultiExpBn (EcGroup *g, EcPoint const **a, BigNum const **b, size_t m, EcPoint *r) |
| Multi-exponentiates elements in elliptic curve group. More... | |
| EpidStatus | EcSscmMultiExp (EcGroup *g, EcPoint const **a, BigNumStr const **b, size_t m, EcPoint *r) |
| Software side-channel mitigated implementation of EcMultiExp. More... | |
| EpidStatus | EcGetRandom (EcGroup *g, BitSupplier rnd_func, void *rnd_func_param, EcPoint *r) |
| Generates a random element from an elliptic curve group. More... | |
| EpidStatus | EcInGroup (EcGroup *g, void const *p_str, size_t strlen, bool *in_group) |
| Checks if a point is in an elliptic curve group. More... | |
| EpidStatus | Epid11EcHash (EcGroup *g, void const *msg, size_t msg_len, EcPoint *r) |
| Hashes an arbitrary message to an Intel(R) EPID 1.1 element in an elliptic curve group. More... | |
| EpidStatus | EcHash (EcGroup *g, void const *msg, size_t msg_len, HashAlg hash_alg, EcPoint *r) |
| Hashes an arbitrary message to an element in an elliptic curve group. More... | |
| EpidStatus | EcMakePoint (EcGroup *g, FfElement const *x, EcPoint *r) |
| Sets an EcPoint variable to a point on a curve. More... | |
| EpidStatus | EcInverse (EcGroup *g, EcPoint const *p, EcPoint *r) |
| Computes the additive inverse of an EcPoint. More... | |
| EpidStatus | EcIsEqual (EcGroup *g, EcPoint const *a, EcPoint const *b, bool *is_equal) |
| Checks if two EcPoints are equal. More... | |
| EpidStatus | EcIsIdentity (EcGroup *g, EcPoint const *p, bool *is_identity) |
| Checks if an EcPoint is the identity element. More... | |
Elliptic curve group interface.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
This file is used by Doxygen to generate documentation. +More...
+This file is used by Doxygen to generate documentation.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Error reporting. +More...
++Enumerations | |
| enum | EpidStatus { + kEpidNoErr = 0, +kEpidSigValid = 0, +kEpidSigInvalid = 1, +kEpidSigRevokedInGroupRl = 2, + + kEpidSigRevokedInPrivRl = 3, +kEpidSigRevokedInSigRl = 4, +kEpidSigRevokedInVerifierRl = 5, +kEpidErr = -999, + + kEpidNotImpl, +kEpidBadArgErr, +kEpidNoMemErr, +kEpidMemAllocErr, + + kEpidMathErr, +kEpidDivByZeroErr, +kEpidUnderflowErr, +kEpidHashAlgorithmNotSupported, + + kEpidRandMaxIterErr, +kEpidDuplicateErr, +kEpidInconsistentBasenameSetErr, +kEpidMathQuadraticNonResidueError + + } |
| Return status for SDK functions. More... | |
+Functions | |
| char const * | EpidStatusToString (EpidStatus e) |
| Returns string representation of error code. More... | |
Error reporting.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
This file is used by Doxygen to generate documentation. +More...
+This file is used by Doxygen to generate documentation.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Epid issuer material parsing utilities. +More...
++Data Structures | |
| struct | EpidFileHeader |
| Intel(R) EPID binary file header. More... | |
| struct | EpidCaCertificate |
| IoT CA Certificate binary format. More... | |
+Enumerations | |
| enum | EpidVersion { kEpid1x, +kEpid2x, +kNumEpidVersions + } |
| Recognized Intel(R) EPID versions. More... | |
| enum | EpidFileType { + kIssuingCaPubKeyFile, +kGroupPubKeyFile, +kPrivRlFile, +kSigRlFile, + + kGroupRlFile, +kPrivRlRequestFile, +kSigRlRequestFile, +kGroupRlRequestFile, + + kNumFileTypes + + } |
| Recognized Intel(R) EPID file types. More... | |
+Functions | |
| EpidStatus | EpidParseFileHeader (void const *buf, size_t len, EpidVersion *epid_version, EpidFileType *file_type) |
| Extracts Intel(R) EPID Binary Output File header information. More... | |
| EpidStatus | EpidParseGroupPubKeyFile (void const *buf, size_t len, EpidCaCertificate const *cert, GroupPubKey *pubkey) |
| Extracts group public key from buffer in issuer binary format. More... | |
| EpidStatus | EpidParsePrivRlFile (void const *buf, size_t len, EpidCaCertificate const *cert, PrivRl *rl, size_t *rl_len) |
| Extracts private key revocation list from buffer in issuer binary format. More... | |
| EpidStatus | EpidParseSigRlFile (void const *buf, size_t len, EpidCaCertificate const *cert, SigRl *rl, size_t *rl_len) |
| Extracts signature revocation list from buffer in issuer binary format. More... | |
| EpidStatus | EpidParseGroupRlFile (void const *buf, size_t len, EpidCaCertificate const *cert, GroupRl *rl, size_t *rl_len) |
| Extracts group revocation list from buffer in issuer binary format. More... | |
+Variables | |
| +const OctStr16 | kEpidVersionCode [kNumEpidVersions] |
| Encoding of issuer material Intel(R) EPID versions. | |
| +const OctStr16 | kEpidFileTypeCode [kNumFileTypes] |
| Encoding of issuer material file types. | |
Epid issuer material parsing utilities.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
| ▼ epid | Core Intel® EPID functionality |
| ▼ common | Common code shared between core sub-components |
| ▼ 1.1 | |
| file_parser.h | Epid 1.1 issuer material parsing utilities |
| types.h | SDK data types for Intel(R) EPID 1.1 |
| ▼ math | Math primitives |
| bignum.h | Big number interface |
| ecdsa.h | Ecdsa interface |
| ecgroup.h | Elliptic curve group interface |
| finitefield.h | Finite field interface |
| hash.h | Hash primitives |
| pairing.h | Pairing interface |
| printutils.h | Print helper interface |
| tatepairing.h | Intel(R) EPID 1.1 Pairing interface |
| bitsupplier.h | Random data supplier interface |
| errors.h | Error reporting |
| file_parser.h | Epid issuer material parsing utilities |
| stdtypes.h | C99 standard data types |
| types.h | SDK data types |
| ▼ member | Member functionality |
| api.h | Intel(R) EPID SDK member API |
| ▼ verifier | Verifier functionality |
| ▼ 1.1 | |
| api.h | Intel(R) EPID SDK verifier Intel(R) EPID 1.1 API |
| api.h | Intel(R) EPID SDK verifier API |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Finite field interface. +More...
+#include "epid/common/stdtypes.h"#include "epid/common/bitsupplier.h"#include "epid/common/errors.h"#include "epid/common/math/bignum.h"#include "epid/common/types.h"+Typedefs | |
| +typedef struct FiniteField | FiniteField |
| A finite field. | |
| +typedef struct FfElement | FfElement |
| An element in a finite field. | |
+Functions | |
| EpidStatus | NewFiniteField (BigNumStr const *prime, FiniteField **ff) |
| Creates new finite field. More... | |
| EpidStatus | NewFiniteFieldViaBinomalExtension (FiniteField const *ground_field, FfElement const *ground_element, int degree, FiniteField **ff) |
| Creates a new finite field using binomial extension. More... | |
| EpidStatus | NewFiniteFieldViaPolynomialExtension (FiniteField const *ground_field, BigNumStr const *irr_polynomial, int degree, FiniteField **ff) |
| Creates a new finite field using polynomial extension. More... | |
| void | DeleteFiniteField (FiniteField **ff) |
| Frees a previously allocated FiniteField. More... | |
| EpidStatus | NewFfElement (FiniteField const *ff, FfElement **new_ff_elem) |
| Creates a new finite field element. More... | |
| void | DeleteFfElement (FfElement **ff_elem) |
| Frees a previously allocated FfElement. More... | |
| EpidStatus | ReadFfElement (FiniteField *ff, void const *ff_elem_str, size_t strlen, FfElement *ff_elem) |
| Deserializes a FfElement from a string. More... | |
| EpidStatus | InitFfElementFromBn (FiniteField *ff, BigNum *bn, FfElement *ff_elem) |
| Initializes an existing FfElement from a BigNum. More... | |
| EpidStatus | WriteFfElement (FiniteField *ff, FfElement const *ff_elem, void *ff_elem_str, size_t strlen) |
| Serializes a finite field element to a string. More... | |
| EpidStatus | FfNeg (FiniteField *ff, FfElement const *a, FfElement *r) |
| Calculates the additive inverse of a finite field element. More... | |
| EpidStatus | FfInv (FiniteField *ff, FfElement const *a, FfElement *r) |
| Calculates the multiplicative inverse of a finite field element. More... | |
| EpidStatus | FfAdd (FiniteField *ff, FfElement const *a, FfElement const *b, FfElement *r) |
| Adds two finite field elements. More... | |
| EpidStatus | FfSub (FiniteField *ff, FfElement const *a, FfElement const *b, FfElement *r) |
| Subtracts two finite field elements. More... | |
| EpidStatus | FfMul (FiniteField *ff, FfElement const *a, FfElement const *b, FfElement *r) |
| Multiplies two finite field elements. More... | |
| EpidStatus | FfIsZero (FiniteField *ff, FfElement const *a, bool *is_zero) |
| Checks if given finite field element is the additive identity (zero). More... | |
| EpidStatus | FfExp (FiniteField *ff, FfElement const *a, BigNum const *b, FfElement *r) |
| Raises an element of a finite field to a power. More... | |
| EpidStatus | FfMultiExp (FiniteField *ff, FfElement const **a, BigNumStr const **b, size_t m, FfElement *r) |
| Multi-exponentiates finite field elements. More... | |
| EpidStatus | FfMultiExpBn (FiniteField *ff, FfElement const **a, BigNum const **b, size_t m, FfElement *r) |
| Multi-exponentiates finite field elements. More... | |
| EpidStatus | FfSscmMultiExp (FiniteField *ff, FfElement const **a, BigNumStr const **b, size_t m, FfElement *r) |
| Software side-channel mitigated implementation of FfMultiExp. More... | |
| EpidStatus | FfIsEqual (FiniteField *ff, FfElement const *a, FfElement const *b, bool *is_equal) |
| Checks if two finite field elements are equal. More... | |
| EpidStatus | FfHash (FiniteField *ff, void const *msg, size_t msg_len, HashAlg hash_alg, FfElement *r) |
| Hashes an arbitrary message to an element in a finite field. More... | |
| EpidStatus | FfGetRandom (FiniteField *ff, BigNumStr const *low_bound, BitSupplier rnd_func, void *rnd_param, FfElement *r) |
| Generate random finite field element. More... | |
| EpidStatus | FfSqrt (FiniteField *ff, FfElement const *a, FfElement *r) |
| Finds a square root of a finite field element. More... | |
Finite field interface.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
This file is used by Doxygen to generate documentation. +More...
+This file is used by Doxygen to generate documentation.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Big number operations. +More...
++Typedefs | |
| +typedef struct BigNum | BigNum |
| Internal representation of large numbers. | |
+Functions | |
| EpidStatus | NewBigNum (size_t data_size_bytes, BigNum **bignum) |
| Constructs a new BigNum. More... | |
| void | DeleteBigNum (BigNum **bignum) |
| Deletes a previously allocated BigNum. More... | |
| EpidStatus | ReadBigNum (void const *bn_str, size_t strlen, BigNum *bn) |
| Deserializes a BigNum from a string. More... | |
| EpidStatus | WriteBigNum (BigNum const *bn, size_t strlen, void *bn_str) |
| Serializes a BigNum to a string. More... | |
| EpidStatus | BigNumAdd (BigNum const *a, BigNum const *b, BigNum *r) |
| Adds two BigNum values. More... | |
| EpidStatus | BigNumSub (BigNum const *a, BigNum const *b, BigNum *r) |
| Subtracts two BigNum values. More... | |
| EpidStatus | BigNumMul (BigNum const *a, BigNum const *b, BigNum *r) |
| Multiplies two BigNum values. More... | |
| EpidStatus | BigNumDiv (BigNum const *a, BigNum const *b, BigNum *q, BigNum *r) |
| Divides two BigNum values. More... | |
| EpidStatus | BigNumMod (BigNum const *a, BigNum const *b, BigNum *r) |
| Computes modular reduction for BigNum value by specified modulus. More... | |
| EpidStatus | BigNumIsEven (BigNum const *a, bool *is_even) |
| Checks if a BigNum is even. More... | |
| EpidStatus | BigNumIsZero (BigNum const *a, bool *is_zero) |
| Checks if a BigNum is zero. More... | |
| EpidStatus | BigNumPow2N (unsigned int n, BigNum *r) |
| Raises 2 to the given power. More... | |
Big number operations.
+This module provides an API for working with large numbers. BigNums represent non-negative integers.
+Each BigNum variable represents a number of a byte-size set when the variable was created. BigNum variables cannot be re-sized after they are created.
+| EpidStatus BigNumAdd | +( | +BigNum const * | +a, | +
| + | + | BigNum const * | +b, | +
| + | + | BigNum * | +r | +
| + | ) | ++ |
Adds two BigNum values.
+| [in] | a | The first operand to be added. |
| [in] | b | The second operand to be added. |
| [out] | r | The result of adding a and b. |
| EpidStatus BigNumDiv | +( | +BigNum const * | +a, | +
| + | + | BigNum const * | +b, | +
| + | + | BigNum * | +q, | +
| + | + | BigNum * | +r | +
| + | ) | ++ |
Divides two BigNum values.
+| [in] | a | Dividend parameter. |
| [in] | b | Divisor parameter. |
| [out] | q | Quotient of result. |
| [out] | r | Remainder of result. |
| EpidStatus BigNumIsEven | +( | +BigNum const * | +a, | +
| + | + | bool * | +is_even | +
| + | ) | ++ |
Checks if a BigNum is even.
+| [in] | a | The BigNum to check. |
| [out] | is_even | The result of the check. |
| EpidStatus BigNumIsZero | +( | +BigNum const * | +a, | +
| + | + | bool * | +is_zero | +
| + | ) | ++ |
Checks if a BigNum is zero.
+| [in] | a | The BigNum to check. |
| [out] | is_zero | The result of the check. |
| EpidStatus BigNumMod | +( | +BigNum const * | +a, | +
| + | + | BigNum const * | +b, | +
| + | + | BigNum * | +r | +
| + | ) | ++ |
Computes modular reduction for BigNum value by specified modulus.
+| [in] | a | The BigNum value. |
| [in] | b | The modulus. |
| [out] | r | Modular reduction result. |
| EpidStatus BigNumMul | +( | +BigNum const * | +a, | +
| + | + | BigNum const * | +b, | +
| + | + | BigNum * | +r | +
| + | ) | ++ |
Multiplies two BigNum values.
+| [in] | a | The first operand to be multiplied. |
| [in] | b | The second operand to be multiplied. |
| [out] | r | The result of multiplying a and b. |
| EpidStatus BigNumPow2N | +( | +unsigned int | +n, | +
| + | + | BigNum * | +r | +
| + | ) | ++ |
Raises 2 to the given power.
+| [in] | n | The power. |
| [out] | r | The result of 2^n. |
| EpidStatus BigNumSub | +( | +BigNum const * | +a, | +
| + | + | BigNum const * | +b, | +
| + | + | BigNum * | +r | +
| + | ) | ++ |
Subtracts two BigNum values.
+| [in] | a | The first operand to use in subtraction. |
| [in] | b | The second operand to use in subtraction. |
| [out] | r | The result of subtracting a and b. |
| void DeleteBigNum | +( | +BigNum ** | +bignum | ) | ++ |
Deletes a previously allocated BigNum.
+Frees memory pointed to by bignum. Nulls the pointer.
+| [in] | bignum | The BigNum. Can be NULL. |
| EpidStatus NewBigNum | +( | +size_t | +data_size_bytes, | +
| + | + | BigNum ** | +bignum | +
| + | ) | ++ |
Constructs a new BigNum.
+Allocates memory and creates a new BigNum.
+Use DeleteBigNum() to free memory.
+| [in] | data_size_bytes | The size in bytes of the new number. |
| [out] | bignum | The BigNum. |
| EpidStatus ReadBigNum | +( | +void const * | +bn_str, | +
| + | + | size_t | +strlen, | +
| + | + | BigNum * | +bn | +
| + | ) | ++ |
Deserializes a BigNum from a string.
+| [in] | bn_str | The serialized value. |
| [in] | strlen | The size of bn_str in bytes. |
| [out] | bn | The target BigNum. |
| EpidStatus WriteBigNum | +( | +BigNum const * | +bn, | +
| + | + | size_t | +strlen, | +
| + | + | void * | +bn_str | +
| + | ) | ++ |
Serializes a BigNum to a string.
+| [in] | bn | The BigNum to be serialized. |
| [in] | strlen | The size of bn_str in bytes. |
| [out] | bn_str | The target string. |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Elliptic curve group operations. +More...
++Typedefs | |
| +typedef struct EcGroup | EcGroup |
| Elliptic curve group over finite field. | |
| +typedef struct EcPoint | EcPoint |
| Point on elliptic curve over finite field. | |
+Functions | |
| EpidStatus | NewEcGroup (FiniteField const *ff, FfElement const *a, FfElement const *b, FfElement const *x, FfElement const *y, BigNum const *order, BigNum const *cofactor, EcGroup **g) |
| Constructs a new EcGroup. More... | |
| void | DeleteEcGroup (EcGroup **g) |
| Deletes a previously allocated EcGroup. More... | |
| EpidStatus | NewEcPoint (EcGroup const *g, EcPoint **p) |
| Creates a new EcPoint. More... | |
| void | DeleteEcPoint (EcPoint **p) |
| Deletes a previously allocated EcPoint. More... | |
| EpidStatus | ReadEcPoint (EcGroup *g, void const *p_str, size_t strlen, EcPoint *p) |
| Deserializes an EcPoint from a string. More... | |
| EpidStatus | WriteEcPoint (EcGroup *g, EcPoint const *p, void *p_str, size_t strlen) |
| Serializes an EcPoint to a string. More... | |
| EpidStatus | EcMul (EcGroup *g, EcPoint const *a, EcPoint const *b, EcPoint *r) |
| Multiplies two elements in an elliptic curve group. More... | |
| EpidStatus | EcExp (EcGroup *g, EcPoint const *a, BigNumStr const *b, EcPoint *r) |
| Raises a point in an elliptic curve group to a power. More... | |
| EpidStatus | EcSscmExp (EcGroup *g, EcPoint const *a, BigNumStr const *b, EcPoint *r) |
| Software side-channel mitigated implementation of EcExp. More... | |
| EpidStatus | EcMultiExp (EcGroup *g, EcPoint const **a, BigNumStr const **b, size_t m, EcPoint *r) |
| Multi-exponentiates elements in elliptic curve group. More... | |
| EpidStatus | EcMultiExpBn (EcGroup *g, EcPoint const **a, BigNum const **b, size_t m, EcPoint *r) |
| Multi-exponentiates elements in elliptic curve group. More... | |
| EpidStatus | EcSscmMultiExp (EcGroup *g, EcPoint const **a, BigNumStr const **b, size_t m, EcPoint *r) |
| Software side-channel mitigated implementation of EcMultiExp. More... | |
| EpidStatus | EcGetRandom (EcGroup *g, BitSupplier rnd_func, void *rnd_func_param, EcPoint *r) |
| Generates a random element from an elliptic curve group. More... | |
| EpidStatus | EcInGroup (EcGroup *g, void const *p_str, size_t strlen, bool *in_group) |
| Checks if a point is in an elliptic curve group. More... | |
| EpidStatus | Epid11EcHash (EcGroup *g, void const *msg, size_t msg_len, EcPoint *r) |
| Hashes an arbitrary message to an Intel(R) EPID 1.1 element in an elliptic curve group. More... | |
| EpidStatus | EcHash (EcGroup *g, void const *msg, size_t msg_len, HashAlg hash_alg, EcPoint *r) |
| Hashes an arbitrary message to an element in an elliptic curve group. More... | |
| EpidStatus | EcMakePoint (EcGroup *g, FfElement const *x, EcPoint *r) |
| Sets an EcPoint variable to a point on a curve. More... | |
| EpidStatus | EcInverse (EcGroup *g, EcPoint const *p, EcPoint *r) |
| Computes the additive inverse of an EcPoint. More... | |
| EpidStatus | EcIsEqual (EcGroup *g, EcPoint const *a, EcPoint const *b, bool *is_equal) |
| Checks if two EcPoints are equal. More... | |
| EpidStatus | EcIsIdentity (EcGroup *g, EcPoint const *p, bool *is_identity) |
| Checks if an EcPoint is the identity element. More... | |
Elliptic curve group operations.
+Provides APIs for working with Elliptic curve groups. Elliptic curve groups allow simple mathematical operations based on points that lie on a defined elliptic curve. The results of these operations also lie on the same curve.
+Curves themselves are defined based on elements (FfElement) of a finite field (FiniteField).
+| void DeleteEcGroup | +( | +EcGroup ** | +g | ) | ++ |
Deletes a previously allocated EcGroup.
+Frees memory pointed to by elliptic curve group. Nulls the pointer.
+| [in] | g | The elliptic curve group. Can be NULL. |
| void DeleteEcPoint | +( | +EcPoint ** | +p | ) | ++ |
Deletes a previously allocated EcPoint.
+Frees memory used by a point on elliptic curve group. Nulls the pointer.
+| [in] | p | The EcPoint. Can be NULL. |
| EpidStatus EcExp | +( | +EcGroup * | +g, | +
| + | + | EcPoint const * | +a, | +
| + | + | BigNumStr const * | +b, | +
| + | + | EcPoint * | +r | +
| + | ) | ++ |
Raises a point in an elliptic curve group to a power.
+This exponentiation operation is also known as element multiplication for elliptic curve groups.
| [in] | g | The elliptic curve group. |
| [in] | a | The base. |
| [in] | b | The power. Power must be less than the order of the elliptic curve group. |
| [out] | r | The result of raising a to the power b. |
| EpidStatus EcGetRandom | +( | +EcGroup * | +g, | +
| + | + | BitSupplier | +rnd_func, | +
| + | + | void * | +rnd_func_param, | +
| + | + | EcPoint * | +r | +
| + | ) | ++ |
Generates a random element from an elliptic curve group.
+This function is only available for G1 and GT.
+| [in] | g | The elliptic curve group. |
| [in] | rnd_func | Random number generator. |
| [in] | rnd_func_param | Pass through context data for rnd_func. |
| [in,out] | r | Output random elliptic curve element. |
| EpidStatus EcHash | +( | +EcGroup * | +g, | +
| + | + | void const * | +msg, | +
| + | + | size_t | +msg_len, | +
| + | + | HashAlg | +hash_alg, | +
| + | + | EcPoint * | +r | +
| + | ) | ++ |
Hashes an arbitrary message to an element in an elliptic curve group.
+| [in] | g | The elliptic curve group. |
| [in] | msg | The message. |
| [in] | msg_len | The size of msg in bytes. |
| [in] | hash_alg | The hash algorithm. |
| [out] | r | The hashed value. |
| EpidStatus EcInGroup | +( | +EcGroup * | +g, | +
| + | + | void const * | +p_str, | +
| + | + | size_t | +strlen, | +
| + | + | bool * | +in_group | +
| + | ) | ++ |
Checks if a point is in an elliptic curve group.
+| [in] | g | The elliptic curve group. |
| [in] | p_str | A serialized point. Must be a G1ElemStr or G2ElemStr. |
| [in] | strlen | The size of p_str in bytes. |
| [out] | in_group | The result of the check. |
| EpidStatus EcInverse | +( | +EcGroup * | +g, | +
| + | + | EcPoint const * | +p, | +
| + | + | EcPoint * | +r | +
| + | ) | ++ |
Computes the additive inverse of an EcPoint.
+This inverse operation is also known as element negation for elliptic curve groups.
+| [in] | g | The elliptic curve group. |
| [in] | p | The point. |
| [out] | r | The inverted point. |
| EpidStatus EcIsEqual | +( | +EcGroup * | +g, | +
| + | + | EcPoint const * | +a, | +
| + | + | EcPoint const * | +b, | +
| + | + | bool * | +is_equal | +
| + | ) | ++ |
Checks if two EcPoints are equal.
+| [in] | g | The elliptic curve group. |
| [in] | a | A point to check. |
| [in] | b | Another point to check. |
| [out] | is_equal | The result of the check. |
| EpidStatus EcIsIdentity | +( | +EcGroup * | +g, | +
| + | + | EcPoint const * | +p, | +
| + | + | bool * | +is_identity | +
| + | ) | ++ |
Checks if an EcPoint is the identity element.
+Takes a group element P as input. It outputs true if P is the identity element of G. Otherwise, it outputs false.
+| [in] | g | The elliptic curve group. |
| [in] | p | The point to check. |
| [out] | is_identity | The result of the check. |
| EpidStatus EcMakePoint | +( | +EcGroup * | +g, | +
| + | + | FfElement const * | +x, | +
| + | + | EcPoint * | +r | +
| + | ) | ++ |
Sets an EcPoint variable to a point on a curve.
+This function is only available for G1.
+| [in] | g | The elliptic curve group. |
| [in] | x | The x coordinate. |
| [out] | r | The point. |
| EpidStatus EcMul | +( | +EcGroup * | +g, | +
| + | + | EcPoint const * | +a, | +
| + | + | EcPoint const * | +b, | +
| + | + | EcPoint * | +r | +
| + | ) | ++ |
Multiplies two elements in an elliptic curve group.
+This multiplication operation is also known as element addition for elliptic curve groups.
+| [in] | g | The elliptic curve group. |
| [in] | a | The first operand to be multiplied. |
| [in] | b | The second operand to be multiplied. |
| [out] | r | The result of multiplying a and b. |
| EpidStatus EcMultiExp | +( | +EcGroup * | +g, | +
| + | + | EcPoint const ** | +a, | +
| + | + | BigNumStr const ** | +b, | +
| + | + | size_t | +m, | +
| + | + | EcPoint * | +r | +
| + | ) | ++ |
Multi-exponentiates elements in elliptic curve group.
+Takes a group elements a[0], ... , a[m-1] in G and positive integers b[0], ..., b[m-1], where m is a small positive integer. Outputs r (in G) = EcExp(a[0],b[0]) * ... * EcExp(a[m-1],b[m-1]).
+| [in] | g | The elliptic curve group. |
| [in] | a | The bases. |
| [in] | b | The powers. Power must be less than the order of the elliptic curve group. |
| [in] | m | Number of entries in a and b. |
| [out] | r | The result of raising each a to the corresponding power b and multiplying the results. |
| EpidStatus EcMultiExpBn | +( | +EcGroup * | +g, | +
| + | + | EcPoint const ** | +a, | +
| + | + | BigNum const ** | +b, | +
| + | + | size_t | +m, | +
| + | + | EcPoint * | +r | +
| + | ) | ++ |
Multi-exponentiates elements in elliptic curve group.
+Takes a group elements a[0], ... , a[m-1] in G and positive integers b[0], ..., b[m-1], where m is a small positive integer. Outputs r (in G) = EcExp(a[0],b[0]) * ... * EcExp(a[m-1],b[m-1]).
+| [in] | g | The elliptic curve group. |
| [in] | a | The bases. |
| [in] | b | The powers. Power must be less than the order of the elliptic curve group. |
| [in] | m | Number of entries in a and b. |
| [out] | r | The result of raising each a to the corresponding power b and multiplying the results. |
| EpidStatus EcSscmExp | +( | +EcGroup * | +g, | +
| + | + | EcPoint const * | +a, | +
| + | + | BigNumStr const * | +b, | +
| + | + | EcPoint * | +r | +
| + | ) | ++ |
Software side-channel mitigated implementation of EcExp.
+This exponentiation operation is also known as element multiplication for elliptic curve groups.
+| [in] | g | The elliptic curve group. |
| [in] | a | The base. |
| [in] | b | The power. Power must be less than the order of the elliptic curve group. |
| [out] | r | The result of raising a to the power b. |
| EpidStatus EcSscmMultiExp | +( | +EcGroup * | +g, | +
| + | + | EcPoint const ** | +a, | +
| + | + | BigNumStr const ** | +b, | +
| + | + | size_t | +m, | +
| + | + | EcPoint * | +r | +
| + | ) | ++ |
Software side-channel mitigated implementation of EcMultiExp.
+Takes a group elements a[0], ... , a[m-1] in G and positive integers b[0], ..., b[m-1], where m is a small positive integer. Outputs r (in G) = EcExp(a[0],b[0]) * ... * EcExp(a[m-1],b[m-1]).
+| [in] | g | The elliptic curve group. |
| [in] | a | The bases. |
| [in] | b | The powers. Power must be less than the order of the elliptic curve group. |
| [in] | m | Number of entries in a and b. |
| [out] | r | The result of raising each a to the corresponding power b and multiplying the results. |
| EpidStatus Epid11EcHash | +( | +EcGroup * | +g, | +
| + | + | void const * | +msg, | +
| + | + | size_t | +msg_len, | +
| + | + | EcPoint * | +r | +
| + | ) | ++ |
Hashes an arbitrary message to an Intel(R) EPID 1.1 element in an elliptic curve group.
+| [in] | g | The elliptic curve group. |
| [in] | msg | The message. |
| [in] | msg_len | The size of msg in bytes. |
| [out] | r | The hashed value. |
| EpidStatus NewEcGroup | +( | +FiniteField const * | +ff, | +
| + | + | FfElement const * | +a, | +
| + | + | FfElement const * | +b, | +
| + | + | FfElement const * | +x, | +
| + | + | FfElement const * | +y, | +
| + | + | BigNum const * | +order, | +
| + | + | BigNum const * | +cofactor, | +
| + | + | EcGroup ** | +g | +
| + | ) | ++ |
Constructs a new EcGroup.
+Allocates memory and creates a new elliptic curve group.
+Use DeleteFiniteField() to free memory.
+| [in] | ff | The finite field on which the curve is based. |
| [in] | a | The A value of the elliptic curve. |
| [in] | b | The B value of the elliptic curve. |
| [in] | x | The X-coordinate of the base point of the elliptic curve. |
| [in] | y | The Y-coordinate of the base point of the elliptic curve. |
| [in] | order | The order of the elliptic curve group. |
| [in] | cofactor | The co-factor of the elliptic curve. |
| [out] | g | The newly constructed elliptic curve group. |
| EpidStatus NewEcPoint | +( | +EcGroup const * | +g, | +
| + | + | EcPoint ** | +p | +
| + | ) | ++ |
Creates a new EcPoint.
+Allocates memory and creates a new point on elliptic curve group.
+Use DeleteEcPoint() to free memory.
+| [in] | g | Elliptic curve group. |
| [out] | p | Newly constructed point on the elliptic curve group g. |
| EpidStatus ReadEcPoint | +( | +EcGroup * | +g, | +
| + | + | void const * | +p_str, | +
| + | + | size_t | +strlen, | +
| + | + | EcPoint * | +p | +
| + | ) | ++ |
Deserializes an EcPoint from a string.
+| [in] | g | The elliptic curve group. |
| [in] | p_str | The serialized value. |
| [in] | strlen | The size of p_str in bytes. |
| [out] | p | The target EcPoint. |
| EpidStatus WriteEcPoint | +( | +EcGroup * | +g, | +
| + | + | EcPoint const * | +p, | +
| + | + | void * | +p_str, | +
| + | + | size_t | +strlen | +
| + | ) | ++ |
Serializes an EcPoint to a string.
+| [in] | g | The elliptic curve group. |
| [in] | p | The EcPoint to be serialized. |
| [out] | p_str | The target string. |
| [in] | strlen | the size of p_str in bytes. |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Elliptic Curve Digital Signature Algorithm Primitives. +More...
++Functions | |
| EpidStatus | EcdsaVerifyBuffer (void const *buf, size_t buf_len, EcdsaPublicKey const *pubkey, EcdsaSignature const *sig) |
| Verifies authenticity of a digital signature over a buffer. More... | |
| EpidStatus | EcdsaSignBuffer (void const *buf, size_t buf_len, EcdsaPrivateKey const *privkey, BitSupplier rnd_func, void *rnd_param, EcdsaSignature *sig) |
| Creates ECDSA signature of buffer. More... | |
Elliptic Curve Digital Signature Algorithm Primitives.
+Provides APIs for computing and checking buffer signatures using the Elliptic Curve Digital Signature Algorithm.
+| EpidStatus EcdsaSignBuffer | +( | +void const * | +buf, | +
| + | + | size_t | +buf_len, | +
| + | + | EcdsaPrivateKey const * | +privkey, | +
| + | + | BitSupplier | +rnd_func, | +
| + | + | void * | +rnd_param, | +
| + | + | EcdsaSignature * | +sig | +
| + | ) | ++ |
Creates ECDSA signature of buffer.
+Uses Elliptic Curve Digital Signature Algorithm (ECDSA) to generate a signature of the SHA-256 hash of the input buffer with the provided private key.
+The operation is over the standard secp256r1 curve.
+| [in] | buf | Pointer to buffer containing message to sign. |
| [in] | buf_len | The size of buf in bytes. |
| [in] | privkey | The ECDSA private key on secp256r1 curve. |
| [in] | rnd_func | Random number generator. |
| [in] | rnd_param | Pass through context data for rnd_func. |
| [out] | sig | The resulting ECDSA signature. |
| kEpidRandMaxIterErr | Failed to sign after maximum number of iterations due to bad luck in random number generation. |
| EpidStatus EcdsaVerifyBuffer | +( | +void const * | +buf, | +
| + | + | size_t | +buf_len, | +
| + | + | EcdsaPublicKey const * | +pubkey, | +
| + | + | EcdsaSignature const * | +sig | +
| + | ) | ++ |
Verifies authenticity of a digital signature over a buffer.
+Uses Elliptic Curve Digital Signature Algorithm (ECDSA) to verify that the SHA-256 hash of the input buffer was signed with the private key corresponding to the provided public key.
+The operation is over the standard secp256r1 curve.
+| [in] | buf | Pointer to buffer containing message to verify. |
| [in] | buf_len | The size of buf in bytes. |
| [in] | pubkey | The ECDSA public key on secp256r1 curve. |
| [in] | sig | The ECDSA signature to be verified. |
| kEpidSigValid | EcdsaSignature is valid for the given buffer. |
| kEpidSigInvalid | EcdsaSignature is invalid for the given buffer. |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Parser for 1.1 issuer material. +More...
++Functions | |
| EpidStatus | Epid11ParseGroupPubKeyFile (void const *buf, size_t len, EpidCaCertificate const *cert, Epid11GroupPubKey *pubkey) |
| Extracts group public key from buffer in issuer binary format. More... | |
| EpidStatus | Epid11ParsePrivRlFile (void const *buf, size_t len, EpidCaCertificate const *cert, Epid11PrivRl *rl, size_t *rl_len) |
| Extracts private key revocation list from buffer in issuer binary format. More... | |
| EpidStatus | Epid11ParseSigRlFile (void const *buf, size_t len, EpidCaCertificate const *cert, Epid11SigRl *rl, size_t *rl_len) |
| Extracts signature revocation list from buffer in issuer binary format. More... | |
| EpidStatus | Epid11ParseGroupRlFile (void const *buf, size_t len, EpidCaCertificate const *cert, Epid11GroupRl *rl, size_t *rl_len) |
| Extracts group revocation list from buffer in issuer binary format. More... | |
Parser for 1.1 issuer material.
+Defines the APIs needed to parse Intel(R) EPID 1.1 issuer material.
+| EpidStatus Epid11ParseGroupPubKeyFile | +( | +void const * | +buf, | +
| + | + | size_t | +len, | +
| + | + | EpidCaCertificate const * | +cert, | +
| + | + | Epid11GroupPubKey * | +pubkey | +
| + | ) | ++ |
Extracts group public key from buffer in issuer binary format.
+Extracts the first group public key from a buffer with format of Intel(R) EPID 1.1 Group Public Key Certificate Binary File. The function validates that the first public key was signed by the private key corresponding to the provided CA certificate and the size of the input buffer is correct.
+| [in] | buf | Pointer to buffer containing public key to extract. |
| [in] | len | The size of buf in bytes. |
| [in] | cert | The issuing CA public key certificate. |
| [out] | pubkey | The extracted group public key. |
| kEpidSigInvalid | Parsing failed due to data authentication failure. |
| EpidStatus Epid11ParseGroupRlFile | +( | +void const * | +buf, | +
| + | + | size_t | +len, | +
| + | + | EpidCaCertificate const * | +cert, | +
| + | + | Epid11GroupRl * | +rl, | +
| + | + | size_t * | +rl_len | +
| + | ) | ++ |
Extracts group revocation list from buffer in issuer binary format.
+Extracts the group revocation list from a buffer with format of Intel(R) EPID 1.1 Binary Group Certificate Revocation List File. The function validates that the revocation list was signed by the private key corresponding to the provided CA certificate and the size of the input buffer is correct.
+To determine the required size of the revocation list output buffer, provide a null pointer for the output buffer.
+| [in] | buf | Pointer to buffer containing the revocation list to extract. |
| [in] | len | The size of buf in bytes. |
| [in] | cert | The issuing CA public key certificate. |
| [out] | rl | The extracted revocation list. If Null, rl_len is filled with the required output buffer size. |
| [in,out] | rl_len | The size of rl in bytes. |
| kEpidSigInvalid | Parsing failed due to data authentication failure. |
| EpidStatus Epid11ParsePrivRlFile | +( | +void const * | +buf, | +
| + | + | size_t | +len, | +
| + | + | EpidCaCertificate const * | +cert, | +
| + | + | Epid11PrivRl * | +rl, | +
| + | + | size_t * | +rl_len | +
| + | ) | ++ |
Extracts private key revocation list from buffer in issuer binary format.
+Extracts the private key revocation list from a buffer with format of Intel(R) EPID 1.1 Binary Private Key Revocation List File. The function validates that the revocation list was signed by the private key corresponding to the provided CA certificate and the size of the input buffer is correct.
+To determine the required size of the revocation list output buffer, provide a null pointer for the output buffer.
+| [in] | buf | Pointer to buffer containing the revocation list to extract. |
| [in] | len | The size of buf in bytes. |
| [in] | cert | The issuing CA public key certificate. |
| [out] | rl | The extracted revocation list. If Null, rl_len is filled with the required output buffer size. |
| [in,out] | rl_len | The size of rl in bytes. |
| kEpidSigInvalid | Parsing failed due to data authentication failure. |
| EpidStatus Epid11ParseSigRlFile | +( | +void const * | +buf, | +
| + | + | size_t | +len, | +
| + | + | EpidCaCertificate const * | +cert, | +
| + | + | Epid11SigRl * | +rl, | +
| + | + | size_t * | +rl_len | +
| + | ) | ++ |
Extracts signature revocation list from buffer in issuer binary format.
+Extracts the signature based revocation list from a buffer with format of Intel(R) EPID 1.1 Binary Signature Revocation List File. The function validates that the revocation list was signed by the private key corresponding to the provided CA certificate and the size of the input buffer is correct.
+To determine the required size of the revocation list output buffer, provide a null pointer for the output buffer.
+| [in] | buf | Pointer to buffer containing the revocation list to extract. |
| [in] | len | The size of buf in bytes. |
| [in] | cert | The issuing CA public key certificate. |
| [out] | rl | The extracted revocation list. If Null, rl_len is filled with the required output buffer size. |
| [in,out] | rl_len | The size of rl in bytes. |
| kEpidSigInvalid | Parsing failed due to data authentication failure. |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
EPID 1.1 pairing operations. +More...
++Typedefs | |
| +typedef struct Epid11PairingState | Epid11PairingState |
| A pairing. | |
+Functions | |
| EpidStatus | NewEpid11PairingState (EcGroup const *ga, EcGroup const *gb, FiniteField const *ff, Epid11PairingState **ps) |
| Constructs a new Tate pairing state. More... | |
| void | DeleteEpid11PairingState (Epid11PairingState **ps) |
| Frees a previously allocated by Epid11PairingState. More... | |
| EpidStatus | Epid11Pairing (Epid11PairingState *ps, EcPoint const *a, EcPoint const *b, FfElement *d) |
| Computes a Tate Pairing for two parameters. More... | |
EPID 1.1 pairing operations.
+Provides APIs for defining and using a pairing relationship between two Elliptic curve groups.
+These pairing operations are intended to support Intel(R) EPID 1.1 verification.
+| void DeleteEpid11PairingState | +( | +Epid11PairingState ** | +ps | ) | ++ |
Frees a previously allocated by Epid11PairingState.
+Frees memory pointed to by pairing state. Nulls the pointer.
+This pairing operation is intended to support Intel(R) EPID 1.1 verification.
+| [in] | ps | The pairing state. Can be NULL. |
| EpidStatus Epid11Pairing | +( | +Epid11PairingState * | +ps, | +
| + | + | EcPoint const * | +a, | +
| + | + | EcPoint const * | +b, | +
| + | + | FfElement * | +d | +
| + | ) | ++ |
Computes a Tate Pairing for two parameters.
+This pairing operation is intended to support Intel(R) EPID 1.1 verification. It frees memory pointed to by an Intel(R) EPID 1.1 pairing state.
+| [in] | ps | The pairing state. |
| [in] | a | The first value to pair. Must be in ga. |
| [in] | b | The second value to pair. Must be in gb. |
| [out] | d | The result of the pairing. Must be in ff. |
| EpidStatus NewEpid11PairingState | +( | +EcGroup const * | +ga, | +
| + | + | EcGroup const * | +gb, | +
| + | + | FiniteField const * | +ff, | +
| + | + | Epid11PairingState ** | +ps | +
| + | ) | ++ |
Constructs a new Tate pairing state.
+Allocates memory and creates a new pairing state for Tate pairing.
+Use DeleteEpid11PairingState() to free memory.
+This pairing operation is intended to support Intel(R) EPID 1.1 verification.
+| [in] | ga | The EcGroup from which the first parameter of the pairing will be taken. |
| [in] | gb | The EcGroup from which the second parameter of the pairing will be taken. |
| [in] | ff | The result finite field. Must be a Fq12 field. |
| [out] | ps | Newly constructed pairing state. |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Intel(R) EPID 1.1 specific data types. +More...
++Data Structures | |
| struct | OctStr80 |
| 80 bit octet string More... | |
| struct | OctStr600 |
| 600 bit octet string More... | |
| struct | OctStr768 |
| 768 bit octet string More... | |
| struct | Fq3ElemStr |
| Serialized Fq3 element. More... | |
| struct | Epid11G2ElemStr |
| Serialized Intel(R) EPID 1.1 G2 element. More... | |
| struct | Epid11GtElemStr |
| Serialized Intel(R) EPID 1.1 GT element. More... | |
| struct | Epid11Params |
| Intel(R) EPID 1.1 Parameters. More... | |
| struct | Epid11GroupPubKey |
| Intel(R) EPID 1.1 group public key. More... | |
| struct | Epid11BasicSignature |
| Intel(R) EPID 1.1 basic signature. More... | |
| struct | Epid11NrProof |
| Intel(R) EPID 1.1 non-revoked Proof. More... | |
| struct | Epid11Signature |
| Intel(R) EPID 1.1 Signature. More... | |
| struct | Epid11PrivRl |
| Intel(R) EPID 1.1 private-key based revocation list. More... | |
| struct | Epid11SigRlEntry |
| Intel(R) EPID 1.1 entry in SigRL (B,K) More... | |
| struct | Epid11SigRl |
| Intel(R) EPID 1.1 signature based revocation list. More... | |
| struct | Epid11GroupRl |
| Intel(R) EPID 1.1 group revocation list. More... | |
+Typedefs | |
| +typedef G1ElemStr | Epid11G1ElemStr |
| Serialized Intel(R) EPID 1.1 G1 element. | |
| +typedef G1ElemStr | Epid11G3ElemStr |
| Serialized Intel(R) EPID 1.1 G3 element. | |
| +typedef OctStr32 | Epid11GroupId |
| Intel(R) EPID 1.1 group ID. | |
Intel(R) EPID 1.1 specific data types.
+Defines serialized data types used by the SDK. These data types are only used by components that need to do Intel(R) EPID 1.1 verification.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Intel(R) EPID 1.1 Verifier functionality. +More...
++Data Structures | |
| struct | Epid11VerifierPrecomp |
| Intel(R) EPID 1.1 Pre-computed verifier settings. More... | |
+Typedefs | |
| +typedef struct Epid11VerifierCtx | Epid11VerifierCtx |
| Internal context of Intel(R) EPID 1.1 verifier. | |
+Functions | |
| EpidStatus | Epid11VerifierCreate (Epid11GroupPubKey const *pub_key, Epid11VerifierPrecomp const *precomp, Epid11VerifierCtx **ctx) |
| Creates a new Intel(R) EPID 1.1 verifier context. More... | |
| void | Epid11VerifierDelete (Epid11VerifierCtx **ctx) |
| Deletes an existing Intel(R) EPID 1.1 verifier context. More... | |
| EpidStatus | Epid11VerifierWritePrecomp (Epid11VerifierCtx const *ctx, Epid11VerifierPrecomp *precomp) |
| Serializes the pre-computed Intel(R) EPID 1.1 verifier settings. More... | |
| EpidStatus | Epid11VerifierSetPrivRl (Epid11VerifierCtx *ctx, Epid11PrivRl const *priv_rl, size_t priv_rl_size) |
| Sets the Intel(R) EPID 1.1 private key based revocation list. More... | |
| EpidStatus | Epid11VerifierSetSigRl (Epid11VerifierCtx *ctx, Epid11SigRl const *sig_rl, size_t sig_rl_size) |
| Sets the Intel(R) EPID 1.1 signature based revocation list. More... | |
| EpidStatus | Epid11VerifierSetGroupRl (Epid11VerifierCtx *ctx, Epid11GroupRl const *grp_rl, size_t grp_rl_size) |
| Sets the Intel(R) EPID 1.1 group based revocation list. More... | |
| EpidStatus | Epid11VerifierSetBasename (Epid11VerifierCtx *ctx, void const *basename, size_t basename_len) |
| Sets the basename to be used by a verifier. More... | |
| EpidStatus | Epid11Verify (Epid11VerifierCtx const *ctx, Epid11Signature const *sig, size_t sig_len, void const *msg, size_t msg_len) |
| Verifies an Intel(R) EPID 1.1 signature and checks revocation status. More... | |
| bool | Epid11AreSigsLinked (Epid11BasicSignature const *sig1, Epid11BasicSignature const *sig2) |
| Determines if two Intel(R) EPID 1.1 signatures are linked. More... | |
| EpidStatus | Epid11VerifyBasicSig (Epid11VerifierCtx const *ctx, Epid11BasicSignature const *sig, void const *msg, size_t msg_len) |
| Verifies an Intel(R) EPID 1.1 member signature without revocation checks. More... | |
| EpidStatus | Epid11NrVerify (Epid11VerifierCtx const *ctx, Epid11BasicSignature const *sig, void const *msg, size_t msg_len, Epid11SigRlEntry const *sigrl_entry, Epid11NrProof const *proof) |
| Verifies the non-revoked proof for a single Intel(R) EPID 1.1 signature based revocation list entry. More... | |
| EpidStatus | Epid11CheckPrivRlEntry (Epid11VerifierCtx const *ctx, Epid11BasicSignature const *sig, FpElemStr const *f) |
| Verifies an Intel(R) EPID 1.1 signature has not been revoked in the private key based revocation list. More... | |
Intel(R) EPID 1.1 Verifier functionality.
+To verify signatures coming from member devices that belong to an Intel® EPID 1.1 group, you need to use Intel® EPID 1.1 verifier APIs.
+If you are acting as a verifier for both Intel® EPID 1.1 and 2.0 members, you can determine if you need version 1.1 or 2.0 verification by checking the Intel® EPID version field in the group public key file (see EpidParseFileHeader). You can also check the version in other binary issuer material, such as the GroupRL and SigRL.
+The 1.1 verifier APIs take a verifier context as input. Each verifier context (Epid11VerifierCtx) represents a verifier for a single group.
+The Intel® EPID 1.1 specification does not provide hash algorithm selection and verifier blacklist revocation. Therefore, APIs such as EpidVerifierSetHashAlg and EpidVerifierSetVerifierRl are not available.
+You can find the Intel® EPID 1.1 API headers in the 1.1 directories, for example, epid/verifier/1.1/api.h.
Intel® EPID 1.1 APIs and data structures are indicated with the "Epid11" prefix. For example, the Intel® EPID 1.1 version of EpidParseGroupPubKeyFile is called Epid11ParseGroupPubKeyFile, and the Intel® EPID 1.1 version of GroupRl is Epid11GroupRl.
| bool Epid11AreSigsLinked | +( | +Epid11BasicSignature const * | +sig1, | +
| + | + | Epid11BasicSignature const * | +sig2 | +
| + | ) | ++ |
Determines if two Intel(R) EPID 1.1 signatures are linked.
+The Intel(R) EPID scheme allows signatures to be linked. If basename option is specified when signing signatures with the same basename will be linkable. This linking capability allows the verifier, or anyone, to know whether two Intel(R) EPID signatures are generated by the same member.
+This API supports Intel(R) EPID 1.1 verification.
+| [in] | sig1 | A basic signature. |
| [in] | sig2 | A basic signature. |
| true | if the signatures were generated by the same member |
| false | if it couldn't be determined if the signatures were generated by the same member |
| EpidStatus Epid11CheckPrivRlEntry | +( | +Epid11VerifierCtx const * | +ctx, | +
| + | + | Epid11BasicSignature const * | +sig, | +
| + | + | FpElemStr const * | +f | +
| + | ) | ++ |
Verifies an Intel(R) EPID 1.1 signature has not been revoked in the private key based revocation list.
+Used in constrained environments where, due to limited memory, it may not be possible to process through a large and potentially unbounded revocation list.
+This API supports Intel(R) EPID 1.1 verification.
+| [in] | ctx | The verifier context. |
| [in] | sig | The basic signature. |
| [in] | f | The private key based revocation list entry. |
| EpidStatus Epid11NrVerify | +( | +Epid11VerifierCtx const * | +ctx, | +
| + | + | Epid11BasicSignature const * | +sig, | +
| + | + | void const * | +msg, | +
| + | + | size_t | +msg_len, | +
| + | + | Epid11SigRlEntry const * | +sigrl_entry, | +
| + | + | Epid11NrProof const * | +proof | +
| + | ) | ++ |
Verifies the non-revoked proof for a single Intel(R) EPID 1.1 signature based revocation list entry.
+Used in constrained environments where, due to limited memory, it may not be possible to process through a large and potentially unbounded revocation list.
+This API supports Intel(R) EPID 1.1 verification.
+| [in] | ctx | The verifier context. |
| [in] | sig | The basic signature. |
| [in] | msg | The message that was signed. |
| [in] | msg_len | The size of msg in bytes. |
| [in] | sigrl_entry | The signature based revocation list entry. |
| [in] | proof | The non-revoked proof. |
| EpidStatus Epid11VerifierCreate | +( | +Epid11GroupPubKey const * | +pub_key, | +
| + | + | Epid11VerifierPrecomp const * | +precomp, | +
| + | + | Epid11VerifierCtx ** | +ctx | +
| + | ) | ++ |
Creates a new Intel(R) EPID 1.1 verifier context.
+Must be called to create the verifier context that is used by other "Verifier" APIs.
+Allocates memory for the context, then initialize it.
+Epid11VerifierDelete() must be called to safely release the member context.
+| [in] | pub_key | The group certificate. |
| [in] | precomp | Optional pre-computed data. If NULL the value is computed internally and is readable using Epid11VerifierWritePrecomp(). |
| [out] | ctx | Newly constructed verifier context. |
| void Epid11VerifierDelete | +( | +Epid11VerifierCtx ** | +ctx | ) | ++ |
Deletes an existing Intel(R) EPID 1.1 verifier context.
+Must be called to safely release a verifier context created using Epid11VerifierCreate().
+De-initializes the context, frees memory used by the context, and sets the context pointer to NULL.
+| [in,out] | ctx | The verifier context. Can be NULL. |
| EpidStatus Epid11VerifierSetBasename | +( | +Epid11VerifierCtx * | +ctx, | +
| + | + | void const * | +basename, | +
| + | + | size_t | +basename_len | +
| + | ) | ++ |
Sets the basename to be used by a verifier.
+This API allows setting a zero length base name.
+| [in,out] | ctx | The verifier context. |
| [in] | basename | The basename. Pass NULL for random base. |
| [in] | basename_len | Number of bytes in basename buffer. Must be 0 if basename is NULL. |
| EpidStatus Epid11VerifierSetGroupRl | +( | +Epid11VerifierCtx * | +ctx, | +
| + | + | Epid11GroupRl const * | +grp_rl, | +
| + | + | size_t | +grp_rl_size | +
| + | ) | ++ |
Sets the Intel(R) EPID 1.1 group based revocation list.
+The caller is responsible to for ensuring the revocation list is authorized, e.g signed by the issuer. The caller is also responsible checking the version of the revocation list. The call will fail if trying to set an older version of the revocation list than was last set.
+This API supports Intel(R) EPID 1.1 verification.
+| [in,out] | ctx | The verifier context. |
| [in] | grp_rl | The group based revocation list. |
| [in] | grp_rl_size | The size of the group based revocation list in bytes. |
| EpidStatus Epid11VerifierSetPrivRl | +( | +Epid11VerifierCtx * | +ctx, | +
| + | + | Epid11PrivRl const * | +priv_rl, | +
| + | + | size_t | +priv_rl_size | +
| + | ) | ++ |
Sets the Intel(R) EPID 1.1 private key based revocation list.
+The caller is responsible to for ensuring the revocation list is authorized, e.g signed by the issuer. The caller is also responsible checking the version of the revocation list. The call will fail if trying to set an older version of the revocation list than was last set.
+This API supports Intel(R) EPID 1.1 verification.
+| [in,out] | ctx | The verifier context. |
| [in] | priv_rl | The private key based revocation list. |
| [in] | priv_rl_size | The size of the private key based revocation list in bytes. |
| EpidStatus Epid11VerifierSetSigRl | +( | +Epid11VerifierCtx * | +ctx, | +
| + | + | Epid11SigRl const * | +sig_rl, | +
| + | + | size_t | +sig_rl_size | +
| + | ) | ++ |
Sets the Intel(R) EPID 1.1 signature based revocation list.
+The caller is responsible to for ensuring the revocation list is authorized, e.g signed by the issuer. The caller is also responsible checking the version of the revocation list. The call will fail if trying to set an older version of the revocation list than was last set.
+This API supports Intel(R) EPID 1.1 verification.
+| [in,out] | ctx | The verifier context. |
| [in] | sig_rl | The signature based revocation list. |
| [in] | sig_rl_size | The size of the signature based revocation list in bytes. |
| EpidStatus Epid11VerifierWritePrecomp | +( | +Epid11VerifierCtx const * | +ctx, | +
| + | + | Epid11VerifierPrecomp * | +precomp | +
| + | ) | ++ |
Serializes the pre-computed Intel(R) EPID 1.1 verifier settings.
+| [in] | ctx | The verifier context. |
| [out] | precomp | The Serialized pre-computed verifier settings. |
| EpidStatus Epid11Verify | +( | +Epid11VerifierCtx const * | +ctx, | +
| + | + | Epid11Signature const * | +sig, | +
| + | + | size_t | +sig_len, | +
| + | + | void const * | +msg, | +
| + | + | size_t | +msg_len | +
| + | ) | ++ |
Verifies an Intel(R) EPID 1.1 signature and checks revocation status.
+| [in] | ctx | The verifier context. |
| [in] | sig | The signature. |
| [in] | sig_len | The size of sig in bytes. |
| [in] | msg | The message that was signed. |
| [in] | msg_len | The size of msg in bytes. |
| kEpidSigValid | Signature validated successfully |
| kEpidSigInvalid | Signature is invalid |
| kEpidSigRevokedInGroupRl | Signature revoked in GroupRl |
| kEpidSigRevokedInPrivRl | Signature revoked in PrivRl |
| kEpidSigRevokedInSigRl | Signature revoked in SigRl |
| EpidStatus Epid11VerifyBasicSig | +( | +Epid11VerifierCtx const * | +ctx, | +
| + | + | Epid11BasicSignature const * | +sig, | +
| + | + | void const * | +msg, | +
| + | + | size_t | +msg_len | +
| + | ) | ++ |
Verifies an Intel(R) EPID 1.1 member signature without revocation checks.
+Used in constrained environments where, due to limited memory, it may not be possible to process through a large and potentially unbounded revocation list.
+| [in] | ctx | The verifier context. |
| [in] | sig | The basic signature. |
| [in] | msg | The message that was signed. |
| [in] | msg_len | The size of msg in bytes. |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Common code shared between core sub-components. +More...
++Modules | |
| math | |
| Math Primitives and Group Operations. | |
| errors | |
| Error reporting interface. | |
| fileparser | |
| Parser for issuer material. | |
| print_utils | |
| Debug print routines. | |
| types | |
| SDK data types. | |
+Typedefs | |
| typedef int(__STDCALL * | BitSupplier) (unsigned int *rand_data, int num_bits, void *user_data) |
| Generates random data. More... | |
Common code shared between core sub-components.
+Constants, utility functions, and libraries that are used widely in the implementation or definition of APIs and samples.
+| typedef int(__STDCALL* BitSupplier) (unsigned int *rand_data, int num_bits, void *user_data) | +
Generates random data.
+It is the responsibility of the caller of the SDK interfaces to implement a function of this prototype and to then pass a pointer to this function into methods that require it.
+| [out] | rand_data | destination buffer |
| [in] | num_bits | size of rand_data in bits |
| [in] | user_data | user data passed through from api call. |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Math Primitives and Group Operations. +More...
++Modules | |
| bignum | |
| Big number operations. | |
| ecdsa | |
| Elliptic Curve Digital Signature Algorithm Primitives. | |
| ecgroup | |
| Elliptic curve group operations. | |
| finitefield | |
| Finite field operations. | |
| hash | |
| Hash primitives. | |
| pairing | |
| Pairing operations. | |
Math Primitives and Group Operations.
+Provides abstracted math primitives that are designed to be overridden by implementers porting to environments with specialized hardware. This module is defined and tested to hide implementation details from users of the API
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Member functionality. +More...
++Data Structures | |
| struct | MemberPrecomp |
| Pre-computed member settings. More... | |
| struct | PreComputedSignature |
| Pre-computed signature. More... | |
+Typedefs | |
| +typedef struct MemberCtx | MemberCtx |
| Internal context of member. | |
+Functions | |
| EpidStatus | EpidMemberCreate (GroupPubKey const *pub_key, PrivKey const *priv_key, MemberPrecomp const *precomp, BitSupplier rnd_func, void *rnd_param, MemberCtx **ctx) |
| Creates a new member context. More... | |
| void | EpidMemberDelete (MemberCtx **ctx) |
| Deletes an existing member context. More... | |
| EpidStatus | EpidMemberWritePrecomp (MemberCtx const *ctx, MemberPrecomp *precomp) |
| Serializes the pre-computed member settings. More... | |
| EpidStatus | EpidMemberSetHashAlg (MemberCtx *ctx, HashAlg hash_alg) |
| Sets the hash algorithm to be used by a member. More... | |
| size_t | EpidGetSigSize (SigRl const *sig_rl) |
| Computes the size in bytes required for an Intel(R) EPID signature. More... | |
| EpidStatus | EpidSign (MemberCtx const *ctx, void const *msg, size_t msg_len, void const *basename, size_t basename_len, SigRl const *sig_rl, size_t sig_rl_size, EpidSignature *sig, size_t sig_len) |
| Writes an Intel(R) EPID signature. More... | |
| EpidStatus | EpidRegisterBaseName (MemberCtx *ctx, void const *basename, size_t basename_len) |
| Registers a basename with a member. More... | |
| EpidStatus | EpidAddPreSigs (MemberCtx *ctx, size_t number_presigs, PreComputedSignature *presigs) |
| Extends the member's pool of pre-computed signatures. More... | |
| size_t | EpidGetNumPreSigs (MemberCtx const *ctx) |
| Gets the number of pre-computed signatures in the member's pool. More... | |
| EpidStatus | EpidWritePreSigs (MemberCtx *ctx, PreComputedSignature *presigs, size_t number_presigs) |
| Serializes pre-computed signatures from the member's pool. More... | |
| EpidStatus | EpidRequestJoin (GroupPubKey const *pub_key, IssuerNonce const *ni, FpElemStr const *f, BitSupplier rnd_func, void *rnd_param, HashAlg hash_alg, JoinRequest *join_request) |
| Creates a request to join a group. More... | |
| EpidStatus | EpidSignBasic (MemberCtx const *ctx, void const *msg, size_t msg_len, void const *basename, size_t basename_len, BasicSignature *sig) |
| Creates a basic signature for use in constrained environment. More... | |
| EpidStatus | EpidNrProve (MemberCtx const *ctx, void const *msg, size_t msg_len, BasicSignature const *sig, SigRlEntry const *sigrl_entry, NrProof *proof) |
| Calculates a non-revoked proof for a single signature based revocation list entry. More... | |
| bool | EpidIsPrivKeyInGroup (GroupPubKey const *pub_key, PrivKey const *priv_key) |
| Tests if a member private key is valid without checking revocation. More... | |
| EpidStatus | EpidDecompressPrivKey (GroupPubKey const *pub_key, CompressedPrivKey const *compressed_privkey, PrivKey *priv_key) |
| Decompresses compressed member private key. More... | |
Member functionality.
+Defines the APIs needed by Intel(R) EPID members. Each member context (MemberCtx) represents membership in a single group.
+| EpidStatus EpidAddPreSigs | +( | +MemberCtx * | +ctx, | +
| + | + | size_t | +number_presigs, | +
| + | + | PreComputedSignature * | +presigs | +
| + | ) | ++ |
Extends the member's pool of pre-computed signatures.
+Can either generate new pre-computed signatures or import existing ones. EpidWritePreSigs can be used to export pre-computed signatures.
+| [in] | ctx | The member context. |
| [in] | number_presigs | The number of pre-computed signatures to add to the internal pool. |
| [in,out] | presigs | Optional array of valid pre-computed signatures to import. If presigs is not NULL it most contain at least number_presigs pre-computed signatures. |
| EpidStatus EpidDecompressPrivKey | +( | +GroupPubKey const * | +pub_key, | +
| + | + | CompressedPrivKey const * | +compressed_privkey, | +
| + | + | PrivKey * | +priv_key | +
| + | ) | ++ |
Decompresses compressed member private key.
+Converts a compressed member private key into a member private key for use by other member APIs.
+| [in] | pub_key | The public key of the group. |
| [in] | compressed_privkey | The compressed member private key to be decompressed. |
| [out] | priv_key | The member private key. |
| size_t EpidGetNumPreSigs | +( | +MemberCtx const * | +ctx | ) | ++ |
Gets the number of pre-computed signatures in the member's pool.
+| [in] | ctx | The member context. |
| size_t EpidGetSigSize | +( | +SigRl const * | +sig_rl | ) | ++ |
Computes the size in bytes required for an Intel(R) EPID signature.
+| [in] | sig_rl | The signature based revocation list that is used. NULL is treated as a zero length list. |
| bool EpidIsPrivKeyInGroup | +( | +GroupPubKey const * | +pub_key, | +
| + | + | PrivKey const * | +priv_key | +
| + | ) | ++ |
Tests if a member private key is valid without checking revocation.
+Used to check that a member private key is a valid key for a group. This is useful as a cross check when creating a new member private key as part of the join process
+| [in] | pub_key | The public key of the group. |
| [in] | priv_key | The private key to check. |
| true | if the private key is valid for the group of the public key |
| false | if the private key is not valid for the group of the public key |
| EpidStatus EpidMemberCreate | +( | +GroupPubKey const * | +pub_key, | +
| + | + | PrivKey const * | +priv_key, | +
| + | + | MemberPrecomp const * | +precomp, | +
| + | + | BitSupplier | +rnd_func, | +
| + | + | void * | +rnd_param, | +
| + | + | MemberCtx ** | +ctx | +
| + | ) | ++ |
Creates a new member context.
+Must be called to create the member context that is used by other "Member" APIs.
+Allocates memory for the context, then initializes it.
+EpidMemberDelete() must be called to safely release the member context.
+| [in] | pub_key | The group certificate. |
| [in] | priv_key | The member private key. |
| [in] | precomp | Optional pre-computed data. If NULL the value is computed internally and is readable using EpidMemberWritePrecomp(). |
| [in] | rnd_func | Random number generator. |
| [in] | rnd_param | Pass through context data for rnd_func. |
| [out] | ctx | Newly constructed member context. |
| void EpidMemberDelete | +( | +MemberCtx ** | +ctx | ) | ++ |
Deletes an existing member context.
+Must be called to safely release a member context created using EpidMemberCreate().
+De-initializes the context, frees memory used by the context, and sets the context pointer to NULL.
+| [in,out] | ctx | The member context. Can be NULL. |
| EpidStatus EpidMemberSetHashAlg | +( | +MemberCtx * | +ctx, | +
| + | + | HashAlg | +hash_alg | +
| + | ) | ++ |
Sets the hash algorithm to be used by a member.
+| [in] | ctx | The member context. |
| [in] | hash_alg | The hash algorithm to use. |
| EpidStatus EpidMemberWritePrecomp | +( | +MemberCtx const * | +ctx, | +
| + | + | MemberPrecomp * | +precomp | +
| + | ) | ++ |
Serializes the pre-computed member settings.
+| [in] | ctx | The member context. |
| [out] | precomp | The Serialized pre-computed member settings. |
| EpidStatus EpidNrProve | +( | +MemberCtx const * | +ctx, | +
| + | + | void const * | +msg, | +
| + | + | size_t | +msg_len, | +
| + | + | BasicSignature const * | +sig, | +
| + | + | SigRlEntry const * | +sigrl_entry, | +
| + | + | NrProof * | +proof | +
| + | ) | ++ |
Calculates a non-revoked proof for a single signature based revocation list entry.
+Used in constrained environments where, due to limited memory, it may not be possible to process through a large and potentially unbounded revocation list.
+| [in] | ctx | The member context. |
| [in] | msg | The message. |
| [in] | msg_len | The length of message in bytes. |
| [in] | sig | The basic signature. |
| [in] | sigrl_entry | The signature based revocation list entry. |
| [out] | proof | The generated non-revoked proof. |
| EpidStatus EpidRegisterBaseName | +( | +MemberCtx * | +ctx, | +
| + | + | void const * | +basename, | +
| + | + | size_t | +basename_len | +
| + | ) | ++ |
Registers a basename with a member.
+To prevent loss of privacy, the member keeps a list of basenames (corresponding to authorized verifiers). The member signs a message with a basename only if the basename is in the member's basename list.
+| [in] | ctx | The member context. |
| [in] | basename | The basename. |
| [in] | basename_len | Length of the basename. |
| kEpidDuplicateErr | The basename was already registered. |
| EpidStatus EpidRequestJoin | +( | +GroupPubKey const * | +pub_key, | +
| + | + | IssuerNonce const * | +ni, | +
| + | + | FpElemStr const * | +f, | +
| + | + | BitSupplier | +rnd_func, | +
| + | + | void * | +rnd_param, | +
| + | + | HashAlg | +hash_alg, | +
| + | + | JoinRequest * | +join_request | +
| + | ) | ++ |
Creates a request to join a group.
+The created request is part of the interaction with an issuer needed to join a group. This interaction with the issuer is outside the scope of this API.
+| [in] | pub_key | The group certificate of group to join. |
| [in] | ni | The nonce chosen by issuer as part of join protocol. |
| [in] | f | A randomly selected integer in [1, p-1]. |
| [in] | rnd_func | Random number generator. |
| [in] | rnd_param | Pass through context data for rnd_func. |
| [in] | hash_alg | The hash algorithm to be used. |
| [out] | join_request | The join request. |
| EpidStatus EpidSign | +( | +MemberCtx const * | +ctx, | +
| + | + | void const * | +msg, | +
| + | + | size_t | +msg_len, | +
| + | + | void const * | +basename, | +
| + | + | size_t | +basename_len, | +
| + | + | SigRl const * | +sig_rl, | +
| + | + | size_t | +sig_rl_size, | +
| + | + | EpidSignature * | +sig, | +
| + | + | size_t | +sig_len | +
| + | ) | ++ |
Writes an Intel(R) EPID signature.
+| [in] | ctx | The member context. |
| [in] | msg | The message to sign. |
| [in] | msg_len | The length in bytes of message. |
| [in] | basename | Optional basename. If basename is NULL a random basename is used. Signatures generated using random basenames are anonymous. Signatures generated using the same basename are linkable by the verifier. If a basename is provided, it must already be registered, or kEpidBadArgErr is returned. |
| [in] | basename_len | The size of basename in bytes. Must be 0 basename is NULL. |
| [in] | sig_rl | The signature based revocation list. |
| [in] | sig_rl_size | The size in bytes of the signature based revocation list. |
| [out] | sig | The generated signature |
| [in] | sig_len | The size of signature in bytes. Must be equal to value returned by EpidGetSigSize(). |
| EpidStatus EpidSignBasic | +( | +MemberCtx const * | +ctx, | +
| + | + | void const * | +msg, | +
| + | + | size_t | +msg_len, | +
| + | + | void const * | +basename, | +
| + | + | size_t | +basename_len, | +
| + | + | BasicSignature * | +sig | +
| + | ) | ++ |
Creates a basic signature for use in constrained environment.
+Used in constrained environments where, due to limited memory, it may not be possible to process through a large and potentially unbounded revocation list.
+| [in] | ctx | The member context. |
| [in] | msg | The message. |
| [in] | msg_len | The length of message in bytes. |
| [in] | basename | Optional basename. If basename is NULL a random basename is used. Signatures generated using random basenames are anonymous. Signatures generated using the same basename are linkable by the verifier. If a basename is provided it must already be registered or kEpidBadArgErr is returned. |
| [in] | basename_len | The size of basename in bytes. Must be 0 basename is NULL. |
| [out] | sig | The generated basic signature |
| EpidStatus EpidWritePreSigs | +( | +MemberCtx * | +ctx, | +
| + | + | PreComputedSignature * | +presigs, | +
| + | + | size_t | +number_presigs | +
| + | ) | ++ |
Serializes pre-computed signatures from the member's pool.
+Removes requested number of pre-computed signatures from member's pool and stores them in presigs array. Use EpidAddPreSigs to add pre-computed signatures to the pool.
+| [in] | ctx | The member context. |
| [out] | presigs | An existing buffer of pre-computed signatures. |
| [in] | number_presigs | Number of pre-computed signatures to read. Number_presigs must not be greater than the value returned by EpidGetNumPreSigs. |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Core Intel® EPID functionality. +More...
++Modules | |
| common | |
| Common code shared between core sub-components. | |
| member | |
| Member functionality. | |
| verifier | |
| Verifier functionality. | |
Core Intel® EPID functionality.
+Contains core functionality used to provide or implement APIs in the Intel(R) EPID SDK.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Debug print routines. +More...
++Enumerations | |
| enum | PrintUtilFormat { kPrintUtilUnannotated = 0, +kPrintUtilAnnotated = 1, +kPrintUtilFormatCount = 2 + } |
| Print format. More... | |
+Functions | |
| void | PrintBigNum (BigNum const *big_num, char const *var_name) |
| Prints BigNum. More... | |
| void | PrintFfElement (FiniteField const *ff, FfElement const *ff_element, char const *var_name, PrintUtilFormat format) |
| Prints finite field element. More... | |
| void | PrintEcPoint (EcGroup const *g, EcPoint const *ec_point, char const *var_name, PrintUtilFormat format) |
| Prints elliptic curve group element. More... | |
| void | PrintBigNumStr (BigNumStr const *big_num_str, char const *var_name) |
| Prints serialized BigNum. More... | |
| void | PrintFpElemStr (FpElemStr const *fp_elem_str, char const *var_name) |
| Prints serialized Fp element. More... | |
| void | PrintFqElemStr (FqElemStr const *fq_elem_str, char const *var_name) |
| Prints serialized Fq element. More... | |
| void | PrintFq2ElemStr (Fq2ElemStr const *fq2_elem_str, char const *var_name, PrintUtilFormat format) |
| Prints serialized Fq2 element. More... | |
| void | PrintFq6ElemStr (Fq6ElemStr const *fq6_elem_str, char const *var_name, PrintUtilFormat format) |
| Prints serialized Fq6 element. More... | |
| void | PrintFq12ElemStr (Fq12ElemStr const *fq12_elem_str, char const *var_name, PrintUtilFormat format) |
| Prints serialized Fq12 element. More... | |
| void | PrintG1ElemStr (G1ElemStr const *g1_elem_str, char const *var_name, PrintUtilFormat format) |
| Prints serialized G1 element. More... | |
| void | PrintG2ElemStr (G2ElemStr const *g2_elem_str, char const *var_name, PrintUtilFormat format) |
| Prints serialized G2 element. More... | |
| void | PrintGtElemStr (GtElemStr const *gt_elem_str, char const *var_name, PrintUtilFormat format) |
| Prints serialized Gt element. More... | |
Debug print routines.
+Defines an API to print formatted versions of the types used for mathematical operations.
+If the symbol EPID_ENABLE_DEBUG_PRINT is not defined, all calls to the functions in this module are ignored.
+| enum PrintUtilFormat | +
| void PrintBigNum | +( | +BigNum const * | +big_num, | +
| + | + | char const * | +var_name | +
| + | ) | ++ |
Prints BigNum.
+Macro EPID_ENABLE_DEBUG_PRINT needs to be defined in order to activate this routine; otherwise, it prints nothing.
+| [in] | big_num | BigNum to be printed |
| [in] | var_name | Result variable name |
| void PrintBigNumStr | +( | +BigNumStr const * | +big_num_str, | +
| + | + | char const * | +var_name | +
| + | ) | ++ |
Prints serialized BigNum.
+Macro EPID_ENABLE_DEBUG_PRINT needs to be defined in order to activate this routine; otherwise, it prints nothing.
+| [in] | big_num_str | Serialized BigNum to be printed |
| [in] | var_name | Result variable name |
| void PrintEcPoint | +( | +EcGroup const * | +g, | +
| + | + | EcPoint const * | +ec_point, | +
| + | + | char const * | +var_name, | +
| + | + | PrintUtilFormat | +format | +
| + | ) | ++ |
Prints elliptic curve group element.
+Macro EPID_ENABLE_DEBUG_PRINT needs to be defined in order to activate this routine; otherwise, it prints nothing.
+| [in] | g | Elliptic curve group that element to be printed belongs to |
| [in] | ec_point | Elliptic curve group element to be printed |
| [in] | var_name | Result variable name |
| [in] | format | Output format |
| void PrintFfElement | +( | +FiniteField const * | +ff, | +
| + | + | FfElement const * | +ff_element, | +
| + | + | char const * | +var_name, | +
| + | + | PrintUtilFormat | +format | +
| + | ) | ++ |
Prints finite field element.
+Macro EPID_ENABLE_DEBUG_PRINT needs to be defined in order to activate this routine; otherwise, it prints nothing.
+| [in] | ff | Finite field that element to be printed belongs to |
| [in] | ff_element | Finite field element to be printed |
| [in] | var_name | Result variable name |
| [in] | format | Output format |
| void PrintFpElemStr | +( | +FpElemStr const * | +fp_elem_str, | +
| + | + | char const * | +var_name | +
| + | ) | ++ |
Prints serialized Fp element.
+Macro EPID_ENABLE_DEBUG_PRINT needs to be defined in order to activate this routine; otherwise, it prints nothing.
+| [in] | fp_elem_str | Serialized Fp element to be printed |
| [in] | var_name | Result variable name |
| void PrintFq12ElemStr | +( | +Fq12ElemStr const * | +fq12_elem_str, | +
| + | + | char const * | +var_name, | +
| + | + | PrintUtilFormat | +format | +
| + | ) | ++ |
Prints serialized Fq12 element.
+Macro EPID_ENABLE_DEBUG_PRINT needs to be defined in order to activate this routine; otherwise, it prints nothing.
+| [in] | fq12_elem_str | Serialized Intel(R) EPID Fq12 element to be printed |
| [in] | var_name | Result variable name |
| [in] | format | Output format |
| void PrintFq2ElemStr | +( | +Fq2ElemStr const * | +fq2_elem_str, | +
| + | + | char const * | +var_name, | +
| + | + | PrintUtilFormat | +format | +
| + | ) | ++ |
Prints serialized Fq2 element.
+Macro EPID_ENABLE_DEBUG_PRINT needs to be defined in order to activate this routine; otherwise, it prints nothing.
+| [in] | fq2_elem_str | Serialized Fq2 element to be printed |
| [in] | var_name | Result variable name |
| [in] | format | Output format |
| void PrintFq6ElemStr | +( | +Fq6ElemStr const * | +fq6_elem_str, | +
| + | + | char const * | +var_name, | +
| + | + | PrintUtilFormat | +format | +
| + | ) | ++ |
Prints serialized Fq6 element.
+Macro EPID_ENABLE_DEBUG_PRINT needs to be defined in order to activate this routine; otherwise, it prints nothing.
+| [in] | fq6_elem_str | Serialized Fq6 element to be printed |
| [in] | var_name | Result variable name |
| [in] | format | Output format |
| void PrintFqElemStr | +( | +FqElemStr const * | +fq_elem_str, | +
| + | + | char const * | +var_name | +
| + | ) | ++ |
Prints serialized Fq element.
+Macro EPID_ENABLE_DEBUG_PRINT needs to be defined in order to activate this routine; otherwise, it prints nothing.
+| [in] | fq_elem_str | Serialized Fq element to be printed |
| [in] | var_name | Result variable name |
| void PrintG1ElemStr | +( | +G1ElemStr const * | +g1_elem_str, | +
| + | + | char const * | +var_name, | +
| + | + | PrintUtilFormat | +format | +
| + | ) | ++ |
Prints serialized G1 element.
+Macro EPID_ENABLE_DEBUG_PRINT needs to be defined in order to activate this routine; otherwise, it prints nothing.
+| [in] | g1_elem_str | Serialized G1 element to be printed |
| [in] | var_name | Result variable name |
| [in] | format | Output format |
| void PrintG2ElemStr | +( | +G2ElemStr const * | +g2_elem_str, | +
| + | + | char const * | +var_name, | +
| + | + | PrintUtilFormat | +format | +
| + | ) | ++ |
Prints serialized G2 element.
+Macro EPID_ENABLE_DEBUG_PRINT needs to be defined in order to activate this routine; otherwise, it prints nothing.
+| [in] | g2_elem_str | Serialized G2 element to be printed |
| [in] | var_name | Result variable name |
| [in] | format | Output format |
| void PrintGtElemStr | +( | +GtElemStr const * | +gt_elem_str, | +
| + | + | char const * | +var_name, | +
| + | + | PrintUtilFormat | +format | +
| + | ) | ++ |
Prints serialized Gt element.
+Macro EPID_ENABLE_DEBUG_PRINT needs to be defined in order to activate this routine; otherwise, it prints nothing.
+| [in] | gt_elem_str | Serialized G2 element to be printed |
| [in] | var_name | Result variable name |
| [in] | format | Output format |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
SDK data types. +More...
++Modules | |
| EPID 1.1 specific types | |
| Intel(R) EPID 1.1 specific data types. | |
+Data Structures | |
| struct | OctStr8 |
| 8 bit octet string More... | |
| struct | OctStr16 |
| 16 bit octet string More... | |
| struct | OctStr32 |
| 32 bit octet string More... | |
| struct | OctStr64 |
| 64 bit octet string More... | |
| struct | OctStr128 |
| 128 bit octet string More... | |
| struct | OctStr256 |
| 256 bit octet string More... | |
| struct | OctStr512 |
| 512 bit octet string More... | |
| struct | BigNumStr |
| Serialized BigNum. More... | |
| struct | FpElemStr |
| a number in [0, p-1] More... | |
| struct | FqElemStr |
| a number in [0, q-1] More... | |
| struct | G1ElemStr |
| Serialized G1 element. More... | |
| struct | G2ElemStr |
| Serialized G2 element. More... | |
| struct | GtElemStr |
| Serialized GT element. More... | |
| struct | Epid2Params |
| Intel(R) EPID 2.0 Parameters. More... | |
| struct | GroupPubKey |
| Intel(R) EPID 2.0 group public key. More... | |
| struct | IPrivKey |
| Intel(R) EPID 2.0 issuing private key. More... | |
| struct | PrivKey |
| Intel(R) EPID 2.0 private key. More... | |
| struct | CompressedPrivKey |
| Compressed private key. More... | |
| struct | MembershipCredential |
| Membership credential. More... | |
| struct | JoinRequest |
| Join request. More... | |
| struct | BasicSignature |
| Intel(R) EPID 2.0 basic signature. More... | |
| struct | NrProof |
| non-revoked Proof. More... | |
| struct | EpidSignature |
| Intel(R) EPID 2.0 Signature. More... | |
| struct | PrivRl |
| private-key based revocation list. More... | |
| struct | SigRlEntry |
| entry in SigRL (B,K) More... | |
| struct | SigRl |
| signature based revocation list More... | |
| struct | GroupRl |
| group revocation list More... | |
| struct | VerifierRl |
| struct | Fq2ElemStr |
| Serialized Fq2 element. More... | |
| struct | Fq6ElemStr |
| Serialized Fq2^3 element. More... | |
| struct | Fq12ElemStr |
| Serialized Fq2^3^2 element. More... | |
| struct | EcdsaSignature |
| ECDSA Signature using NIST 256-bit curve secp256r1. More... | |
| struct | EcdsaPublicKey |
| ECDSA Public Key. More... | |
| struct | EcdsaPrivateKey |
| ECDSA Private Key. More... | |
+Typedefs | |
| +typedef OctStr128 | GroupId |
| group ID | |
| +typedef OctStr256 | Seed |
| 256 bit seed derived from fuse key | |
| +typedef OctStr256 | IssuerNonce |
| 256 bit nonce chosen by issuer | |
| +typedef G1ElemStr | ReKeySeed |
| element to store seed values for later rekey | |
+Enumerations | |
| enum | HashAlg { + kInvalidHashAlg = -1, +kSha256 = 0, +kSha384 = 1, +kSha512 = 2, + + kSha512_256 = 3, +kSha3_256 = 4, +kSha3_384 = 5, +kSha3_512 = 6 + + } |
| Recognized hash algorithms. More... | |
SDK data types.
+Defines serialized data types used by the SDK.
+Most of the types defined here are fixed size binary buffers of various sizes that are semantically mapped to the types of various inputs to the Intel(R) EPID APIs.
+For example GtElemStr is a 384 byte buffer that represents a serialized value that is compatible with a FfElement belonging to the FiniteField GT.
+| enum HashAlg | +
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Verifier functionality. +More...
++Modules | |
| EPID 1.1 support | |
| Intel(R) EPID 1.1 Verifier functionality. | |
+Data Structures | |
| struct | VerifierPrecomp |
| Pre-computed verifier settings. More... | |
+Typedefs | |
| +typedef struct VerifierCtx | VerifierCtx |
| Internal context of verifier. | |
+Functions | |
| EpidStatus | EpidVerifierCreate (GroupPubKey const *pub_key, VerifierPrecomp const *precomp, VerifierCtx **ctx) |
| Creates a new verifier context. More... | |
| void | EpidVerifierDelete (VerifierCtx **ctx) |
| Deletes an existing verifier context. More... | |
| EpidStatus | EpidVerifierWritePrecomp (VerifierCtx const *ctx, VerifierPrecomp *precomp) |
| Serializes the pre-computed verifier settings. More... | |
| EpidStatus | EpidVerifierSetPrivRl (VerifierCtx *ctx, PrivRl const *priv_rl, size_t priv_rl_size) |
| Sets the private key based revocation list. More... | |
| EpidStatus | EpidVerifierSetSigRl (VerifierCtx *ctx, SigRl const *sig_rl, size_t sig_rl_size) |
| Sets the signature based revocation list. More... | |
| EpidStatus | EpidVerifierSetGroupRl (VerifierCtx *ctx, GroupRl const *grp_rl, size_t grp_rl_size) |
| Sets the group based revocation list. More... | |
| EpidStatus | EpidVerifierSetVerifierRl (VerifierCtx *ctx, VerifierRl const *ver_rl, size_t ver_rl_size) |
| Sets the verifier revocation list. More... | |
| EpidStatus | EpidVerifierSetHashAlg (VerifierCtx *ctx, HashAlg hash_alg) |
| Sets the hash algorithm to be used by a verifier. More... | |
| EpidStatus | EpidVerifierSetBasename (VerifierCtx *ctx, void const *basename, size_t basename_len) |
| Sets the basename to be used by a verifier. More... | |
| EpidStatus | EpidVerify (VerifierCtx const *ctx, EpidSignature const *sig, size_t sig_len, void const *msg, size_t msg_len) |
| Verifies a signature and checks revocation status. More... | |
| bool | EpidAreSigsLinked (BasicSignature const *sig1, BasicSignature const *sig2) |
| Determines if two signatures are linked. More... | |
| EpidStatus | EpidVerifyBasicSig (VerifierCtx const *ctx, BasicSignature const *sig, void const *msg, size_t msg_len) |
| Verifies a member signature without revocation checks. More... | |
| EpidStatus | EpidNrVerify (VerifierCtx const *ctx, BasicSignature const *sig, void const *msg, size_t msg_len, SigRlEntry const *sigrl_entry, NrProof const *proof) |
| Verifies the non-revoked proof for a single signature based revocation list entry. More... | |
| EpidStatus | EpidCheckPrivRlEntry (VerifierCtx const *ctx, BasicSignature const *sig, FpElemStr const *f) |
| Verifies a signature has not been revoked in the private key based revocation list. More... | |
| size_t | EpidGetVerifierRlSize (VerifierCtx const *ctx) |
| Returns the number of bytes required to serialize the verifier blacklist. More... | |
| EpidStatus | EpidWriteVerifierRl (VerifierCtx const *ctx, VerifierRl *ver_rl, size_t ver_rl_size) |
| Serializes the verifier blacklist to a buffer. More... | |
| EpidStatus | EpidBlacklistSig (VerifierCtx *ctx, EpidSignature const *sig, size_t sig_len, void const *msg, size_t msg_len) |
| Adds a valid name-based signature to the verifier blacklist. More... | |
Verifier functionality.
+Defines the APIs needed by Intel(R) EPID verifiers. Each verifier context (VerifierCtx) represents a verifier for a single group.
+| bool EpidAreSigsLinked | +( | +BasicSignature const * | +sig1, | +
| + | + | BasicSignature const * | +sig2 | +
| + | ) | ++ |
Determines if two signatures are linked.
+The Intel(R) EPID scheme allows signatures to be linked. If basename option is specified when signing, signatures with the same basename are linkable. This linking capability allows the verifier, or anyone, to know whether two Intel(R) EPID signatures are generated by the same member.
+| [in] | sig1 | A basic signature. |
| [in] | sig2 | A basic signature. |
| true | if the signatures were generated by the same member |
| false | if it couldn't be determined if the signatures were generated by the same member |
| EpidStatus EpidBlacklistSig | +( | +VerifierCtx * | +ctx, | +
| + | + | EpidSignature const * | +sig, | +
| + | + | size_t | +sig_len, | +
| + | + | void const * | +msg, | +
| + | + | size_t | +msg_len | +
| + | ) | ++ |
Adds a valid name-based signature to the verifier blacklist.
+If the signature is not valid it will not be added to the blacklist.
+| [in] | ctx | The verifier context. |
| [in] | sig | The name-based signature to revoke. |
| [in] | sig_len | The size of sig in bytes. |
| [in] | msg | The message that was signed. |
| [in] | msg_len | The size of msg in bytes. |
| EpidStatus EpidCheckPrivRlEntry | +( | +VerifierCtx const * | +ctx, | +
| + | + | BasicSignature const * | +sig, | +
| + | + | FpElemStr const * | +f | +
| + | ) | ++ |
Verifies a signature has not been revoked in the private key based revocation list.
+Used in constrained environments where, due to limited memory, it may not be possible to process through a large and potentially unbounded revocation list.
+| [in] | ctx | The verifier context. |
| [in] | sig | The basic signature. |
| [in] | f | The private key based revocation list entry. |
| size_t EpidGetVerifierRlSize | +( | +VerifierCtx const * | +ctx | ) | ++ |
Returns the number of bytes required to serialize the verifier blacklist.
+Use this function to determine the buffer size required by EpidWriteVerifierRl.
+| [in] | ctx | The verifier context. |
| EpidStatus EpidNrVerify | +( | +VerifierCtx const * | +ctx, | +
| + | + | BasicSignature const * | +sig, | +
| + | + | void const * | +msg, | +
| + | + | size_t | +msg_len, | +
| + | + | SigRlEntry const * | +sigrl_entry, | +
| + | + | NrProof const * | +proof | +
| + | ) | ++ |
Verifies the non-revoked proof for a single signature based revocation list entry.
+Used in constrained environments where, due to limited memory, it may not be possible to process through a large and potentially unbounded revocation list.
+| [in] | ctx | The verifier context. |
| [in] | sig | The basic signature. |
| [in] | msg | The message that was signed. |
| [in] | msg_len | The size of msg in bytes. |
| [in] | sigrl_entry | The signature based revocation list entry. |
| [in] | proof | The non-revoked proof. |
| EpidStatus EpidVerifierCreate | +( | +GroupPubKey const * | +pub_key, | +
| + | + | VerifierPrecomp const * | +precomp, | +
| + | + | VerifierCtx ** | +ctx | +
| + | ) | ++ |
Creates a new verifier context.
+Must be called to create the verifier context that is used by other "Verifier" APIs.
+Allocates memory for the context, then initializes it.
+EpidVerifierDelete() must be called to safely release the member context.
+| [in] | pub_key | The group certificate. |
| [in] | precomp | Optional pre-computed data. If NULL the value is computed internally and is readable using EpidVerifierWritePrecomp(). |
| [out] | ctx | Newly constructed verifier context. |
| void EpidVerifierDelete | +( | +VerifierCtx ** | +ctx | ) | ++ |
Deletes an existing verifier context.
+Must be called to safely release a verifier context created using EpidVerifierCreate().
+De-initializes the context, frees memory used by the context, and sets the context pointer to NULL.
+| [in,out] | ctx | The verifier context. Can be NULL. |
| EpidStatus EpidVerifierSetBasename | +( | +VerifierCtx * | +ctx, | +
| + | + | void const * | +basename, | +
| + | + | size_t | +basename_len | +
| + | ) | ++ |
Sets the basename to be used by a verifier.
+| [in,out] | ctx | The verifier context. |
| [in] | basename | The basename. Pass NULL for random base. |
| [in] | basename_len | Number of bytes in basename buffer. Must be 0 if basename is NULL. |
| EpidStatus EpidVerifierSetGroupRl | +( | +VerifierCtx * | +ctx, | +
| + | + | GroupRl const * | +grp_rl, | +
| + | + | size_t | +grp_rl_size | +
| + | ) | ++ |
Sets the group based revocation list.
+The caller is responsible for ensuring the revocation list is authorized, e.g signed by the issuer. The caller is also responsible checking the version of the revocation list. The call fails if trying to set an older version of the revocation list than was last set.
+| [in,out] | ctx | The verifier context. |
| [in] | grp_rl | The group based revocation list. |
| [in] | grp_rl_size | The size of the group based revocation list in bytes. |
| EpidStatus EpidVerifierSetHashAlg | +( | +VerifierCtx * | +ctx, | +
| + | + | HashAlg | +hash_alg | +
| + | ) | ++ |
Sets the hash algorithm to be used by a verifier.
+| [in] | ctx | The verifier context. |
| [in] | hash_alg | The hash algorithm to use. |
| EpidStatus EpidVerifierSetPrivRl | +( | +VerifierCtx * | +ctx, | +
| + | + | PrivRl const * | +priv_rl, | +
| + | + | size_t | +priv_rl_size | +
| + | ) | ++ |
Sets the private key based revocation list.
+The caller is responsible for ensuring the revocation list is authorized, e.g signed by the issuer. The caller is also responsible checking the version of the revocation list. The call fails if trying to set an older version of the revocation list than was last set.
+| [in,out] | ctx | The verifier context. |
| [in] | priv_rl | The private key based revocation list. |
| [in] | priv_rl_size | The size of the private key based revocation list in bytes. |
| EpidStatus EpidVerifierSetSigRl | +( | +VerifierCtx * | +ctx, | +
| + | + | SigRl const * | +sig_rl, | +
| + | + | size_t | +sig_rl_size | +
| + | ) | ++ |
Sets the signature based revocation list.
+The caller is responsible for ensuring the revocation list is authorized, e.g signed by the issuer. The caller is also responsible checking the version of the revocation list. The call fails if trying to set an older version of the revocation list than was last set.
+| [in,out] | ctx | The verifier context. |
| [in] | sig_rl | The signature based revocation list. |
| [in] | sig_rl_size | The size of the signature based revocation list in bytes. |
| EpidStatus EpidVerifierSetVerifierRl | +( | +VerifierCtx * | +ctx, | +
| + | + | VerifierRl const * | +ver_rl, | +
| + | + | size_t | +ver_rl_size | +
| + | ) | ++ |
Sets the verifier revocation list.
+The caller is responsible for ensuring the revocation list is authorized. The caller is also responsible for checking the version of the revocation list. The call fails if trying to set an older version of the same revocation list than was last set.
+Once EpidVerifierSetVerifierRl returns, callers are free to release the memory pointed to by ver_rl.
+| [in,out] | ctx | The verifier context. |
| [in] | ver_rl | The verifier revocation list. |
| [in] | ver_rl_size | The size of the verifier revocation list in bytes. |
| EpidStatus EpidVerifierWritePrecomp | +( | +VerifierCtx const * | +ctx, | +
| + | + | VerifierPrecomp * | +precomp | +
| + | ) | ++ |
Serializes the pre-computed verifier settings.
+| [in] | ctx | The verifier context. |
| [out] | precomp | The Serialized pre-computed verifier settings. |
| EpidStatus EpidVerify | +( | +VerifierCtx const * | +ctx, | +
| + | + | EpidSignature const * | +sig, | +
| + | + | size_t | +sig_len, | +
| + | + | void const * | +msg, | +
| + | + | size_t | +msg_len | +
| + | ) | ++ |
Verifies a signature and checks revocation status.
+| [in] | ctx | The verifier context. |
| [in] | sig | The signature. |
| [in] | sig_len | The size of sig in bytes. |
| [in] | msg | The message that was signed. |
| [in] | msg_len | The size of msg in bytes. |
| kEpidSigValid | Signature validated successfully |
| kEpidSigInvalid | Signature is invalid |
| kEpidSigRevokedInGroupRl | Signature revoked in GroupRl |
| kEpidSigRevokedInPrivRl | Signature revoked in PrivRl |
| kEpidSigRevokedInSigRl | Signature revoked in SigRl |
| kEpidSigRevokedInVerifierRl | Signature revoked in VerifierRl |
| EpidStatus EpidVerifyBasicSig | +( | +VerifierCtx const * | +ctx, | +
| + | + | BasicSignature const * | +sig, | +
| + | + | void const * | +msg, | +
| + | + | size_t | +msg_len | +
| + | ) | ++ |
Verifies a member signature without revocation checks.
+Used in constrained environments where, due to limited memory, it may not be possible to process through a large and potentially unbounded revocation list.
+| [in] | ctx | The verifier context. |
| [in] | sig | The basic signature. |
| [in] | msg | The message that was signed. |
| [in] | msg_len | The size of msg in bytes. |
| EpidStatus EpidWriteVerifierRl | +( | +VerifierCtx const * | +ctx, | +
| + | + | VerifierRl * | +ver_rl, | +
| + | + | size_t | +ver_rl_size | +
| + | ) | ++ |
Serializes the verifier blacklist to a buffer.
+If the current blacklist is empty or not set a valid empty verifier blacklist will be serialized.
+Use EpidGetVerifierRlSize to determine the buffer size required to serialize the verifier blacklist.
+| [in] | ctx | The verifier context. |
| [out] | ver_rl | An existing buffer in which to write the verifier revocation list. |
| [in] | ver_rl_size | The size of the caller allocated output buffer in bytes. |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Error reporting interface. +More...
++Enumerations | |
| enum | EpidStatus { + kEpidNoErr = 0, +kEpidSigValid = 0, +kEpidSigInvalid = 1, +kEpidSigRevokedInGroupRl = 2, + + kEpidSigRevokedInPrivRl = 3, +kEpidSigRevokedInSigRl = 4, +kEpidSigRevokedInVerifierRl = 5, +kEpidErr = -999, + + kEpidNotImpl, +kEpidBadArgErr, +kEpidNoMemErr, +kEpidMemAllocErr, + + kEpidMathErr, +kEpidDivByZeroErr, +kEpidUnderflowErr, +kEpidHashAlgorithmNotSupported, + + kEpidRandMaxIterErr, +kEpidDuplicateErr, +kEpidInconsistentBasenameSetErr, +kEpidMathQuadraticNonResidueError + + } |
| Return status for SDK functions. More... | |
+Functions | |
| char const * | EpidStatusToString (EpidStatus e) |
| Returns string representation of error code. More... | |
Error reporting interface.
+This module defines the return status type. It also provides tools for interactions with status values, such as converting them to a string.
+| enum EpidStatus | +
Return status for SDK functions.
+Convention for status values is as follows:
| Enumerator | |
|---|---|
| kEpidNoErr |
+ no error + |
| kEpidSigValid |
+ Signature is valid. + |
| kEpidSigInvalid |
+ Signature is invalid. + |
| kEpidSigRevokedInGroupRl |
+ Signature revoked in GroupRl. + |
| kEpidSigRevokedInPrivRl |
+ Signature revoked in PrivRl. + |
| kEpidSigRevokedInSigRl |
+ Signature revoked in SigRl. + |
| kEpidSigRevokedInVerifierRl |
+ Signature revoked in VerifierRl. + |
| kEpidErr |
+ unspecified error + |
| kEpidNotImpl |
+ not implemented error + |
| kEpidBadArgErr |
+ incorrect arg to function + |
| kEpidNoMemErr |
+ not enough memory for the operation + |
| kEpidMemAllocErr |
+ insufficient memory allocated for operation + |
| kEpidMathErr |
+ internal math error + |
| kEpidDivByZeroErr |
+ an attempt to divide by zero + |
| kEpidUnderflowErr |
+ a value became less than minimum supported level + |
| kEpidHashAlgorithmNotSupported |
+ unsupported hash algorithm type + |
| kEpidRandMaxIterErr |
+ reached max iteration for random number generation + |
| kEpidDuplicateErr |
+ argument would add duplicate entry + |
| kEpidInconsistentBasenameSetErr |
+ set basename conflicts with arguments + |
| kEpidMathQuadraticNonResidueError |
+ quadratic Non-Residue Error + |
| char const* EpidStatusToString | +( | +EpidStatus | +e | ) | ++ |
Returns string representation of error code.
+| e | The status value. |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Parser for issuer material. +More...
++Modules | |
| EPID 1.1 support | |
| Parser for 1.1 issuer material. | |
+Data Structures | |
| struct | EpidFileHeader |
| Intel(R) EPID binary file header. More... | |
| struct | EpidCaCertificate |
| IoT CA Certificate binary format. More... | |
+Enumerations | |
| enum | EpidVersion { kEpid1x, +kEpid2x, +kNumEpidVersions + } |
| Recognized Intel(R) EPID versions. More... | |
| enum | EpidFileType { + kIssuingCaPubKeyFile, +kGroupPubKeyFile, +kPrivRlFile, +kSigRlFile, + + kGroupRlFile, +kPrivRlRequestFile, +kSigRlRequestFile, +kGroupRlRequestFile, + + kNumFileTypes + + } |
| Recognized Intel(R) EPID file types. More... | |
+Functions | |
| EpidStatus | EpidParseFileHeader (void const *buf, size_t len, EpidVersion *epid_version, EpidFileType *file_type) |
| Extracts Intel(R) EPID Binary Output File header information. More... | |
| EpidStatus | EpidParseGroupPubKeyFile (void const *buf, size_t len, EpidCaCertificate const *cert, GroupPubKey *pubkey) |
| Extracts group public key from buffer in issuer binary format. More... | |
| EpidStatus | EpidParsePrivRlFile (void const *buf, size_t len, EpidCaCertificate const *cert, PrivRl *rl, size_t *rl_len) |
| Extracts private key revocation list from buffer in issuer binary format. More... | |
| EpidStatus | EpidParseSigRlFile (void const *buf, size_t len, EpidCaCertificate const *cert, SigRl *rl, size_t *rl_len) |
| Extracts signature revocation list from buffer in issuer binary format. More... | |
| EpidStatus | EpidParseGroupRlFile (void const *buf, size_t len, EpidCaCertificate const *cert, GroupRl *rl, size_t *rl_len) |
| Extracts group revocation list from buffer in issuer binary format. More... | |
+Variables | |
| +const OctStr16 | kEpidVersionCode [kNumEpidVersions] |
| Encoding of issuer material Intel(R) EPID versions. | |
| +const OctStr16 | kEpidFileTypeCode [kNumFileTypes] |
| Encoding of issuer material file types. | |
Parser for issuer material.
+Provides an API for parsing buffers formatted according to the various IoT Intel(R) EPID binary file formats.
+| enum EpidFileType | +
Recognized Intel(R) EPID file types.
+| Enumerator | |
|---|---|
| kIssuingCaPubKeyFile |
+ IoT Issuing CA public key file. + |
| kGroupPubKeyFile |
+ Group Public Key Output File Format. + |
| kPrivRlFile |
+ Binary Private Key Revocation List. + |
| kSigRlFile |
+ Binary Signature Revocation List. + |
| kGroupRlFile |
+ Binary Group Revocation List. + |
| kPrivRlRequestFile |
+ Binary Private Key Revocation Request. + |
| kSigRlRequestFile |
+ Binary Signature Revocation Request. + |
| kGroupRlRequestFile |
+ Binary Group Revocation Request. + |
| kNumFileTypes |
+ Maximum number of file types. + |
| enum EpidVersion | +
| EpidStatus EpidParseFileHeader | +( | +void const * | +buf, | +
| + | + | size_t | +len, | +
| + | + | EpidVersion * | +epid_version, | +
| + | + | EpidFileType * | +file_type | +
| + | ) | ++ |
Extracts Intel(R) EPID Binary Output File header information.
+| [in] | buf | Pointer to buffer containing Intel(R) EPID Binary Output File to parse. |
| [in] | len | The size of buf in bytes. |
| [out] | epid_version | The extracted EPID version or kNumEpidVersions if EPID version is unknown. Pass NULL to not extract. |
| [out] | file_type | The extracted EPID file type or kNumFileTypes if file type is unknown. Pass NULL to not extract. |
| EpidStatus EpidParseGroupPubKeyFile | +( | +void const * | +buf, | +
| + | + | size_t | +len, | +
| + | + | EpidCaCertificate const * | +cert, | +
| + | + | GroupPubKey * | +pubkey | +
| + | ) | ++ |
Extracts group public key from buffer in issuer binary format.
+Extracts the first group public key from a buffer with format of Intel(R) EPID 2.0 Group Public Key Certificate Binary File. The function validates that the first public key was signed by the private key corresponding to the provided CA certificate and the size of the input buffer is correct.
+| [in] | buf | Pointer to buffer containing public key to extract. |
| [in] | len | The size of buf in bytes. |
| [in] | cert | The issuing CA public key certificate. |
| [out] | pubkey | The extracted group public key. |
| kEpidSigInvalid | Parsing failed due to data authentication failure. |
| EpidStatus EpidParseGroupRlFile | +( | +void const * | +buf, | +
| + | + | size_t | +len, | +
| + | + | EpidCaCertificate const * | +cert, | +
| + | + | GroupRl * | +rl, | +
| + | + | size_t * | +rl_len | +
| + | ) | ++ |
Extracts group revocation list from buffer in issuer binary format.
+Extracts the group revocation list from a buffer with format of Binary Group Certificate Revocation List File. The function validates that the revocation list was signed by the private key corresponding to the provided CA certificate and the size of the input buffer is correct.
+To determine the required size of the revocation list output buffer, provide a null pointer for the output buffer.
+| [in] | buf | Pointer to buffer containing the revocation list to extract. |
| [in] | len | The size of buf in bytes. |
| [in] | cert | The issuing CA public key certificate. |
| [out] | rl | The extracted revocation list. If Null, rl_len is filled with the required output buffer size. |
| [in,out] | rl_len | The size of rl in bytes. |
| kEpidSigInvalid | Parsing failed due to data authentication failure. |
| EpidStatus EpidParsePrivRlFile | +( | +void const * | +buf, | +
| + | + | size_t | +len, | +
| + | + | EpidCaCertificate const * | +cert, | +
| + | + | PrivRl * | +rl, | +
| + | + | size_t * | +rl_len | +
| + | ) | ++ |
Extracts private key revocation list from buffer in issuer binary format.
+Extracts the private key revocation list from a buffer with format of Binary Private Key Revocation List File. The function validates that the revocation list was signed by the private key corresponding to the provided CA certificate and the size of the input buffer is correct.
+To determine the required size of the revocation list output buffer, provide a null pointer for the output buffer.
+| [in] | buf | Pointer to buffer containing the revocation list to extract. |
| [in] | len | The size of buf in bytes. |
| [in] | cert | The issuing CA public key certificate. |
| [out] | rl | The extracted revocation list. If Null, rl_len is filled with the required output buffer size. |
| [in,out] | rl_len | The size of rl in bytes. |
| kEpidSigInvalid | Parsing failed due to data authentication failure. |
| EpidStatus EpidParseSigRlFile | +( | +void const * | +buf, | +
| + | + | size_t | +len, | +
| + | + | EpidCaCertificate const * | +cert, | +
| + | + | SigRl * | +rl, | +
| + | + | size_t * | +rl_len | +
| + | ) | ++ |
Extracts signature revocation list from buffer in issuer binary format.
+Extracts the signature based revocation list from a buffer with format of Binary Signature Revocation List File. The function validates that the revocation list was signed by the private key corresponding to the provided CA certificate and the size of the input buffer is correct.
+To determine the required size of the revocation list output buffer, provide a null pointer for the output buffer.
+| [in] | buf | Pointer to buffer containing the revocation list to extract. |
| [in] | len | The size of buf in bytes. |
| [in] | cert | The issuing CA public key certificate. |
| [out] | rl | The extracted revocation list. If Null, rl_len is filled with the required output buffer size. |
| [in,out] | rl_len | The size of rl in bytes. |
| kEpidSigInvalid | Parsing failed due to data authentication failure. |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Finite field operations. +More...
++Typedefs | |
| +typedef struct FiniteField | FiniteField |
| A finite field. | |
| +typedef struct FfElement | FfElement |
| An element in a finite field. | |
+Functions | |
| EpidStatus | NewFiniteField (BigNumStr const *prime, FiniteField **ff) |
| Creates new finite field. More... | |
| EpidStatus | NewFiniteFieldViaBinomalExtension (FiniteField const *ground_field, FfElement const *ground_element, int degree, FiniteField **ff) |
| Creates a new finite field using binomial extension. More... | |
| EpidStatus | NewFiniteFieldViaPolynomialExtension (FiniteField const *ground_field, BigNumStr const *irr_polynomial, int degree, FiniteField **ff) |
| Creates a new finite field using polynomial extension. More... | |
| void | DeleteFiniteField (FiniteField **ff) |
| Frees a previously allocated FiniteField. More... | |
| EpidStatus | NewFfElement (FiniteField const *ff, FfElement **new_ff_elem) |
| Creates a new finite field element. More... | |
| void | DeleteFfElement (FfElement **ff_elem) |
| Frees a previously allocated FfElement. More... | |
| EpidStatus | ReadFfElement (FiniteField *ff, void const *ff_elem_str, size_t strlen, FfElement *ff_elem) |
| Deserializes a FfElement from a string. More... | |
| EpidStatus | InitFfElementFromBn (FiniteField *ff, BigNum *bn, FfElement *ff_elem) |
| Initializes an existing FfElement from a BigNum. More... | |
| EpidStatus | WriteFfElement (FiniteField *ff, FfElement const *ff_elem, void *ff_elem_str, size_t strlen) |
| Serializes a finite field element to a string. More... | |
| EpidStatus | FfNeg (FiniteField *ff, FfElement const *a, FfElement *r) |
| Calculates the additive inverse of a finite field element. More... | |
| EpidStatus | FfInv (FiniteField *ff, FfElement const *a, FfElement *r) |
| Calculates the multiplicative inverse of a finite field element. More... | |
| EpidStatus | FfAdd (FiniteField *ff, FfElement const *a, FfElement const *b, FfElement *r) |
| Adds two finite field elements. More... | |
| EpidStatus | FfSub (FiniteField *ff, FfElement const *a, FfElement const *b, FfElement *r) |
| Subtracts two finite field elements. More... | |
| EpidStatus | FfMul (FiniteField *ff, FfElement const *a, FfElement const *b, FfElement *r) |
| Multiplies two finite field elements. More... | |
| EpidStatus | FfIsZero (FiniteField *ff, FfElement const *a, bool *is_zero) |
| Checks if given finite field element is the additive identity (zero). More... | |
| EpidStatus | FfExp (FiniteField *ff, FfElement const *a, BigNum const *b, FfElement *r) |
| Raises an element of a finite field to a power. More... | |
| EpidStatus | FfMultiExp (FiniteField *ff, FfElement const **a, BigNumStr const **b, size_t m, FfElement *r) |
| Multi-exponentiates finite field elements. More... | |
| EpidStatus | FfMultiExpBn (FiniteField *ff, FfElement const **a, BigNum const **b, size_t m, FfElement *r) |
| Multi-exponentiates finite field elements. More... | |
| EpidStatus | FfSscmMultiExp (FiniteField *ff, FfElement const **a, BigNumStr const **b, size_t m, FfElement *r) |
| Software side-channel mitigated implementation of FfMultiExp. More... | |
| EpidStatus | FfIsEqual (FiniteField *ff, FfElement const *a, FfElement const *b, bool *is_equal) |
| Checks if two finite field elements are equal. More... | |
| EpidStatus | FfHash (FiniteField *ff, void const *msg, size_t msg_len, HashAlg hash_alg, FfElement *r) |
| Hashes an arbitrary message to an element in a finite field. More... | |
| EpidStatus | FfGetRandom (FiniteField *ff, BigNumStr const *low_bound, BitSupplier rnd_func, void *rnd_param, FfElement *r) |
| Generate random finite field element. More... | |
| EpidStatus | FfSqrt (FiniteField *ff, FfElement const *a, FfElement *r) |
| Finds a square root of a finite field element. More... | |
Finite field operations.
+provides APIs for working with finite fields. Finite fields allow simple mathematical operations based on a finite set of discrete values. The results of these operations are also contained in the same set.
+A simple example of a finite field is all integers from zero that are less than a given value.
+The elements (FfElement) of a finite field can be used in a variety of simple mathematical operations that result in elements of the same field.
+| void DeleteFfElement | +( | +FfElement ** | +ff_elem | ) | ++ |
Frees a previously allocated FfElement.
+Frees memory pointed to by ff_elem. Nulls the pointer.
+| [in] | ff_elem | The finite field element. Can be NULL. |
| void DeleteFiniteField | +( | +FiniteField ** | +ff | ) | ++ |
Frees a previously allocated FiniteField.
+Frees memory pointed to by finite field. Nulls the pointer.
+| [in] | ff | The Finite field. Can be NULL. |
| EpidStatus FfAdd | +( | +FiniteField * | +ff, | +
| + | + | FfElement const * | +a, | +
| + | + | FfElement const * | +b, | +
| + | + | FfElement * | +r | +
| + | ) | ++ |
Adds two finite field elements.
+| [in] | ff | The finite field. |
| [out] | a | The first operand to be added. |
| [out] | b | The second operand to be added. |
| [out] | r | The result of adding a and b. |
| EpidStatus FfExp | +( | +FiniteField * | +ff, | +
| + | + | FfElement const * | +a, | +
| + | + | BigNum const * | +b, | +
| + | + | FfElement * | +r | +
| + | ) | ++ |
Raises an element of a finite field to a power.
+| [in] | ff | The finite field in which to perform the operation |
| [in] | a | The base. |
| [in] | b | The power. |
| [out] | r | The result of raising a to the power b. |
| EpidStatus FfGetRandom | +( | +FiniteField * | +ff, | +
| + | + | BigNumStr const * | +low_bound, | +
| + | + | BitSupplier | +rnd_func, | +
| + | + | void * | +rnd_param, | +
| + | + | FfElement * | +r | +
| + | ) | ++ |
Generate random finite field element.
+| [in] | ff | The finite field associated with the random finite field element. |
| [in] | low_bound | Lower bound of the random finite field to be generated. |
| [in] | rnd_func | Random number generator. |
| [in] | rnd_param | Pass through context data for rnd_func. |
| [in,out] | r | The random finite field element. |
| kEpidRandMaxIterErr | the function should be called again with different random data. |
| EpidStatus FfHash | +( | +FiniteField * | +ff, | +
| + | + | void const * | +msg, | +
| + | + | size_t | +msg_len, | +
| + | + | HashAlg | +hash_alg, | +
| + | + | FfElement * | +r | +
| + | ) | ++ |
Hashes an arbitrary message to an element in a finite field.
+| [in] | ff | The finite field. |
| [in] | msg | The message. |
| [in] | msg_len | The size of msg in bytes. |
| [in] | hash_alg | The hash algorithm. |
| [out] | r | The hashed value. |
| EpidStatus FfInv | +( | +FiniteField * | +ff, | +
| + | + | FfElement const * | +a, | +
| + | + | FfElement * | +r | +
| + | ) | ++ |
Calculates the multiplicative inverse of a finite field element.
+| [in] | ff | The finite field. |
| [in] | a | The element. |
| [out] | r | The inverted element. |
| EpidStatus FfIsEqual | +( | +FiniteField * | +ff, | +
| + | + | FfElement const * | +a, | +
| + | + | FfElement const * | +b, | +
| + | + | bool * | +is_equal | +
| + | ) | ++ |
Checks if two finite field elements are equal.
+| [in] | ff | The finite field. |
| [in] | a | An element to check. |
| [in] | b | Another element to check. |
| [out] | is_equal | The result of the check. |
| EpidStatus FfIsZero | +( | +FiniteField * | +ff, | +
| + | + | FfElement const * | +a, | +
| + | + | bool * | +is_zero | +
| + | ) | ++ |
Checks if given finite field element is the additive identity (zero).
+| [in] | ff | The finite field. |
| [out] | a | The element. |
| [out] | is_zero | The result of the check. |
| EpidStatus FfMul | +( | +FiniteField * | +ff, | +
| + | + | FfElement const * | +a, | +
| + | + | FfElement const * | +b, | +
| + | + | FfElement * | +r | +
| + | ) | ++ |
Multiplies two finite field elements.
+| [in] | ff | The finite field. |
| [out] | a | The first operand to be multplied. |
| [out] | b | The second operand to be multiplied. If ff is an extension field of a field F then this parameter may be an element of either ff or F. |
| [out] | r | The result of multiplying a and b. |
| EpidStatus FfMultiExp | +( | +FiniteField * | +ff, | +
| + | + | FfElement const ** | +a, | +
| + | + | BigNumStr const ** | +b, | +
| + | + | size_t | +m, | +
| + | + | FfElement * | +r | +
| + | ) | ++ |
Multi-exponentiates finite field elements.
+Calculates FfExp(p[0],b[0]) * ... * FfExp(p[m-1],b[m-1]) for m > 1
+| [in] | ff | The finite field in which to perform the operation |
| [in] | a | The bases. |
| [in] | b | The powers. |
| [in] | m | Number of entries in a and b. |
| [out] | r | The result of raising each a to the corresponding power b and multiplying the results. |
| EpidStatus FfMultiExpBn | +( | +FiniteField * | +ff, | +
| + | + | FfElement const ** | +a, | +
| + | + | BigNum const ** | +b, | +
| + | + | size_t | +m, | +
| + | + | FfElement * | +r | +
| + | ) | ++ |
Multi-exponentiates finite field elements.
+Calculates FfExp(p[0],b[0]) * ... * FfExp(p[m-1],b[m-1]) for m > 1
+| [in] | ff | The finite field in which to perform the operation |
| [in] | a | The bases. |
| [in] | b | The powers. |
| [in] | m | Number of entries in a and b. |
| [out] | r | The result of raising each a to the corresponding power b and multiplying the results. |
| EpidStatus FfNeg | +( | +FiniteField * | +ff, | +
| + | + | FfElement const * | +a, | +
| + | + | FfElement * | +r | +
| + | ) | ++ |
Calculates the additive inverse of a finite field element.
+| [in] | ff | The finite field. |
| [in] | a | The element. |
| [out] | r | The inverted element. |
| EpidStatus FfSqrt | +( | +FiniteField * | +ff, | +
| + | + | FfElement const * | +a, | +
| + | + | FfElement * | +r | +
| + | ) | ++ |
Finds a square root of a finite field element.
+This function calculates the square root by the method of false position.
+| [in] | ff | The finite field in which to perform the operation |
| [in] | a | The bases. |
| [out] | r | The result of raising each a to the corresponding power b and multiplying the results. |
| kEpidMathQuadraticNonResidueError | No square root could be found. |
| EpidStatus FfSscmMultiExp | +( | +FiniteField * | +ff, | +
| + | + | FfElement const ** | +a, | +
| + | + | BigNumStr const ** | +b, | +
| + | + | size_t | +m, | +
| + | + | FfElement * | +r | +
| + | ) | ++ |
Software side-channel mitigated implementation of FfMultiExp.
+Calculates FfExp(p[0],b[0]) * ... * FfExp(p[m-1],b[m-1]) for m > 1
+| [in] | ff | The finite field in which to perform the operation. |
| [in] | a | The bases. |
| [in] | b | The powers. |
| [in] | m | Number of entries in a and b. |
| [out] | r | The result of raising each a to the corresponding power b and multiplying the results. |
| EpidStatus FfSub | +( | +FiniteField * | +ff, | +
| + | + | FfElement const * | +a, | +
| + | + | FfElement const * | +b, | +
| + | + | FfElement * | +r | +
| + | ) | ++ |
Subtracts two finite field elements.
+| [in] | ff | The finite field. |
| [out] | a | The first operand to use in subtraction. |
| [out] | b | The second operand to use in subtraction. |
| [out] | r | The result of subtracting a and b. |
| EpidStatus InitFfElementFromBn | +( | +FiniteField * | +ff, | +
| + | + | BigNum * | +bn, | +
| + | + | FfElement * | +ff_elem | +
| + | ) | ++ |
Initializes an existing FfElement from a BigNum.
+| [in] | ff | The finite field. Must be a Prime Field. |
| [in] | bn | The value to read. |
| [out] | ff_elem | The target FfElement. |
| EpidStatus NewFfElement | +( | +FiniteField const * | +ff, | +
| + | + | FfElement ** | +new_ff_elem | +
| + | ) | ++ |
Creates a new finite field element.
+Allocates memory and creates a new finite field element.
+Use DeleteFfElement() to free memory.
+| [in] | ff | The finite field. |
| [out] | new_ff_elem | The Newly constructed finite field element. |
| EpidStatus NewFiniteField | +( | +BigNumStr const * | +prime, | +
| + | + | FiniteField ** | +ff | +
| + | ) | ++ |
Creates new finite field.
+Allocates memory and creates a new finite field GF(prime).
+Use DeleteFiniteField() to free memory.
+| [in] | prime | The order of the finite field. |
| [out] | ff | The newly constructed finite field. |
| EpidStatus NewFiniteFieldViaBinomalExtension | +( | +FiniteField const * | +ground_field, | +
| + | + | FfElement const * | +ground_element, | +
| + | + | int | +degree, | +
| + | + | FiniteField ** | +ff | +
| + | ) | ++ |
Creates a new finite field using binomial extension.
+Allocates memory and creates a finite field using binomial extension.
+Use DeleteFiniteField() to free memory.
+| [in] | ground_field | The ground field. |
| [in] | ground_element | The low-order term of the extension. |
| [in] | degree | The degree of the extension. |
| [out] | ff | The newly constructed finite field. |
| EpidStatus NewFiniteFieldViaPolynomialExtension | +( | +FiniteField const * | +ground_field, | +
| + | + | BigNumStr const * | +irr_polynomial, | +
| + | + | int | +degree, | +
| + | + | FiniteField ** | +ff | +
| + | ) | ++ |
Creates a new finite field using polynomial extension.
+Allocates memory and creates a finite field using polynomial extension.
+Use DeleteFiniteField() to free memory.
+| [in] | ground_field | The ground field. |
| [in] | irr_polynomial | Array with coefficients of the irreducible polynomial. Number of elements must be equal to the degree of the extension. |
| [in] | degree | The degree of the extension. |
| [out] | ff | The newly constructed finite field. |
| EpidStatus ReadFfElement | +( | +FiniteField * | +ff, | +
| + | + | void const * | +ff_elem_str, | +
| + | + | size_t | +strlen, | +
| + | + | FfElement * | +ff_elem | +
| + | ) | ++ |
Deserializes a FfElement from a string.
+| [in] | ff | The finite field. |
| [in] | ff_elem_str | The serialized value. |
| [in] | strlen | The size of ff_elem_str in bytes. |
| [out] | ff_elem | The target FfElement. |
| EpidStatus WriteFfElement | +( | +FiniteField * | +ff, | +
| + | + | FfElement const * | +ff_elem, | +
| + | + | void * | +ff_elem_str, | +
| + | + | size_t | +strlen | +
| + | ) | ++ |
Serializes a finite field element to a string.
+| [in] | ff | The finite field. |
| [in] | ff_elem | The FfElement to be serialized. |
| [out] | ff_elem_str | The target string. |
| [in] | strlen | The size of ff_elem_str in bytes. |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Hash primitives. +More...
++Data Structures | |
| struct | Sha256Digest |
| SHA256 digest. More... | |
+Functions | |
| EpidStatus | Sha256MessageDigest (void const *msg, size_t len, Sha256Digest *digest) |
| Computes SHA256 digest of a message. More... | |
Hash primitives.
+Provides APIs for computing digests of messages.
+| EpidStatus Sha256MessageDigest | +( | +void const * | +msg, | +
| + | + | size_t | +len, | +
| + | + | Sha256Digest * | +digest | +
| + | ) | ++ |
Computes SHA256 digest of a message.
+| [in] | msg | Message to compute digest for. |
| [in] | len | The size of msg in bytes. |
| [out] | digest | The resulting message digest. |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Pairing operations. +More...
++Modules | |
| EPID 1.1 specific pairing | |
| EPID 1.1 pairing operations. | |
+Typedefs | |
| +typedef struct PairingState | PairingState |
| A pairing. | |
+Functions | |
| EpidStatus | NewPairingState (EcGroup const *ga, EcGroup const *gb, FiniteField *ff, BigNumStr const *t, bool neg, PairingState **ps) |
| Constructs a new pairing state. More... | |
| void | DeletePairingState (PairingState **ps) |
| Frees a previously allocated by PairingState. More... | |
| EpidStatus | Pairing (PairingState *ps, FfElement *d, EcPoint const *a, EcPoint const *b) |
| Computes an Optimal Ate Pairing for two parameters. More... | |
Pairing operations.
+Provides APIs for defining and using a pairing relationship between two elliptic curve groups.
+| void DeletePairingState | +( | +PairingState ** | +ps | ) | ++ |
Frees a previously allocated by PairingState.
+Frees memory pointed to by pairing state. Nulls the pointer.
+| [in] | ps | The pairing state. Can be NULL. |
| EpidStatus NewPairingState | +( | +EcGroup const * | +ga, | +
| + | + | EcGroup const * | +gb, | +
| + | + | FiniteField * | +ff, | +
| + | + | BigNumStr const * | +t, | +
| + | + | bool | +neg, | +
| + | + | PairingState ** | +ps | +
| + | ) | ++ |
Constructs a new pairing state.
+Allocates memory and creates a new pairing state for Optimal Ate Pairing.
+Use DeletePairingState() to free memory.
+| [in] | ga | The EcGroup from which the first parameter of the pairing is taken. |
| [in] | gb | The EcGroup from which the second parameter of the pairing is taken. |
| [in] | ff | The result finite field. Must be a Fq12 field. |
| [in] | t | A positive integer such that 6(t^2) == q - p, where p and q are parameters of G1. |
| [in] | neg | Select the alternate "negate" processing path for Optimal Ate Pairing. |
| [out] | ps | Newly constructed pairing state. |
| EpidStatus Pairing | +( | +PairingState * | +ps, | +
| + | + | FfElement * | +d, | +
| + | + | EcPoint const * | +a, | +
| + | + | EcPoint const * | +b | +
| + | ) | ++ |
Computes an Optimal Ate Pairing for two parameters.
+| [in] | ps | The pairing state. |
| [out] | d | The result of the pairing. Will be in ff used to create the pairing state. |
| [in] | a | The first value to pair. Must be in ga used to create ps. |
| [in] | b | The second value to pair. Must be in gb used to create ps |
|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Hash primitives. +More...
++Data Structures | |
| struct | Sha256Digest |
| SHA256 digest. More... | |
+Functions | |
| EpidStatus | Sha256MessageDigest (void const *msg, size_t len, Sha256Digest *digest) |
| Computes SHA256 digest of a message. More... | |
Hash primitives.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
This file is used by Doxygen to generate documentation. +More...
+This file is used by Doxygen to generate documentation.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
Intel® EPID is a cryptographic protocol which enables the remote authentication of a trusted platform whilst preserving the user's privacy.
+The Intel® EPID Software Development Kit provides an implementation of the Intel® EPID specification that developers can use when developing their own applications using Intel® EPID technology.
+|
+ Intel® Enhanced Privacy ID SDK
+ 3.0.0
+
+ |
+
This file is used by Doxygen to generate documentation. +More...
+This file is used by Doxygen to generate documentation.
+| t |