@interop/x25519-key-agreement-key 5.0.0 → 5.1.0
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
CHANGED
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/@interop/x25519-key-agreement-key)
|
|
5
5
|
|
|
6
6
|
> An X25519 (Curve25519) DH (Diffie-Hellman) key implementation to work with the
|
|
7
|
-
> X25519 2020 Crypto suite.
|
|
7
|
+
> X25519 2020 Crypto suite for JS/TypeScript, for Node.js, browser and React Native.
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
10
10
|
|
|
11
|
-
- [Security](#security)
|
|
12
11
|
- [Background](#background)
|
|
13
12
|
- [Install](#install)
|
|
14
13
|
- [Usage](#usage)
|
|
@@ -16,10 +15,6 @@
|
|
|
16
15
|
- [Commercial Support](#commercial-support)
|
|
17
16
|
- [License](#license)
|
|
18
17
|
|
|
19
|
-
## Security
|
|
20
|
-
|
|
21
|
-
TBD
|
|
22
|
-
|
|
23
18
|
## Background
|
|
24
19
|
|
|
25
20
|
(Forked from
|
|
@@ -35,7 +30,7 @@ To actually perform encryption with those keys, we recommend you use the
|
|
|
35
30
|
[`minimal-cipher`](https://github.com/digitalbazaar/minimal-cipher) library.
|
|
36
31
|
|
|
37
32
|
This is a low-level level library to generate and serialize X25519 (Curve25519)
|
|
38
|
-
key pairs (uses `
|
|
33
|
+
key pairs (uses [`@noble/curves`](https://github.com/paulmillr/noble-curves) under the hood).
|
|
39
34
|
|
|
40
35
|
See also (related specs):
|
|
41
36
|
|
|
@@ -127,6 +122,41 @@ const keyPair = await X25519KeyAgreementKey2020.from({
|
|
|
127
122
|
})
|
|
128
123
|
```
|
|
129
124
|
|
|
125
|
+
Giving a key a self-contained `did:key` identity (when it has no controller of
|
|
126
|
+
its own, e.g. a bare recipient public key) -- pass `didKey: true` to `from()` or
|
|
127
|
+
`fromFingerprint()`:
|
|
128
|
+
|
|
129
|
+
```js
|
|
130
|
+
const recipient = X25519KeyAgreementKey2020.fromFingerprint({
|
|
131
|
+
fingerprint: 'z6LSeRSE5Em5oJpwdk3NBaLVERBS332ULC7EQq5EtMsmXhsM',
|
|
132
|
+
didKey: true
|
|
133
|
+
})
|
|
134
|
+
// recipient.controller ->
|
|
135
|
+
// 'did:key:z6LSeRSE5Em5oJpwdk3NBaLVERBS332ULC7EQq5EtMsmXhsM'
|
|
136
|
+
// recipient.id ->
|
|
137
|
+
// 'did:key:z6LSeRSE5Em5oJpwdk3NBaLVERBS332ULC7EQq5EtMsmXhsM#z6LSeRSE5Em5oJpwdk3NBaLVERBS332ULC7EQq5EtMsmXhsM'
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Multikey interop. `export()` is the default `X25519KeyAgreementKey2020`
|
|
141
|
+
serialization; `toMultikey()` is the opt-in Multikey form, and `from()` /
|
|
142
|
+
`fromMultikey()` import a Multikey-typed verification method (e.g. a
|
|
143
|
+
`keyAgreement` key from a DID document that uses Multikey):
|
|
144
|
+
|
|
145
|
+
```js
|
|
146
|
+
const multikey = keyPair.toMultikey({ secretKey: true });
|
|
147
|
+
// ->
|
|
148
|
+
{
|
|
149
|
+
"@context": "https://w3id.org/security/multikey/v1",
|
|
150
|
+
"id": "did:example:1234#z6LSeRSE5Em5oJpwdk3NBaLVERBS332ULC7EQq5EtMsmXhsM",
|
|
151
|
+
"controller": "did:example:1234",
|
|
152
|
+
"type": "Multikey",
|
|
153
|
+
"publicKeyMultibase": "z6LSeRSE5Em5oJpwdk3NBaLVERBS332ULC7EQq5EtMsmXhsM",
|
|
154
|
+
"secretKeyMultibase": "z3weeMD56C1T347EmB6kYNS7trpQwjvtQCpCYRpqGz6mcemT"
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const keyPair = await X25519KeyAgreementKey2020.from(multikey);
|
|
158
|
+
```
|
|
159
|
+
|
|
130
160
|
## Contribute
|
|
131
161
|
|
|
132
162
|
See
|
|
@@ -139,6 +169,6 @@ If editing the Readme, please conform to the
|
|
|
139
169
|
|
|
140
170
|
## License
|
|
141
171
|
|
|
142
|
-
-
|
|
143
|
-
- New BSD License (3-clause) © 2020-2021 Digital Bazaar - Initial
|
|
172
|
+
- New BSD License (3-clause) © 2020-2026 Digital Bazaar - Initial
|
|
144
173
|
implementation.
|
|
174
|
+
- Copyright 2026 Interop Alliance - TypeScript conversion.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2021-2022 Digital Bazaar, Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import { AbstractKeyPair, type GenerateKeyPairOptions, type IKeyAgreementKeyPair2020, type ISigner, type IVerificationKeyPair2020, type IVerificationResult, type IVerifier } from '@interop/data-integrity-core';
|
|
4
|
+
import { AbstractKeyPair, type GenerateKeyPairOptions, type IKeyAgreementKeyPair2020, type IMultikeyDocument, type IMultikeyPair, type IPublicMultikey, type ISigner, type IVerificationKeyPair2020, type IVerificationResult, type IVerifier } from '@interop/data-integrity-core';
|
|
5
5
|
/**
|
|
6
6
|
* A source Ed25519 verification key (2020) shape, used by the
|
|
7
7
|
* `fromEd25519VerificationKey2020` conversion method.
|
|
@@ -43,13 +43,40 @@ export declare class X25519KeyAgreementKey2020 extends AbstractKeyPair {
|
|
|
43
43
|
* (constructor method).
|
|
44
44
|
*
|
|
45
45
|
* @param {object} [options={}] - Keypair options (see controller docstring).
|
|
46
|
+
* @param {boolean} [options.didKey=false] - When the source has neither a
|
|
47
|
+
* `controller` nor an `id`, default its `controller` to the key's own
|
|
48
|
+
* `did:key` form (`did:key:<publicKeyMultibase>`), so the constructor
|
|
49
|
+
* derives a self-contained `did:key:<mb>#<mb>` `id`. Ignored when a
|
|
50
|
+
* `controller` or `id` is already present.
|
|
46
51
|
*
|
|
47
52
|
* @returns {X25519KeyAgreementKey2020} An X25519 Key Pair.
|
|
48
53
|
*/
|
|
49
|
-
static from(options?: IKeyAgreementKeyPair2020 & {
|
|
54
|
+
static from(options?: (IKeyAgreementKeyPair2020 | IMultikeyDocument) & {
|
|
50
55
|
publicKeyBase58?: string;
|
|
51
56
|
privateKeyBase58?: string;
|
|
57
|
+
didKey?: boolean;
|
|
52
58
|
}): Promise<X25519KeyAgreementKey2020>;
|
|
59
|
+
/**
|
|
60
|
+
* Creates a key pair instance from a Multikey verification method. For X25519
|
|
61
|
+
* the Multikey `publicKeyMultibase`/`secretKeyMultibase` use the same
|
|
62
|
+
* multicodec headers as this suite's `publicKeyMultibase`/
|
|
63
|
+
* `privateKeyMultibase` (x25519-pub / x25519-priv), and an X25519 secret is
|
|
64
|
+
* always 32 bytes, so the mapping is a field rename -- there is no
|
|
65
|
+
* key-length reconstruction step (unlike Ed25519). The returned instance is
|
|
66
|
+
* an `X25519KeyAgreementKey2020`; use {@link toMultikey} to round-trip back.
|
|
67
|
+
*
|
|
68
|
+
* @see https://www.w3.org/TR/cid-1.0/#Multikey
|
|
69
|
+
*
|
|
70
|
+
* @param {object} options - A Multikey-typed key document.
|
|
71
|
+
* @param {string} [options.id] - Verification method id.
|
|
72
|
+
* @param {string} [options.controller] - Controller DID or document url.
|
|
73
|
+
* @param {string} options.publicKeyMultibase - Multibase encoded public key.
|
|
74
|
+
* @param {string} [options.secretKeyMultibase] - Multibase encoded secret key.
|
|
75
|
+
* @param {string} [options.revoked] - Revocation timestamp (RFC3339).
|
|
76
|
+
*
|
|
77
|
+
* @returns {X25519KeyAgreementKey2020} An X25519 Key Pair.
|
|
78
|
+
*/
|
|
79
|
+
static fromMultikey(options: IMultikeyDocument): X25519KeyAgreementKey2020;
|
|
53
80
|
/**
|
|
54
81
|
* Creates an X25519KeyAgreementKey2020 Key Pair from an existing 2019 key
|
|
55
82
|
* (backwards compatibility method).
|
|
@@ -116,6 +143,31 @@ export declare class X25519KeyAgreementKey2020 extends AbstractKeyPair {
|
|
|
116
143
|
privateKey?: boolean;
|
|
117
144
|
includeContext?: boolean;
|
|
118
145
|
}): Promise<IVerificationKeyPair2020>;
|
|
146
|
+
/**
|
|
147
|
+
* Serializes this key pair as a Multikey verification method (opt-in;
|
|
148
|
+
* `export()` remains the default `X25519KeyAgreementKey2020` serialization).
|
|
149
|
+
* `publicKeyMultibase` is always emitted; the X25519 secret carries the same
|
|
150
|
+
* multicodec header in both forms, so `secretKeyMultibase` is the suite
|
|
151
|
+
* `privateKeyMultibase` verbatim.
|
|
152
|
+
*
|
|
153
|
+
* @see https://www.w3.org/TR/cid-1.0/#Multikey
|
|
154
|
+
*
|
|
155
|
+
* @param {object} [options={}] - Options hashmap.
|
|
156
|
+
* @param {boolean} [options.secretKey=false] - Export secret key material too?
|
|
157
|
+
* @param {boolean} [options.includeContext=true] - Include the Multikey
|
|
158
|
+
* JSON-LD context?
|
|
159
|
+
*
|
|
160
|
+
* @returns {IMultikeyDocument} `IPublicMultikey` (default) or `IMultikeyPair`
|
|
161
|
+
* (when `secretKey: true`).
|
|
162
|
+
*/
|
|
163
|
+
toMultikey(options: {
|
|
164
|
+
secretKey: true;
|
|
165
|
+
includeContext?: boolean;
|
|
166
|
+
}): IMultikeyPair;
|
|
167
|
+
toMultikey(options?: {
|
|
168
|
+
secretKey?: false;
|
|
169
|
+
includeContext?: boolean;
|
|
170
|
+
}): IPublicMultikey;
|
|
119
171
|
/**
|
|
120
172
|
* Generates and returns a base58btc multibase encoded value of a multicodec
|
|
121
173
|
* X25519 public key fingerprint (for use with cryptonyms, for example).
|
|
@@ -136,12 +188,17 @@ export declare class X25519KeyAgreementKey2020 extends AbstractKeyPair {
|
|
|
136
188
|
*
|
|
137
189
|
* @param {object} [options={}] - Options hashmap.
|
|
138
190
|
* @param {string} options.fingerprint - Public key fingerprint.
|
|
191
|
+
* @param {boolean} [options.didKey=false] - Give the resulting key a
|
|
192
|
+
* `did:key` identity: set its `controller` to `did:key:<fingerprint>`, so
|
|
193
|
+
* its `id` is the self-contained `did:key:<fingerprint>#<fingerprint>`. Off
|
|
194
|
+
* by default, so the key has no `controller`/`id` unless requested.
|
|
139
195
|
*
|
|
140
196
|
* @returns {X25519KeyAgreementKey2020} Key pair instance (public key material
|
|
141
197
|
* only) created from the fingerprint.
|
|
142
198
|
*/
|
|
143
|
-
static fromFingerprint({ fingerprint }?: {
|
|
199
|
+
static fromFingerprint({ fingerprint, didKey }?: {
|
|
144
200
|
fingerprint?: string;
|
|
201
|
+
didKey?: boolean;
|
|
145
202
|
}): X25519KeyAgreementKey2020;
|
|
146
203
|
/**
|
|
147
204
|
* Derives a shared secret via a given public key, typically for use
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"X25519KeyAgreementKey2020.d.ts","sourceRoot":"","sources":["../src/X25519KeyAgreementKey2020.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,eAAe,EACf,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,OAAO,EACZ,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACf,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"X25519KeyAgreementKey2020.d.ts","sourceRoot":"","sources":["../src/X25519KeyAgreementKey2020.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,eAAe,EACf,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACf,MAAM,8BAA8B,CAAA;AAuBrC;;;GAGG;AACH,UAAU,8BAA8B;IACtC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,qBAAa,yBAA0B,SAAQ,eAAe;IAE5D,MAAM,CAAC,KAAK,EAAE,MAAM,CAAW;IAE/B,MAAM,CAAC,aAAa,EAAE,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tB"}
|
|
@@ -16,6 +16,7 @@ const MULTICODEC_ED25519_PRIV_HEADER = new Uint8Array([0x80, 0x26]);
|
|
|
16
16
|
const MULTICODEC_X25519_PUB_HEADER = new Uint8Array([0xec, 0x01]);
|
|
17
17
|
// multicodec x25519-priv header as varint
|
|
18
18
|
const MULTICODEC_X25519_PRIV_HEADER = new Uint8Array([0x82, 0x26]);
|
|
19
|
+
const MULTIKEY_CONTEXT_V1_URL = 'https://w3id.org/security/multikey/v1';
|
|
19
20
|
export class X25519KeyAgreementKey2020 extends AbstractKeyPair {
|
|
20
21
|
// Used by CryptoLD harness for dispatching.
|
|
21
22
|
static suite = SUITE_ID;
|
|
@@ -79,16 +80,73 @@ export class X25519KeyAgreementKey2020 extends AbstractKeyPair {
|
|
|
79
80
|
* (constructor method).
|
|
80
81
|
*
|
|
81
82
|
* @param {object} [options={}] - Keypair options (see controller docstring).
|
|
83
|
+
* @param {boolean} [options.didKey=false] - When the source has neither a
|
|
84
|
+
* `controller` nor an `id`, default its `controller` to the key's own
|
|
85
|
+
* `did:key` form (`did:key:<publicKeyMultibase>`), so the constructor
|
|
86
|
+
* derives a self-contained `did:key:<mb>#<mb>` `id`. Ignored when a
|
|
87
|
+
* `controller` or `id` is already present.
|
|
82
88
|
*
|
|
83
89
|
* @returns {X25519KeyAgreementKey2020} An X25519 Key Pair.
|
|
84
90
|
*/
|
|
85
91
|
static async from(options = {}) {
|
|
92
|
+
const { didKey = false, ...keyPairOptions } = options;
|
|
93
|
+
// A Multikey-typed verification method (e.g. from a did:key/did:web doc).
|
|
94
|
+
if (keyPairOptions.type === 'Multikey') {
|
|
95
|
+
return this.fromMultikey(keyPairOptions);
|
|
96
|
+
}
|
|
86
97
|
// Check to see if this is an X25519KeyAgreementKey2019
|
|
87
|
-
if (
|
|
98
|
+
if (keyPairOptions.publicKeyBase58) {
|
|
88
99
|
// Convert it to a 2020 key pair instance
|
|
89
|
-
return this.fromX25519KeyAgreementKey2019(
|
|
100
|
+
return this.fromX25519KeyAgreementKey2019(keyPairOptions);
|
|
101
|
+
}
|
|
102
|
+
if (didKey && !keyPairOptions.controller && !keyPairOptions.id) {
|
|
103
|
+
keyPairOptions.controller = `did:key:${keyPairOptions.publicKeyMultibase}`;
|
|
104
|
+
}
|
|
105
|
+
return new X25519KeyAgreementKey2020(keyPairOptions);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Creates a key pair instance from a Multikey verification method. For X25519
|
|
109
|
+
* the Multikey `publicKeyMultibase`/`secretKeyMultibase` use the same
|
|
110
|
+
* multicodec headers as this suite's `publicKeyMultibase`/
|
|
111
|
+
* `privateKeyMultibase` (x25519-pub / x25519-priv), and an X25519 secret is
|
|
112
|
+
* always 32 bytes, so the mapping is a field rename -- there is no
|
|
113
|
+
* key-length reconstruction step (unlike Ed25519). The returned instance is
|
|
114
|
+
* an `X25519KeyAgreementKey2020`; use {@link toMultikey} to round-trip back.
|
|
115
|
+
*
|
|
116
|
+
* @see https://www.w3.org/TR/cid-1.0/#Multikey
|
|
117
|
+
*
|
|
118
|
+
* @param {object} options - A Multikey-typed key document.
|
|
119
|
+
* @param {string} [options.id] - Verification method id.
|
|
120
|
+
* @param {string} [options.controller] - Controller DID or document url.
|
|
121
|
+
* @param {string} options.publicKeyMultibase - Multibase encoded public key.
|
|
122
|
+
* @param {string} [options.secretKeyMultibase] - Multibase encoded secret key.
|
|
123
|
+
* @param {string} [options.revoked] - Revocation timestamp (RFC3339).
|
|
124
|
+
*
|
|
125
|
+
* @returns {X25519KeyAgreementKey2020} An X25519 Key Pair.
|
|
126
|
+
*/
|
|
127
|
+
static fromMultikey(options) {
|
|
128
|
+
const { id, controller, publicKeyMultibase, revoked } = options;
|
|
129
|
+
if (!_isValidKeyHeader(publicKeyMultibase, MULTICODEC_X25519_PUB_HEADER)) {
|
|
130
|
+
throw new TypeError('"publicKeyMultibase" has invalid header bytes: ' +
|
|
131
|
+
`"${publicKeyMultibase}".`);
|
|
132
|
+
}
|
|
133
|
+
let privateKeyMultibase;
|
|
134
|
+
if ('secretKeyMultibase' in options) {
|
|
135
|
+
const { secretKeyMultibase } = options;
|
|
136
|
+
if (!_isValidKeyHeader(secretKeyMultibase, MULTICODEC_X25519_PRIV_HEADER)) {
|
|
137
|
+
throw new Error('"secretKeyMultibase" has invalid header bytes.');
|
|
138
|
+
}
|
|
139
|
+
// Same multicodec header and 32-byte length in both serializations, so
|
|
140
|
+
// the Multikey secret is this suite's private key verbatim.
|
|
141
|
+
privateKeyMultibase = secretKeyMultibase;
|
|
90
142
|
}
|
|
91
|
-
return new X25519KeyAgreementKey2020(
|
|
143
|
+
return new X25519KeyAgreementKey2020({
|
|
144
|
+
id,
|
|
145
|
+
controller,
|
|
146
|
+
revoked,
|
|
147
|
+
publicKeyMultibase,
|
|
148
|
+
privateKeyMultibase
|
|
149
|
+
});
|
|
92
150
|
}
|
|
93
151
|
/**
|
|
94
152
|
* Creates an X25519KeyAgreementKey2020 Key Pair from an existing 2019 key
|
|
@@ -231,6 +289,31 @@ export class X25519KeyAgreementKey2020 extends AbstractKeyPair {
|
|
|
231
289
|
}
|
|
232
290
|
return exportedKey;
|
|
233
291
|
}
|
|
292
|
+
toMultikey({ secretKey = false, includeContext = true } = {}) {
|
|
293
|
+
const publicShape = {
|
|
294
|
+
type: 'Multikey',
|
|
295
|
+
publicKeyMultibase: this.publicKeyMultibase
|
|
296
|
+
};
|
|
297
|
+
if (this.id != null) {
|
|
298
|
+
publicShape.id = this.id;
|
|
299
|
+
}
|
|
300
|
+
if (includeContext) {
|
|
301
|
+
publicShape['@context'] = MULTIKEY_CONTEXT_V1_URL;
|
|
302
|
+
}
|
|
303
|
+
if (this.controller) {
|
|
304
|
+
publicShape.controller = this.controller;
|
|
305
|
+
}
|
|
306
|
+
if (this.revoked) {
|
|
307
|
+
publicShape.revoked = this.revoked;
|
|
308
|
+
}
|
|
309
|
+
if (secretKey && this.privateKeyMultibase) {
|
|
310
|
+
return {
|
|
311
|
+
...publicShape,
|
|
312
|
+
secretKeyMultibase: this.privateKeyMultibase
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
return publicShape;
|
|
316
|
+
}
|
|
234
317
|
/**
|
|
235
318
|
* Generates and returns a base58btc multibase encoded value of a multicodec
|
|
236
319
|
* X25519 public key fingerprint (for use with cryptonyms, for example).
|
|
@@ -254,12 +337,17 @@ export class X25519KeyAgreementKey2020 extends AbstractKeyPair {
|
|
|
254
337
|
*
|
|
255
338
|
* @param {object} [options={}] - Options hashmap.
|
|
256
339
|
* @param {string} options.fingerprint - Public key fingerprint.
|
|
340
|
+
* @param {boolean} [options.didKey=false] - Give the resulting key a
|
|
341
|
+
* `did:key` identity: set its `controller` to `did:key:<fingerprint>`, so
|
|
342
|
+
* its `id` is the self-contained `did:key:<fingerprint>#<fingerprint>`. Off
|
|
343
|
+
* by default, so the key has no `controller`/`id` unless requested.
|
|
257
344
|
*
|
|
258
345
|
* @returns {X25519KeyAgreementKey2020} Key pair instance (public key material
|
|
259
346
|
* only) created from the fingerprint.
|
|
260
347
|
*/
|
|
261
|
-
static fromFingerprint({ fingerprint } = {}) {
|
|
348
|
+
static fromFingerprint({ fingerprint, didKey = false } = {}) {
|
|
262
349
|
return new X25519KeyAgreementKey2020({
|
|
350
|
+
controller: didKey ? `did:key:${fingerprint}` : undefined,
|
|
263
351
|
publicKeyMultibase: fingerprint
|
|
264
352
|
});
|
|
265
353
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"X25519KeyAgreementKey2020.js","sourceRoot":"","sources":["../src/X25519KeyAgreementKey2020.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,eAAe,
|
|
1
|
+
{"version":3,"file":"X25519KeyAgreementKey2020.js","sourceRoot":"","sources":["../src/X25519KeyAgreementKey2020.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,eAAe,EAUhB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,0BA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OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IAEjC,OAAO,0BAA0B,GAAG,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;AAC/D,CAAC;AAED;;;;;;GAMG;AACH,SAAS,gBAAgB,CAAC,MAAkB,EAAE,IAAY;IACxD,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;IAEhD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC;QAClD,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;IACnE,CAAC;IAED,OAAO,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AACrC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interop/x25519-key-agreement-key",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "An X25519 (Curve25519) DH (Diffie-Hellman) key implementation to work with the X25519 2020 Crypto suite.",
|
|
5
5
|
"homepage": "https://github.com/interop-alliance/x25519-key-agreement-key",
|
|
6
6
|
"repository": {
|