@reclaimprotocol/attestor-core
Version:
<div> <div> <img src="https://raw.githubusercontent.com/reclaimprotocol/.github/main/assets/banners/Attestor-Core.png" /> </div> </div>
145 lines (144 loc) • 5.35 kB
TypeScript
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
export declare const protobufPackage = "sevsnp";
/**
* Report represents an SEV-SNP ATTESTATION_REPORT, specified in SEV SNP API
* documentation https://www.amd.com/system/files/TechDocs/56860.pdf
*/
export interface Report {
/** Should be 2 for revision 1.55, and 3 for revision 1.56 */
version: number;
guestSvn: number;
policy: bigint;
/** Should be 16 bytes long */
familyId: Uint8Array;
/** Should be 16 bytes long */
imageId: Uint8Array;
vmpl: number;
signatureAlgo: number;
currentTcb: bigint;
platformInfo: bigint;
/** AuthorKeyEn, MaskChipKey, SigningKey */
signerInfo: number;
/** Should be 64 bytes long */
reportData: Uint8Array;
/** Should be 48 bytes long */
measurement: Uint8Array;
/** Should be 32 bytes long */
hostData: Uint8Array;
/** Should be 48 bytes long */
idKeyDigest: Uint8Array;
/** Should be 48 bytes long */
authorKeyDigest: Uint8Array;
/** Should be 32 bytes long */
reportId: Uint8Array;
/** Should be 32 bytes long */
reportIdMa: Uint8Array;
reportedTcb: bigint;
/** Should be 64 bytes long */
chipId: Uint8Array;
committedTcb: bigint;
/**
* Each build, minor, major triple should be packed together in a uint32
* packed together at 7:0, 15:8, 23:16 respectively
*/
currentBuild: number;
currentMinor: number;
currentMajor: number;
committedBuild: number;
committedMinor: number;
committedMajor: number;
launchTcb: bigint;
/** Should be 512 bytes long */
signature: Uint8Array;
/** The cpuid(1).eax & 0x0fff0fff representation of family/model/stepping */
cpuid1eaxFms: number;
launchMitVector: bigint;
currentMitVector: bigint;
}
export interface CertificateChain {
/**
* The versioned chip endorsement key's certificate for the
* key that signed this report.
*/
vcekCert: Uint8Array;
/**
* The versioned loaded endorsement key's certificate for the
* key that signed this report.
*/
vlekCert: Uint8Array;
/** The AMD SEV or AMD SEV-VLEK certificate that signed the V?EK cert. */
askCert: Uint8Array;
/** The AMD Root key certificate (signs the ASK cert). */
arkCert: Uint8Array;
/**
* A certificate the host may inject to endorse the measurement of the
* firmware.
*
* @deprecated
*/
firmwareCert: Uint8Array;
/** Non-standard certificates the host may inject. */
extras: {
[key: string]: Uint8Array;
};
}
export interface CertificateChain_ExtrasEntry {
key: string;
value: Uint8Array;
}
/**
* The CPUID[EAX=1] version information includes product info as described in
* the AMD KDS specification. The product name, model, and stepping values are
* important for determining the required parameters to KDS when requesting the
* endorsement key's certificate.
*/
export interface SevProduct {
name: SevProduct_SevProductName;
/**
* Must be a 4-bit number
*
* @deprecated
*/
stepping: number;
machineStepping: number | undefined;
}
export declare const SevProduct_SevProductName: {
readonly SEV_PRODUCT_UNKNOWN: 0;
readonly SEV_PRODUCT_MILAN: 1;
readonly SEV_PRODUCT_GENOA: 2;
readonly SEV_PRODUCT_TURIN: 3;
readonly UNRECOGNIZED: -1;
};
export type SevProduct_SevProductName = typeof SevProduct_SevProductName[keyof typeof SevProduct_SevProductName];
export declare namespace SevProduct_SevProductName {
type SEV_PRODUCT_UNKNOWN = typeof SevProduct_SevProductName.SEV_PRODUCT_UNKNOWN;
type SEV_PRODUCT_MILAN = typeof SevProduct_SevProductName.SEV_PRODUCT_MILAN;
type SEV_PRODUCT_GENOA = typeof SevProduct_SevProductName.SEV_PRODUCT_GENOA;
type SEV_PRODUCT_TURIN = typeof SevProduct_SevProductName.SEV_PRODUCT_TURIN;
type UNRECOGNIZED = typeof SevProduct_SevProductName.UNRECOGNIZED;
}
export declare function sevProduct_SevProductNameFromJSON(object: any): SevProduct_SevProductName;
export declare function sevProduct_SevProductNameToJSON(object: SevProduct_SevProductName): string;
export interface Attestation {
report: Report | undefined;
certificateChain: CertificateChain | undefined;
product: SevProduct | undefined;
}
export declare const Report: MessageFns<Report>;
export declare const CertificateChain: MessageFns<CertificateChain>;
export declare const CertificateChain_ExtrasEntry: MessageFns<CertificateChain_ExtrasEntry>;
export declare const SevProduct: MessageFns<SevProduct>;
export declare const Attestation: MessageFns<Attestation>;
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 {};