kxco-pq-agent 1.0.3 → 1.0.5
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/package.json +5 -5
- package/src/agent-identity.js +3 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kxco-pq-agent",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Post-quantum identity for AI agents and autonomous systems
|
|
3
|
+
"version": "1.0.5",
|
|
4
|
+
"description": "Post-quantum identity for AI agents and autonomous systems: a KYC-verified institution sponsors an ML-DSA-65 keypair and locked capability scope for any agent that cannot pass KYC itself.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"post-quantum",
|
|
7
7
|
"pqc",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"homepage": "https://kxco.ai",
|
|
32
32
|
"repository": {
|
|
33
33
|
"type": "git",
|
|
34
|
-
"url": "git+https://github.com/
|
|
34
|
+
"url": "git+https://github.com/KnightsbridgeAIQ/kxco-pq-agent.git"
|
|
35
35
|
},
|
|
36
36
|
"bugs": {
|
|
37
|
-
"url": "https://github.com/
|
|
37
|
+
"url": "https://github.com/KnightsbridgeAIQ/kxco-pq-agent/issues"
|
|
38
38
|
},
|
|
39
39
|
"type": "module",
|
|
40
40
|
"sideEffects": false,
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"node": "\u003e=20.19"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"kxco-post-quantum": "^1.
|
|
57
|
+
"kxco-post-quantum": "^1.3.0"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"test": "node --test --test-timeout=30000 test/agent.test.js"
|
package/src/agent-identity.js
CHANGED
|
@@ -171,10 +171,10 @@ export class KxcoAgentIdentity {
|
|
|
171
171
|
if (!this.#keypair?.secretKey) {
|
|
172
172
|
throw new KxcoPqAgentError('no signing key — reconstruct with KxcoAgentIdentity.import()')
|
|
173
173
|
}
|
|
174
|
-
return mlDsa.
|
|
174
|
+
return Buffer.from(mlDsa.sign(
|
|
175
175
|
new Uint8Array(this.#keypair.secretKey),
|
|
176
176
|
new Uint8Array(message),
|
|
177
|
-
)
|
|
177
|
+
), 'hex')
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
async getPublicKey() {
|
|
@@ -262,7 +262,7 @@ export class KxcoAgentIdentity {
|
|
|
262
262
|
const msg = credentialSigningMsg({ agentKid, agentPublicKey, sponsorKid, agentType, label, model, scope, issuedAt, expiresAt })
|
|
263
263
|
let ok
|
|
264
264
|
try {
|
|
265
|
-
ok = mlDsa.
|
|
265
|
+
ok = mlDsa.verify(new Uint8Array(sponsorPublicKey), msg, Buffer.from(fromB64url(sponsorSignature)).toString('hex'))
|
|
266
266
|
} catch {
|
|
267
267
|
ok = false
|
|
268
268
|
}
|