@reclaimprotocol/attestor-core
Version:
<div> <div> <img src="https://raw.githubusercontent.com/reclaimprotocol/.github/main/assets/banners/Attestor-Core.png" /> </div> </div>
166 lines (165 loc) • 5.96 kB
TypeScript
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
export declare const protobufPackage = "tdx";
export interface QuoteV4 {
/** Header of quote structure */
header: Header | undefined;
/** TD report by which quote is generated */
tdQuoteBody: TDQuoteBody | undefined;
/** Size of the Quote Signature Data structure */
signedDataSize: number;
/** Quote Signature Data structure. */
signedData: Ecdsa256BitQuoteV4AuthData | undefined;
/** Extra bytes included to fill the quote buffer */
extraBytes: Uint8Array;
}
export interface Header {
/** Version 4 supported */
version: number;
/**
* Type of attestation key used by quoting enclave
* Values :
* 2 (ECDSA-256-with-P-256 curve)
* 3 (ECDSA-384-with-P-384 curve) (Currently not supported)
*/
attestationKeyType: number;
/**
* TEE for this attestation
* TDX : 0x00000081
*/
teeType: number;
/** should be 2 bytes */
qeSvn: Uint8Array;
/** should be 2 bytes */
pceSvn: Uint8Array;
/** Unique vendor id of QE vendor */
qeVendorId: Uint8Array;
/** Custom user defined data */
userData: Uint8Array;
}
export interface TDQuoteBody {
/** should be 16 bytes */
teeTcbSvn: Uint8Array;
/** should be 48 bytes */
mrSeam: Uint8Array;
/** should be 48 bytes */
mrSignerSeam: Uint8Array;
/** should be 8 bytes */
seamAttributes: Uint8Array;
/** should be 8 bytes */
tdAttributes: Uint8Array;
/** should be 8 bytes */
xfam: Uint8Array;
/** should be 48 bytes */
mrTd: Uint8Array;
/** should be 48 bytes */
mrConfigId: Uint8Array;
/** should be 48 bytes */
mrOwner: Uint8Array;
/** should be 48 bytes */
mrOwnerConfig: Uint8Array;
/** should be 48 * rtmrsCount */
rtmrs: Uint8Array[];
/** should be 64 bytes */
reportData: Uint8Array;
}
export interface Ecdsa256BitQuoteV4AuthData {
/** The ECDSA 256-bit signature. */
signature: Uint8Array;
/** The ECDSA 256-bit public key of the attestation key. */
ecdsaAttestationKey: Uint8Array;
/** The certification data. */
certificationData: CertificationData | undefined;
}
export interface CertificationData {
/**
* Supported values:
* - 1 (PCK identifier: PPID in plain text, CPUSVN and PCESVN)
* - 2 (PCK identifier: PPID encrypted using RSA-2048-OAEP, CPUSVN and PCESVN)
* - 3 (PCK identifier: PPID encrypted using RSA-3072-OAEP, CPUSVN and PCESVN)
* - 4 (PCK Leaf Certificate in plain text, currently not supported)
* - 5 (Concatenated PCK Cert Chain)
* - 6 (QE Report Certification Data)
* - 7 (PLATFORM_MANIFEST, currently not supported)
*/
certificateDataType: number;
/** Size of Certification Data field */
size: number;
qeReportCertificationData: QEReportCertificationData | undefined;
}
export interface QEReportCertificationData {
qeReport: EnclaveReport | undefined;
/** should be 64 bytes */
qeReportSignature: Uint8Array;
qeAuthData: QeAuthData | undefined;
pckCertificateChainData: PCKCertificateChainData | undefined;
}
export interface PCKCertificateChainData {
/**
* Supported values:
* - 1 (PCK identifier: PPID in plain text, CPUSVN and PCESVN)
* - 2 (PCK identifier: PPID encrypted using RSA-2048-OAEP, CPUSVN and PCESVN)
* - 3 (PCK identifier: PPID encrypted using RSA-3072-OAEP, CPUSVN and PCESVN)
* - 4 (PCK Leaf Certificate in plain text, currently not supported)
* - 5 (Concatenated PCK Cert Chain)
* - 6 (QE Report Certification Data)
* - 7 (PLATFORM_MANIFEST, currently not supported)
*/
certificateDataType: number;
/** Size of Certification Data field */
size: number;
pckCertChain: Uint8Array;
}
export interface QeAuthData {
/** The parsed data size. */
parsedDataSize: number;
/** The data. */
data: Uint8Array;
}
export interface EnclaveReport {
/** should be 16 bytes */
cpuSvn: Uint8Array;
/** should be 4 bytes */
miscSelect: number;
/** should be 28 bytes */
reserved1: Uint8Array;
/** should be 16 bytes */
attributes: Uint8Array;
/** should be 32 bytes */
mrEnclave: Uint8Array;
/** should be 32 bytes */
reserved2: Uint8Array;
/** should be 32 bytes */
mrSigner: Uint8Array;
/** should be 96 bytes */
reserved3: Uint8Array;
/** should be 2 bytes */
isvProdId: number;
/** should be 2 bytes */
isvSvn: number;
/** should be 60 bytes */
reserved4: Uint8Array;
/** should be 64 bytes */
reportData: Uint8Array;
}
export declare const QuoteV4: MessageFns<QuoteV4>;
export declare const Header: MessageFns<Header>;
export declare const TDQuoteBody: MessageFns<TDQuoteBody>;
export declare const Ecdsa256BitQuoteV4AuthData: MessageFns<Ecdsa256BitQuoteV4AuthData>;
export declare const CertificationData: MessageFns<CertificationData>;
export declare const QEReportCertificationData: MessageFns<QEReportCertificationData>;
export declare const PCKCertificateChainData: MessageFns<PCKCertificateChainData>;
export declare const QeAuthData: MessageFns<QeAuthData>;
export declare const EnclaveReport: MessageFns<EnclaveReport>;
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
[K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
export interface MessageFns<T> {
encode(message: T, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): T;
fromJSON(object: any): T;
toJSON(message: T): unknown;
create(base?: DeepPartial<T>): T;
fromPartial(object: DeepPartial<T>): T;
}
export {};