node-tpm2 0.0.4-beta.4 → 0.0.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -17
- package/api.js +135 -9
- package/docs/api-reference.md +151 -35
- package/docs/roadmap.md +28 -32
- package/docs/windows-pcp.md +3 -0
- package/examples/nv-smoke.mjs +89 -0
- package/index.d.ts +50 -8
- package/native.cjs +60 -52
- package/native.d.ts +50 -0
- package/package.json +10 -10
package/native.d.ts
CHANGED
|
@@ -15,6 +15,13 @@ export interface AkBlobJs {
|
|
|
15
15
|
|
|
16
16
|
export declare function createKey(opts?: KeyCreateOptionsJs | undefined | null): Promise<KeyCreateResultJs>
|
|
17
17
|
|
|
18
|
+
export declare function decryptKeyBlob(opts: DecryptKeyBlobOptionsJs): Promise<Buffer>
|
|
19
|
+
|
|
20
|
+
export interface DecryptKeyBlobOptionsJs {
|
|
21
|
+
keyBlob: AkBlobJs
|
|
22
|
+
cipher: Buffer
|
|
23
|
+
}
|
|
24
|
+
|
|
18
25
|
export interface FixedPropertiesJs {
|
|
19
26
|
manufacturer: string
|
|
20
27
|
firmwareVersion: string
|
|
@@ -39,6 +46,40 @@ export interface KeyCreateResultJs {
|
|
|
39
46
|
keyBlob: AkBlobJs
|
|
40
47
|
}
|
|
41
48
|
|
|
49
|
+
export declare function nvDefine(opts: NvDefineOptionsJs): Promise<void>
|
|
50
|
+
|
|
51
|
+
export interface NvDefineOptionsJs {
|
|
52
|
+
handle: string
|
|
53
|
+
size: number
|
|
54
|
+
auth?: Buffer
|
|
55
|
+
ownerAuth?: Buffer
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export declare function nvRead(handle: string, offset?: number | undefined | null, size?: number | undefined | null, auth?: Buffer | undefined | null): Promise<Buffer>
|
|
59
|
+
|
|
60
|
+
export declare function nvReadPublic(handle: string): Promise<NvReadPublicJs>
|
|
61
|
+
|
|
62
|
+
export interface NvReadPublicJs {
|
|
63
|
+
dataSize: number
|
|
64
|
+
attributes: number
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export declare function nvUndefine(opts: NvUndefineOptionsJs): Promise<void>
|
|
68
|
+
|
|
69
|
+
export interface NvUndefineOptionsJs {
|
|
70
|
+
handle: string
|
|
71
|
+
ownerAuth?: Buffer
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export declare function nvWrite(opts: NvWriteOptionsJs): Promise<void>
|
|
75
|
+
|
|
76
|
+
export interface NvWriteOptionsJs {
|
|
77
|
+
handle: string
|
|
78
|
+
data: Buffer
|
|
79
|
+
offset?: number
|
|
80
|
+
auth?: Buffer
|
|
81
|
+
}
|
|
82
|
+
|
|
42
83
|
export declare function pcrExtend(index: number, digest: Buffer): Promise<void>
|
|
43
84
|
|
|
44
85
|
export declare function pcrRead(selection: Array<number>, bank?: string | undefined | null): Promise<Record<string, string>>
|
|
@@ -83,9 +124,18 @@ export interface ReadPublicJs {
|
|
|
83
124
|
name: Buffer
|
|
84
125
|
}
|
|
85
126
|
|
|
127
|
+
export declare function seal(opts: SealOptionsJs): Promise<Buffer>
|
|
128
|
+
|
|
129
|
+
export interface SealOptionsJs {
|
|
130
|
+
data: Buffer
|
|
131
|
+
pcrSelection?: Array<number>
|
|
132
|
+
}
|
|
133
|
+
|
|
86
134
|
export declare function signKeyBlob(opts: SignKeyBlobOptionsJs): Promise<Buffer>
|
|
87
135
|
|
|
88
136
|
export interface SignKeyBlobOptionsJs {
|
|
89
137
|
keyBlob: AkBlobJs
|
|
90
138
|
digest: Buffer
|
|
91
139
|
}
|
|
140
|
+
|
|
141
|
+
export declare function unseal(blob: Buffer): Promise<Buffer>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-tpm2",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5-beta.1",
|
|
4
4
|
"description": "TPM 2.0 attestation for Node.js — prebuilt native bindings, PCR quotes, and fleet-ready Windows PCP keys. No tpm2-tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -81,14 +81,14 @@
|
|
|
81
81
|
"@napi-rs/cli": "^3.7.2"
|
|
82
82
|
},
|
|
83
83
|
"optionalDependencies": {
|
|
84
|
-
"node-tpm2-windows-x64-msvc": "0.0.
|
|
85
|
-
"node-tpm2-windows-arm64-msvc": "0.0.
|
|
86
|
-
"node-tpm2-linux-x64-gnu": "0.0.
|
|
87
|
-
"node-tpm2-linux-arm64-gnu": "0.0.
|
|
88
|
-
"node-tpm2-linux-x64-musl": "0.0.
|
|
89
|
-
"node-tpm2-linux-arm64-musl": "0.0.
|
|
90
|
-
"node-tpm2-darwin-arm64": "0.0.
|
|
91
|
-
"node-tpm2-win32-x64-msvc": "0.0.
|
|
92
|
-
"node-tpm2-win32-arm64-msvc": "0.0.
|
|
84
|
+
"node-tpm2-windows-x64-msvc": "0.0.5-beta.1",
|
|
85
|
+
"node-tpm2-windows-arm64-msvc": "0.0.5-beta.1",
|
|
86
|
+
"node-tpm2-linux-x64-gnu": "0.0.5-beta.1",
|
|
87
|
+
"node-tpm2-linux-arm64-gnu": "0.0.5-beta.1",
|
|
88
|
+
"node-tpm2-linux-x64-musl": "0.0.5-beta.1",
|
|
89
|
+
"node-tpm2-linux-arm64-musl": "0.0.5-beta.1",
|
|
90
|
+
"node-tpm2-darwin-arm64": "0.0.5-beta.1",
|
|
91
|
+
"node-tpm2-win32-x64-msvc": "0.0.5-beta.1",
|
|
92
|
+
"node-tpm2-win32-arm64-msvc": "0.0.5-beta.1"
|
|
93
93
|
}
|
|
94
94
|
}
|