@signalapp/libsignal-client 0.41.2 → 0.42.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/Native.d.ts +17 -16
- package/dist/acknowledgments.md +72 -68
- package/dist/zkgroup/auth/ClientZkAuthOperations.d.ts +0 -5
- package/dist/zkgroup/auth/ClientZkAuthOperations.js +0 -11
- package/dist/zkgroup/auth/ServerZkAuthOperations.d.ts +0 -3
- package/dist/zkgroup/auth/ServerZkAuthOperations.js +0 -8
- package/dist/zkgroup/groupsend/GroupSendDerivedKeyPair.d.ts +23 -0
- package/dist/zkgroup/groupsend/GroupSendDerivedKeyPair.js +34 -0
- package/dist/zkgroup/groupsend/GroupSendEndorsement.d.ts +68 -0
- package/dist/zkgroup/groupsend/GroupSendEndorsement.js +84 -0
- package/dist/zkgroup/groupsend/GroupSendEndorsementsResponse.d.ts +73 -0
- package/dist/zkgroup/groupsend/GroupSendEndorsementsResponse.js +102 -0
- package/dist/zkgroup/groupsend/GroupSendFullToken.d.ts +23 -0
- package/dist/zkgroup/groupsend/GroupSendFullToken.js +36 -0
- package/dist/zkgroup/groupsend/GroupSendToken.d.ts +22 -0
- package/dist/zkgroup/groupsend/GroupSendToken.js +34 -0
- package/dist/zkgroup/index.d.ts +5 -5
- package/dist/zkgroup/index.js +12 -12
- package/dist/zkgroup/internal/ByteArray.d.ts +2 -1
- package/dist/zkgroup/internal/ByteArray.js +9 -2
- package/package.json +2 -1
- package/prebuilds/darwin-arm64/node.napi.node +0 -0
- package/prebuilds/darwin-x64/node.napi.node +0 -0
- package/prebuilds/linux-arm64/node.napi.node +0 -0
- package/prebuilds/linux-x64/node.napi.node +0 -0
- package/prebuilds/win32-arm64/node.napi.node +0 -0
- package/prebuilds/win32-x64/node.napi.node +0 -0
- package/dist/zkgroup/auth/AuthCredential.d.ts +0 -6
- package/dist/zkgroup/auth/AuthCredential.js +0 -15
- package/dist/zkgroup/auth/AuthCredentialResponse.d.ts +0 -6
- package/dist/zkgroup/auth/AuthCredentialResponse.js +0 -15
- package/dist/zkgroup/groupsend/GroupSendCredential.d.ts +0 -30
- package/dist/zkgroup/groupsend/GroupSendCredential.js +0 -45
- package/dist/zkgroup/groupsend/GroupSendCredentialPresentation.d.ts +0 -24
- package/dist/zkgroup/groupsend/GroupSendCredentialPresentation.js +0 -34
- package/dist/zkgroup/groupsend/GroupSendCredentialResponse.d.ts +0 -67
- package/dist/zkgroup/groupsend/GroupSendCredentialResponse.js +0 -87
package/Native.d.ts
CHANGED
|
@@ -135,10 +135,8 @@ export function AuthCredentialPresentation_CheckValidContents(presentationBytes:
|
|
|
135
135
|
export function AuthCredentialPresentation_GetPniCiphertext(presentationBytes: Buffer): Buffer | null;
|
|
136
136
|
export function AuthCredentialPresentation_GetRedemptionTime(presentationBytes: Buffer): Timestamp;
|
|
137
137
|
export function AuthCredentialPresentation_GetUuidCiphertext(presentationBytes: Buffer): Serialized<UuidCiphertext>;
|
|
138
|
-
export function AuthCredentialResponse_CheckValidContents(buffer: Buffer): void;
|
|
139
138
|
export function AuthCredentialWithPniResponse_CheckValidContents(bytes: Buffer): void;
|
|
140
139
|
export function AuthCredentialWithPni_CheckValidContents(bytes: Buffer): void;
|
|
141
|
-
export function AuthCredential_CheckValidContents(buffer: Buffer): void;
|
|
142
140
|
export function BackupAuthCredentialPresentation_CheckValidContents(presentationBytes: Buffer): void;
|
|
143
141
|
export function BackupAuthCredentialPresentation_Verify(presentationBytes: Buffer, now: Timestamp, serverParamsBytes: Buffer): void;
|
|
144
142
|
export function BackupAuthCredentialRequestContext_CheckValidContents(contextBytes: Buffer): void;
|
|
@@ -222,15 +220,22 @@ export function GroupSecretParams_EncryptServiceId(params: Serialized<GroupSecre
|
|
|
222
220
|
export function GroupSecretParams_GenerateDeterministic(randomness: Buffer): Serialized<GroupSecretParams>;
|
|
223
221
|
export function GroupSecretParams_GetMasterKey(params: Serialized<GroupSecretParams>): Serialized<GroupMasterKey>;
|
|
224
222
|
export function GroupSecretParams_GetPublicParams(params: Serialized<GroupSecretParams>): Serialized<GroupPublicParams>;
|
|
225
|
-
export function
|
|
226
|
-
export function
|
|
227
|
-
export function
|
|
228
|
-
export function
|
|
229
|
-
export function
|
|
230
|
-
export function
|
|
231
|
-
export function
|
|
232
|
-
export function
|
|
233
|
-
export function
|
|
223
|
+
export function GroupSendDerivedKeyPair_CheckValidContents(bytes: Buffer): void;
|
|
224
|
+
export function GroupSendDerivedKeyPair_ForExpiration(expiration: Timestamp, serverParams: Serialized<ServerSecretParams>): Buffer;
|
|
225
|
+
export function GroupSendEndorsement_CheckValidContents(bytes: Buffer): void;
|
|
226
|
+
export function GroupSendEndorsement_Combine(endorsements: Buffer[]): Buffer;
|
|
227
|
+
export function GroupSendEndorsement_Remove(endorsement: Buffer, toRemove: Buffer): Buffer;
|
|
228
|
+
export function GroupSendEndorsement_ToToken(endorsement: Buffer, groupParams: Serialized<GroupSecretParams>): Buffer;
|
|
229
|
+
export function GroupSendEndorsementsResponse_CheckValidContents(bytes: Buffer): void;
|
|
230
|
+
export function GroupSendEndorsementsResponse_GetExpiration(responseBytes: Buffer): Timestamp;
|
|
231
|
+
export function GroupSendEndorsementsResponse_IssueDeterministic(concatenatedGroupMemberCiphertexts: Buffer, keyPair: Buffer, randomness: Buffer): Buffer;
|
|
232
|
+
export function GroupSendEndorsementsResponse_ReceiveAndCombineWithCiphertexts(responseBytes: Buffer, concatenatedGroupMemberCiphertexts: Buffer, localUserCiphertext: Buffer, now: Timestamp, serverParams: Serialized<ServerPublicParams>): Buffer[];
|
|
233
|
+
export function GroupSendEndorsementsResponse_ReceiveAndCombineWithServiceIds(responseBytes: Buffer, groupMembers: Buffer, localUser: Buffer, now: Timestamp, groupParams: Serialized<GroupSecretParams>, serverParams: Serialized<ServerPublicParams>): Buffer[];
|
|
234
|
+
export function GroupSendFullToken_CheckValidContents(bytes: Buffer): void;
|
|
235
|
+
export function GroupSendFullToken_GetExpiration(token: Buffer): Timestamp;
|
|
236
|
+
export function GroupSendFullToken_Verify(token: Buffer, userIds: Buffer, now: Timestamp, keyPair: Buffer): void;
|
|
237
|
+
export function GroupSendToken_CheckValidContents(bytes: Buffer): void;
|
|
238
|
+
export function GroupSendToken_ToFullToken(token: Buffer, expiration: Timestamp): Buffer;
|
|
234
239
|
export function HKDF_DeriveSecrets(outputLength: number, ikm: Buffer, label: Buffer | null, salt: Buffer | null): Buffer;
|
|
235
240
|
export function HsmEnclaveClient_CompleteHandshake(cli: Wrapper<HsmEnclaveClient>, handshakeReceived: Buffer): void;
|
|
236
241
|
export function HsmEnclaveClient_EstablishedRecv(cli: Wrapper<HsmEnclaveClient>, receivedCiphertext: Buffer): Buffer;
|
|
@@ -394,13 +399,11 @@ export function ServerCertificate_GetSerialized(obj: Wrapper<ServerCertificate>)
|
|
|
394
399
|
export function ServerCertificate_GetSignature(obj: Wrapper<ServerCertificate>): Buffer;
|
|
395
400
|
export function ServerCertificate_New(keyId: number, serverKey: Wrapper<PublicKey>, trustRoot: Wrapper<PrivateKey>): ServerCertificate;
|
|
396
401
|
export function ServerPublicParams_CheckValidContents(buffer: Buffer): void;
|
|
397
|
-
export function ServerPublicParams_CreateAuthCredentialPresentationDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, groupSecretParams: Serialized<GroupSecretParams>, authCredential: Serialized<AuthCredential>): Buffer;
|
|
398
402
|
export function ServerPublicParams_CreateAuthCredentialWithPniPresentationDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, groupSecretParams: Serialized<GroupSecretParams>, authCredentialWithPniBytes: Buffer): Buffer;
|
|
399
403
|
export function ServerPublicParams_CreateExpiringProfileKeyCredentialPresentationDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, groupSecretParams: Serialized<GroupSecretParams>, profileKeyCredential: Serialized<ExpiringProfileKeyCredential>): Buffer;
|
|
400
404
|
export function ServerPublicParams_CreateProfileKeyCredentialRequestContextDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, userId: Buffer, profileKey: Serialized<ProfileKey>): Serialized<ProfileKeyCredentialRequestContext>;
|
|
401
405
|
export function ServerPublicParams_CreateReceiptCredentialPresentationDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, receiptCredential: Serialized<ReceiptCredential>): Serialized<ReceiptCredentialPresentation>;
|
|
402
406
|
export function ServerPublicParams_CreateReceiptCredentialRequestContextDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, receiptSerial: Buffer): Serialized<ReceiptCredentialRequestContext>;
|
|
403
|
-
export function ServerPublicParams_ReceiveAuthCredential(params: Serialized<ServerPublicParams>, aci: Buffer, redemptionTime: number, response: Serialized<AuthCredentialResponse>): Serialized<AuthCredential>;
|
|
404
407
|
export function ServerPublicParams_ReceiveAuthCredentialWithPniAsAci(params: Serialized<ServerPublicParams>, aci: Buffer, pni: Buffer, redemptionTime: Timestamp, authCredentialWithPniResponseBytes: Buffer): Buffer;
|
|
405
408
|
export function ServerPublicParams_ReceiveAuthCredentialWithPniAsServiceId(params: Serialized<ServerPublicParams>, aci: Buffer, pni: Buffer, redemptionTime: Timestamp, authCredentialWithPniResponseBytes: Buffer): Buffer;
|
|
406
409
|
export function ServerPublicParams_ReceiveExpiringProfileKeyCredential(serverPublicParams: Serialized<ServerPublicParams>, requestContext: Serialized<ProfileKeyCredentialRequestContext>, response: Serialized<ExpiringProfileKeyCredentialResponse>, currentTimeInSeconds: Timestamp): Serialized<ExpiringProfileKeyCredential>;
|
|
@@ -409,7 +412,6 @@ export function ServerPublicParams_VerifySignature(serverPublicParams: Serialize
|
|
|
409
412
|
export function ServerSecretParams_CheckValidContents(buffer: Buffer): void;
|
|
410
413
|
export function ServerSecretParams_GenerateDeterministic(randomness: Buffer): Serialized<ServerSecretParams>;
|
|
411
414
|
export function ServerSecretParams_GetPublicParams(params: Serialized<ServerSecretParams>): Serialized<ServerPublicParams>;
|
|
412
|
-
export function ServerSecretParams_IssueAuthCredentialDeterministic(serverSecretParams: Serialized<ServerSecretParams>, randomness: Buffer, aci: Buffer, redemptionTime: number): Serialized<AuthCredentialResponse>;
|
|
413
415
|
export function ServerSecretParams_IssueAuthCredentialWithPniAsAciDeterministic(serverSecretParams: Serialized<ServerSecretParams>, randomness: Buffer, aci: Buffer, pni: Buffer, redemptionTime: Timestamp): Buffer;
|
|
414
416
|
export function ServerSecretParams_IssueAuthCredentialWithPniAsServiceIdDeterministic(serverSecretParams: Serialized<ServerSecretParams>, randomness: Buffer, aci: Buffer, pni: Buffer, redemptionTime: Timestamp): Buffer;
|
|
415
417
|
export function ServerSecretParams_IssueAuthCredentialWithPniZkcDeterministic(serverSecretParams: Serialized<ServerSecretParams>, randomness: Buffer, aci: Buffer, pni: Buffer, redemptionTime: Timestamp): Buffer;
|
|
@@ -490,6 +492,7 @@ export function TESTING_PanicOnLoadSync(_needsCleanup: null, _input: null): void
|
|
|
490
492
|
export function TESTING_PanicOnReturnAsync(_needsCleanup: null): Promise<null>;
|
|
491
493
|
export function TESTING_PanicOnReturnIo(asyncRuntime: Wrapper<NonSuspendingBackgroundThreadRuntime>, _needsCleanup: null): Promise<null>;
|
|
492
494
|
export function TESTING_PanicOnReturnSync(_needsCleanup: null): null;
|
|
495
|
+
export function TESTING_ProcessBytestringArray(input: Buffer[]): Buffer[];
|
|
493
496
|
export function TESTING_ReturnStringArray(): string[];
|
|
494
497
|
export function TESTING_TestingHandleType_getValue(handle: Wrapper<TestingHandleType>): number;
|
|
495
498
|
export function TokioAsyncContext_new(): TokioAsyncContext;
|
|
@@ -515,8 +518,6 @@ export function ValidatingMac_Update(mac: Wrapper<ValidatingMac>, bytes: Buffer,
|
|
|
515
518
|
export function WebpSanitizer_Sanitize(input: SyncInputStream): void;
|
|
516
519
|
export function initLogger(maxLevel: LogLevel, callback: (level: LogLevel, target: string, file: string | null, line: number | null, message: string) => void): void
|
|
517
520
|
interface Aes256GcmSiv { readonly __type: unique symbol; }
|
|
518
|
-
interface AuthCredential { readonly __type: unique symbol; }
|
|
519
|
-
interface AuthCredentialResponse { readonly __type: unique symbol; }
|
|
520
521
|
interface CdsiLookup { readonly __type: unique symbol; }
|
|
521
522
|
interface Chat { readonly __type: unique symbol; }
|
|
522
523
|
interface CiphertextMessage { readonly __type: unique symbol; }
|
package/dist/acknowledgments.md
CHANGED
|
@@ -669,7 +669,7 @@ For more information on this, and how to apply and follow the GNU AGPL, see
|
|
|
669
669
|
|
|
670
670
|
```
|
|
671
671
|
|
|
672
|
-
## attest 0.1.0, device-transfer 0.1.0, libsignal-bridge 0.1.0, libsignal-bridge-macros 0.1.0, libsignal-core 0.1.0, libsignal-ffi 0.
|
|
672
|
+
## attest 0.1.0, device-transfer 0.1.0, libsignal-bridge 0.1.0, libsignal-bridge-macros 0.1.0, libsignal-core 0.1.0, libsignal-ffi 0.42.0, libsignal-jni 0.42.0, libsignal-message-backup 0.1.0, libsignal-message-backup-macros 0.1.0, libsignal-net 0.1.0, libsignal-node 0.42.0, libsignal-protocol 0.1.0, libsignal-svr3 0.1.0, poksho 0.7.0, signal-crypto 0.1.0, signal-media 0.1.0, signal-neon-futures 0.1.0, signal-neon-futures-tests 0.1.0, signal-pin 0.1.0, usernames 0.1.0, zkcredential 0.1.0, zkgroup 0.9.0
|
|
673
673
|
|
|
674
674
|
```
|
|
675
675
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
|
@@ -1326,7 +1326,7 @@ You should also get your employer (if you work as a programmer) or school, if an
|
|
|
1326
1326
|
|
|
1327
1327
|
```
|
|
1328
1328
|
|
|
1329
|
-
## ciborium 0.2.
|
|
1329
|
+
## ciborium 0.2.2, ciborium-io 0.2.2, ciborium-ll 0.2.2
|
|
1330
1330
|
|
|
1331
1331
|
```
|
|
1332
1332
|
Apache License
|
|
@@ -1533,7 +1533,7 @@ You should also get your employer (if you work as a programmer) or school, if an
|
|
|
1533
1533
|
|
|
1534
1534
|
```
|
|
1535
1535
|
|
|
1536
|
-
## ryu 1.0.
|
|
1536
|
+
## ryu 1.0.17
|
|
1537
1537
|
|
|
1538
1538
|
```
|
|
1539
1539
|
Apache License
|
|
@@ -2150,7 +2150,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
2150
2150
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
2151
2151
|
```
|
|
2152
2152
|
|
|
2153
|
-
## x25519-dalek 2.0.
|
|
2153
|
+
## x25519-dalek 2.0.1
|
|
2154
2154
|
|
|
2155
2155
|
```
|
|
2156
2156
|
Copyright (c) 2017-2021 isis agora lovecruft. All rights reserved.
|
|
@@ -2185,7 +2185,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
2185
2185
|
|
|
2186
2186
|
```
|
|
2187
2187
|
|
|
2188
|
-
## asn1 0.
|
|
2188
|
+
## asn1 0.16.1, asn1_derive 0.16.1
|
|
2189
2189
|
|
|
2190
2190
|
```
|
|
2191
2191
|
Copyright (c) Alex Gaynor and individual contributors.
|
|
@@ -2395,7 +2395,7 @@ express Statement of Purpose.
|
|
|
2395
2395
|
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
|
|
2396
2396
|
```
|
|
2397
2397
|
|
|
2398
|
-
## libloading 0.8.
|
|
2398
|
+
## libloading 0.8.3
|
|
2399
2399
|
|
|
2400
2400
|
```
|
|
2401
2401
|
Copyright © 2015, Simonas Kazlauskas
|
|
@@ -2413,7 +2413,7 @@ THIS SOFTWARE.
|
|
|
2413
2413
|
|
|
2414
2414
|
```
|
|
2415
2415
|
|
|
2416
|
-
## windows-core 0.52.0, windows-sys 0.45.0, windows-sys 0.48.0, windows-sys 0.52.0, windows-targets 0.42.2, windows-targets 0.48.5, windows-targets 0.52.
|
|
2416
|
+
## windows-core 0.52.0, windows-sys 0.45.0, windows-sys 0.48.0, windows-sys 0.52.0, windows-targets 0.42.2, windows-targets 0.48.5, windows-targets 0.52.4, windows_aarch64_msvc 0.42.2, windows_aarch64_msvc 0.48.5, windows_aarch64_msvc 0.52.4, windows_x86_64_gnu 0.48.5, windows_x86_64_gnu 0.52.4, windows_x86_64_msvc 0.42.2, windows_x86_64_msvc 0.48.5, windows_x86_64_msvc 0.52.4
|
|
2417
2417
|
|
|
2418
2418
|
```
|
|
2419
2419
|
MIT License
|
|
@@ -2504,7 +2504,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
2504
2504
|
|
|
2505
2505
|
```
|
|
2506
2506
|
|
|
2507
|
-
## lazy_static 1.4.0, rayon 1.
|
|
2507
|
+
## lazy_static 1.4.0, rayon 1.9.0, rayon-core 1.12.1
|
|
2508
2508
|
|
|
2509
2509
|
```
|
|
2510
2510
|
Copyright (c) 2010 The Rust Project Developers
|
|
@@ -2654,7 +2654,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
2654
2654
|
|
|
2655
2655
|
```
|
|
2656
2656
|
|
|
2657
|
-
## backtrace 0.3.69, cc 1.0.
|
|
2657
|
+
## backtrace 0.3.69, cc 1.0.90, cfg-if 1.0.0, cmake 0.1.48, flate2 1.0.28, openssl-probe 0.1.5, rustc-demangle 0.1.23, socket2 0.5.6
|
|
2658
2658
|
|
|
2659
2659
|
```
|
|
2660
2660
|
Copyright (c) 2014 Alex Crichton
|
|
@@ -2717,7 +2717,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
2717
2717
|
|
|
2718
2718
|
```
|
|
2719
2719
|
|
|
2720
|
-
## jobserver 0.1.
|
|
2720
|
+
## jobserver 0.1.28
|
|
2721
2721
|
|
|
2722
2722
|
```
|
|
2723
2723
|
Copyright (c) 2014 Alex Crichton
|
|
@@ -2748,7 +2748,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
2748
2748
|
|
|
2749
2749
|
```
|
|
2750
2750
|
|
|
2751
|
-
## mio 0.8.
|
|
2751
|
+
## mio 0.8.11
|
|
2752
2752
|
|
|
2753
2753
|
```
|
|
2754
2754
|
Copyright (c) 2014 Carl Lerche and other MIO contributors
|
|
@@ -2805,7 +2805,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
2805
2805
|
|
|
2806
2806
|
```
|
|
2807
2807
|
|
|
2808
|
-
## bitflags 1.3.2, bitflags 2.4.2, glob 0.3.1, log 0.4.
|
|
2808
|
+
## bitflags 1.3.2, bitflags 2.4.2, glob 0.3.1, log 0.4.21, num-derive 0.4.2, num-integer 0.1.46, num-traits 0.2.18, range-map 0.2.0, regex 1.10.3, regex-automata 0.4.6, regex-syntax 0.8.2
|
|
2809
2809
|
|
|
2810
2810
|
```
|
|
2811
2811
|
Copyright (c) 2014 The Rust Project Developers
|
|
@@ -2894,7 +2894,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
2894
2894
|
|
|
2895
2895
|
```
|
|
2896
2896
|
|
|
2897
|
-
## libc 0.2.
|
|
2897
|
+
## libc 0.2.153
|
|
2898
2898
|
|
|
2899
2899
|
```
|
|
2900
2900
|
Copyright (c) 2014-2020 The Rust Project Developers
|
|
@@ -2925,7 +2925,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
2925
2925
|
|
|
2926
2926
|
```
|
|
2927
2927
|
|
|
2928
|
-
## hyper 1.
|
|
2928
|
+
## hyper 1.2.0
|
|
2929
2929
|
|
|
2930
2930
|
```
|
|
2931
2931
|
Copyright (c) 2014-2021 Sean McArthur
|
|
@@ -2950,7 +2950,7 @@ THE SOFTWARE.
|
|
|
2950
2950
|
|
|
2951
2951
|
```
|
|
2952
2952
|
|
|
2953
|
-
## either 1.
|
|
2953
|
+
## either 1.10.0, itertools 0.11.0, itertools 0.12.1, petgraph 0.6.4
|
|
2954
2954
|
|
|
2955
2955
|
```
|
|
2956
2956
|
Copyright (c) 2015
|
|
@@ -3007,7 +3007,7 @@ THE SOFTWARE.
|
|
|
3007
3007
|
|
|
3008
3008
|
```
|
|
3009
3009
|
|
|
3010
|
-
## neon-macros 1.0.0
|
|
3010
|
+
## neon 1.0.0, neon-macros 1.0.0
|
|
3011
3011
|
|
|
3012
3012
|
```
|
|
3013
3013
|
Copyright (c) 2015 David Herman
|
|
@@ -3057,7 +3057,7 @@ SOFTWARE.
|
|
|
3057
3057
|
|
|
3058
3058
|
```
|
|
3059
3059
|
|
|
3060
|
-
## tempfile 3.
|
|
3060
|
+
## tempfile 3.10.1
|
|
3061
3061
|
|
|
3062
3062
|
```
|
|
3063
3063
|
Copyright (c) 2015 Steven Allen
|
|
@@ -3119,7 +3119,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
3119
3119
|
|
|
3120
3120
|
```
|
|
3121
3121
|
|
|
3122
|
-
## gimli 0.28.1, heck 0.3.3, heck 0.4.1, peeking_take_while 0.1.2, unicode-bidi 0.3.15, unicode-normalization 0.1.
|
|
3122
|
+
## gimli 0.28.1, heck 0.3.3, heck 0.4.1, peeking_take_while 0.1.2, unicode-bidi 0.3.15, unicode-normalization 0.1.23, unicode-segmentation 1.11.0
|
|
3123
3123
|
|
|
3124
3124
|
```
|
|
3125
3125
|
Copyright (c) 2015 The Rust Project Developers
|
|
@@ -3746,7 +3746,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
3746
3746
|
|
|
3747
3747
|
```
|
|
3748
3748
|
|
|
3749
|
-
## indexmap 1.9.3, indexmap 2.
|
|
3749
|
+
## indexmap 1.9.3, indexmap 2.2.5
|
|
3750
3750
|
|
|
3751
3751
|
```
|
|
3752
3752
|
Copyright (c) 2016--2017
|
|
@@ -4128,7 +4128,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
4128
4128
|
|
|
4129
4129
|
```
|
|
4130
4130
|
|
|
4131
|
-
## http 1.
|
|
4131
|
+
## http 1.1.0
|
|
4132
4132
|
|
|
4133
4133
|
```
|
|
4134
4134
|
Copyright (c) 2017 http-rs authors
|
|
@@ -4190,7 +4190,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
4190
4190
|
|
|
4191
4191
|
```
|
|
4192
4192
|
|
|
4193
|
-
## aes 0.8.
|
|
4193
|
+
## aes 0.8.4
|
|
4194
4194
|
|
|
4195
4195
|
```
|
|
4196
4196
|
Copyright (c) 2018 Artyom Pavlov
|
|
@@ -4434,7 +4434,7 @@ THE SOFTWARE.
|
|
|
4434
4434
|
|
|
4435
4435
|
```
|
|
4436
4436
|
|
|
4437
|
-
## block-buffer 0.10.4, block-padding 0.3.3
|
|
4437
|
+
## block-buffer 0.10.4, block-padding 0.3.3
|
|
4438
4438
|
|
|
4439
4439
|
```
|
|
4440
4440
|
Copyright (c) 2018-2019 The RustCrypto Project Developers
|
|
@@ -4553,6 +4553,37 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
4553
4553
|
THE SOFTWARE.
|
|
4554
4554
|
|
|
4555
4555
|
|
|
4556
|
+
```
|
|
4557
|
+
|
|
4558
|
+
## opaque-debug 0.3.1
|
|
4559
|
+
|
|
4560
|
+
```
|
|
4561
|
+
Copyright (c) 2018-2024 The RustCrypto Project Developers
|
|
4562
|
+
|
|
4563
|
+
Permission is hereby granted, free of charge, to any
|
|
4564
|
+
person obtaining a copy of this software and associated
|
|
4565
|
+
documentation files (the "Software"), to deal in the
|
|
4566
|
+
Software without restriction, including without
|
|
4567
|
+
limitation the rights to use, copy, modify, merge,
|
|
4568
|
+
publish, distribute, sublicense, and/or sell copies of
|
|
4569
|
+
the Software, and to permit persons to whom the Software
|
|
4570
|
+
is furnished to do so, subject to the following
|
|
4571
|
+
conditions:
|
|
4572
|
+
|
|
4573
|
+
The above copyright notice and this permission notice
|
|
4574
|
+
shall be included in all copies or substantial portions
|
|
4575
|
+
of the Software.
|
|
4576
|
+
|
|
4577
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
|
4578
|
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
4579
|
+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
4580
|
+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
|
4581
|
+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
4582
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
4583
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
|
4584
|
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
4585
|
+
DEALINGS IN THE SOFTWARE.
|
|
4586
|
+
|
|
4556
4587
|
```
|
|
4557
4588
|
|
|
4558
4589
|
## getrandom 0.2.12
|
|
@@ -4618,7 +4649,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
4618
4649
|
|
|
4619
4650
|
```
|
|
4620
4651
|
|
|
4621
|
-
## http-body 1.0.0, http-body-util 0.1.
|
|
4652
|
+
## http-body 1.0.0, http-body-util 0.1.1
|
|
4622
4653
|
|
|
4623
4654
|
```
|
|
4624
4655
|
Copyright (c) 2019 Hyper Contributors
|
|
@@ -4649,7 +4680,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
4649
4680
|
|
|
4650
4681
|
```
|
|
4651
4682
|
|
|
4652
|
-
## ghash 0.5.
|
|
4683
|
+
## ghash 0.5.1
|
|
4653
4684
|
|
|
4654
4685
|
```
|
|
4655
4686
|
Copyright (c) 2019 RustCrypto Developers
|
|
@@ -4680,7 +4711,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
4680
4711
|
|
|
4681
4712
|
```
|
|
4682
4713
|
|
|
4683
|
-
## protobuf 3.
|
|
4714
|
+
## protobuf 3.4.0, protobuf-codegen 3.4.0, protobuf-json-mapping 3.4.0, protobuf-parse 3.4.0, protobuf-support 3.4.0
|
|
4684
4715
|
|
|
4685
4716
|
```
|
|
4686
4717
|
Copyright (c) 2019 Stepan Koltsov
|
|
@@ -4860,7 +4891,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
4860
4891
|
|
|
4861
4892
|
```
|
|
4862
4893
|
|
|
4863
|
-
## polyval 0.6.
|
|
4894
|
+
## polyval 0.6.2
|
|
4864
4895
|
|
|
4865
4896
|
```
|
|
4866
4897
|
Copyright (c) 2019-2023 RustCrypto Developers
|
|
@@ -4922,7 +4953,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
4922
4953
|
|
|
4923
4954
|
```
|
|
4924
4955
|
|
|
4925
|
-
## iana-time-zone 0.1.
|
|
4956
|
+
## iana-time-zone 0.1.60
|
|
4926
4957
|
|
|
4927
4958
|
```
|
|
4928
4959
|
Copyright (c) 2020 Andrew D. Straw
|
|
@@ -5197,7 +5228,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
5197
5228
|
|
|
5198
5229
|
```
|
|
5199
5230
|
|
|
5200
|
-
## anstyle 1.0.
|
|
5231
|
+
## anstyle 1.0.6
|
|
5201
5232
|
|
|
5202
5233
|
```
|
|
5203
5234
|
Copyright (c) 2022 The rust-cli Developers
|
|
@@ -5297,7 +5328,7 @@ SOFTWARE.
|
|
|
5297
5328
|
|
|
5298
5329
|
```
|
|
5299
5330
|
|
|
5300
|
-
## tokio 1.
|
|
5331
|
+
## tokio 1.36.0, tokio-macros 2.2.0, tokio-util 0.7.10
|
|
5301
5332
|
|
|
5302
5333
|
```
|
|
5303
5334
|
Copyright (c) 2023 Tokio Contributors
|
|
@@ -5353,7 +5384,7 @@ SOFTWARE.
|
|
|
5353
5384
|
|
|
5354
5385
|
```
|
|
5355
5386
|
|
|
5356
|
-
## anstream 0.6.
|
|
5387
|
+
## anstream 0.6.13, anstyle-query 1.0.2, clap 4.4.18, colorchoice 1.0.0, toml_datetime 0.6.5, toml_edit 0.19.15
|
|
5357
5388
|
|
|
5358
5389
|
```
|
|
5359
5390
|
Copyright (c) Individual contributors
|
|
@@ -5565,7 +5596,7 @@ SOFTWARE.
|
|
|
5565
5596
|
|
|
5566
5597
|
```
|
|
5567
5598
|
|
|
5568
|
-
## miniz_oxide 0.7.
|
|
5599
|
+
## miniz_oxide 0.7.2
|
|
5569
5600
|
|
|
5570
5601
|
```
|
|
5571
5602
|
MIT License
|
|
@@ -5673,34 +5704,7 @@ SOFTWARE.
|
|
|
5673
5704
|
|
|
5674
5705
|
```
|
|
5675
5706
|
|
|
5676
|
-
##
|
|
5677
|
-
|
|
5678
|
-
```
|
|
5679
|
-
MIT License
|
|
5680
|
-
|
|
5681
|
-
Copyright (c) 2018 Alexander Mescheryakov
|
|
5682
|
-
|
|
5683
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5684
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
5685
|
-
in the Software without restriction, including without limitation the rights
|
|
5686
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
5687
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
5688
|
-
furnished to do so, subject to the following conditions:
|
|
5689
|
-
|
|
5690
|
-
The above copyright notice and this permission notice shall be included in all
|
|
5691
|
-
copies or substantial portions of the Software.
|
|
5692
|
-
|
|
5693
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
5694
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
5695
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
5696
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
5697
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
5698
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
5699
|
-
SOFTWARE.
|
|
5700
|
-
|
|
5701
|
-
```
|
|
5702
|
-
|
|
5703
|
-
## crc32fast 1.3.2
|
|
5707
|
+
## crc32fast 1.4.0
|
|
5704
5708
|
|
|
5705
5709
|
```
|
|
5706
5710
|
MIT License
|
|
@@ -5754,7 +5758,7 @@ SOFTWARE.
|
|
|
5754
5758
|
|
|
5755
5759
|
```
|
|
5756
5760
|
|
|
5757
|
-
## strum 0.26.
|
|
5761
|
+
## strum 0.26.2, strum_macros 0.26.2
|
|
5758
5762
|
|
|
5759
5763
|
```
|
|
5760
5764
|
MIT License
|
|
@@ -5862,7 +5866,7 @@ SOFTWARE.
|
|
|
5862
5866
|
|
|
5863
5867
|
```
|
|
5864
5868
|
|
|
5865
|
-
## const-str 0.5.
|
|
5869
|
+
## const-str 0.5.7
|
|
5866
5870
|
|
|
5867
5871
|
```
|
|
5868
5872
|
MIT License
|
|
@@ -5915,7 +5919,7 @@ SOFTWARE.
|
|
|
5915
5919
|
|
|
5916
5920
|
```
|
|
5917
5921
|
|
|
5918
|
-
## snow 0.9.
|
|
5922
|
+
## snow 0.9.6
|
|
5919
5923
|
|
|
5920
5924
|
```
|
|
5921
5925
|
MIT License
|
|
@@ -5996,7 +6000,7 @@ SOFTWARE.
|
|
|
5996
6000
|
|
|
5997
6001
|
```
|
|
5998
6002
|
|
|
5999
|
-
## cesu8 1.1.0, curve25519-dalek-derive 0.1.0, half
|
|
6003
|
+
## cesu8 1.1.0, curve25519-dalek-derive 0.1.0, half 2.4.0, pqcrypto-internals 0.2.5, pqcrypto-kyber 0.7.9, pqcrypto-kyber 0.8.1, pqcrypto-traits 0.3.5
|
|
6000
6004
|
|
|
6001
6005
|
```
|
|
6002
6006
|
MIT License
|
|
@@ -6063,7 +6067,7 @@ SOFTWARE.
|
|
|
6063
6067
|
|
|
6064
6068
|
```
|
|
6065
6069
|
|
|
6066
|
-
## bytemuck 1.14.
|
|
6070
|
+
## bytemuck 1.14.3
|
|
6067
6071
|
|
|
6068
6072
|
```
|
|
6069
6073
|
MIT License
|
|
@@ -6110,7 +6114,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
6110
6114
|
|
|
6111
6115
|
```
|
|
6112
6116
|
|
|
6113
|
-
## adler 1.0.2, anyhow 1.0.
|
|
6117
|
+
## adler 1.0.2, anyhow 1.0.80, async-trait 0.1.77, dyn-clone 1.0.17, fastrand 2.0.1, home 0.5.9, itoa 1.0.10, linkme 0.3.25, linkme-impl 0.3.25, linux-raw-sys 0.4.13, minimal-lexical 0.2.1, num_enum 0.6.1, num_enum_derive 0.6.1, once_cell 1.19.0, paste 1.0.14, pin-project-lite 0.2.13, prettyplease 0.2.16, proc-macro-crate 1.3.1, proc-macro2 1.0.78, quote 1.0.35, rustc-hash 1.1.0, rustix 0.38.31, rustversion 1.0.14, semver 1.0.22, send_wrapper 0.6.0, serde 1.0.197, serde_derive 1.0.197, serde_json 1.0.114, syn 1.0.109, syn 2.0.52, syn-mid 0.6.0, thiserror 1.0.57, thiserror-impl 1.0.57, unicode-ident 1.0.12, utf-8 0.7.6
|
|
6114
6118
|
|
|
6115
6119
|
```
|
|
6116
6120
|
Permission is hereby granted, free of charge, to any
|
|
@@ -6168,7 +6172,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
6168
6172
|
|
|
6169
6173
|
```
|
|
6170
6174
|
|
|
6171
|
-
## winnow 0.5.
|
|
6175
|
+
## winnow 0.5.40
|
|
6172
6176
|
|
|
6173
6177
|
```
|
|
6174
6178
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
@@ -6256,7 +6260,7 @@ SOFTWARE.
|
|
|
6256
6260
|
|
|
6257
6261
|
```
|
|
6258
6262
|
|
|
6259
|
-
## chrono 0.4.
|
|
6263
|
+
## chrono 0.4.35
|
|
6260
6264
|
|
|
6261
6265
|
```
|
|
6262
6266
|
The MIT License (MIT)
|
|
@@ -6309,7 +6313,7 @@ THE SOFTWARE.
|
|
|
6309
6313
|
|
|
6310
6314
|
```
|
|
6311
6315
|
|
|
6312
|
-
## aho-corasick 1.1.2, byteorder 1.5.0, memchr 2.7.1, walkdir 2.
|
|
6316
|
+
## aho-corasick 1.1.2, byteorder 1.5.0, memchr 2.7.1, walkdir 2.5.0
|
|
6313
6317
|
|
|
6314
6318
|
```
|
|
6315
6319
|
The MIT License (MIT)
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import ServerPublicParams from '../ServerPublicParams';
|
|
3
|
-
import AuthCredential from './AuthCredential';
|
|
4
3
|
import AuthCredentialPresentation from './AuthCredentialPresentation';
|
|
5
|
-
import AuthCredentialResponse from './AuthCredentialResponse';
|
|
6
4
|
import AuthCredentialWithPni from './AuthCredentialWithPni';
|
|
7
5
|
import AuthCredentialWithPniResponse from './AuthCredentialWithPniResponse';
|
|
8
6
|
import GroupSecretParams from '../groups/GroupSecretParams';
|
|
@@ -10,7 +8,6 @@ import { Aci, Pni } from '../../Address';
|
|
|
10
8
|
export default class ClientZkAuthOperations {
|
|
11
9
|
serverPublicParams: ServerPublicParams;
|
|
12
10
|
constructor(serverPublicParams: ServerPublicParams);
|
|
13
|
-
receiveAuthCredential(aci: Aci, redemptionTime: number, authCredentialResponse: AuthCredentialResponse): AuthCredential;
|
|
14
11
|
/**
|
|
15
12
|
* Produces the AuthCredentialWithPni from a server-generated AuthCredentialWithPniResponse.
|
|
16
13
|
*
|
|
@@ -26,8 +23,6 @@ export default class ClientZkAuthOperations {
|
|
|
26
23
|
* @param redemptionTime - This is provided by the server as an integer, and should be passed through directly.
|
|
27
24
|
*/
|
|
28
25
|
receiveAuthCredentialWithPniAsAci(aci: Aci, pni: Pni, redemptionTime: number, authCredentialResponse: AuthCredentialWithPniResponse): AuthCredentialWithPni;
|
|
29
|
-
createAuthCredentialPresentation(groupSecretParams: GroupSecretParams, authCredential: AuthCredential): AuthCredentialPresentation;
|
|
30
|
-
createAuthCredentialPresentationWithRandom(random: Buffer, groupSecretParams: GroupSecretParams, authCredential: AuthCredential): AuthCredentialPresentation;
|
|
31
26
|
createAuthCredentialWithPniPresentation(groupSecretParams: GroupSecretParams, authCredential: AuthCredentialWithPni): AuthCredentialPresentation;
|
|
32
27
|
createAuthCredentialWithPniPresentationWithRandom(random: Buffer, groupSecretParams: GroupSecretParams, authCredential: AuthCredentialWithPni): AuthCredentialPresentation;
|
|
33
28
|
}
|
|
@@ -7,16 +7,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
const crypto_1 = require("crypto");
|
|
8
8
|
const Native = require("../../../Native");
|
|
9
9
|
const Constants_1 = require("../internal/Constants");
|
|
10
|
-
const AuthCredential_1 = require("./AuthCredential");
|
|
11
10
|
const AuthCredentialPresentation_1 = require("./AuthCredentialPresentation");
|
|
12
11
|
const AuthCredentialWithPni_1 = require("./AuthCredentialWithPni");
|
|
13
12
|
class ClientZkAuthOperations {
|
|
14
13
|
constructor(serverPublicParams) {
|
|
15
14
|
this.serverPublicParams = serverPublicParams;
|
|
16
15
|
}
|
|
17
|
-
receiveAuthCredential(aci, redemptionTime, authCredentialResponse) {
|
|
18
|
-
return new AuthCredential_1.default(Native.ServerPublicParams_ReceiveAuthCredential(this.serverPublicParams.getContents(), aci.getServiceIdFixedWidthBinary(), redemptionTime, authCredentialResponse.getContents()));
|
|
19
|
-
}
|
|
20
16
|
/**
|
|
21
17
|
* Produces the AuthCredentialWithPni from a server-generated AuthCredentialWithPniResponse.
|
|
22
18
|
*
|
|
@@ -36,13 +32,6 @@ class ClientZkAuthOperations {
|
|
|
36
32
|
receiveAuthCredentialWithPniAsAci(aci, pni, redemptionTime, authCredentialResponse) {
|
|
37
33
|
return new AuthCredentialWithPni_1.default(Native.ServerPublicParams_ReceiveAuthCredentialWithPniAsAci(this.serverPublicParams.getContents(), aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime, authCredentialResponse.getContents()));
|
|
38
34
|
}
|
|
39
|
-
createAuthCredentialPresentation(groupSecretParams, authCredential) {
|
|
40
|
-
const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
|
|
41
|
-
return this.createAuthCredentialPresentationWithRandom(random, groupSecretParams, authCredential);
|
|
42
|
-
}
|
|
43
|
-
createAuthCredentialPresentationWithRandom(random, groupSecretParams, authCredential) {
|
|
44
|
-
return new AuthCredentialPresentation_1.default(Native.ServerPublicParams_CreateAuthCredentialPresentationDeterministic(this.serverPublicParams.getContents(), random, groupSecretParams.getContents(), authCredential.getContents()));
|
|
45
|
-
}
|
|
46
35
|
createAuthCredentialWithPniPresentation(groupSecretParams, authCredential) {
|
|
47
36
|
const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
|
|
48
37
|
return this.createAuthCredentialWithPniPresentationWithRandom(random, groupSecretParams, authCredential);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import ServerSecretParams from '../ServerSecretParams';
|
|
3
|
-
import AuthCredentialResponse from './AuthCredentialResponse';
|
|
4
3
|
import AuthCredentialPresentation from './AuthCredentialPresentation';
|
|
5
4
|
import AuthCredentialWithPniResponse from './AuthCredentialWithPniResponse';
|
|
6
5
|
import GroupPublicParams from '../groups/GroupPublicParams';
|
|
@@ -8,8 +7,6 @@ import { Aci, Pni } from '../../Address';
|
|
|
8
7
|
export default class ServerZkAuthOperations {
|
|
9
8
|
serverSecretParams: ServerSecretParams;
|
|
10
9
|
constructor(serverSecretParams: ServerSecretParams);
|
|
11
|
-
issueAuthCredential(aci: Aci, redemptionTime: number): AuthCredentialResponse;
|
|
12
|
-
issueAuthCredentialWithRandom(random: Buffer, aci: Aci, redemptionTime: number): AuthCredentialResponse;
|
|
13
10
|
issueAuthCredentialWithPniAsServiceId(aci: Aci, pni: Pni, redemptionTime: number): AuthCredentialWithPniResponse;
|
|
14
11
|
issueAuthCredentialWithPniAsServiceIdWithRandom(random: Buffer, aci: Aci, pni: Pni, redemptionTime: number): AuthCredentialWithPniResponse;
|
|
15
12
|
issueAuthCredentialWithPniAsAci(aci: Aci, pni: Pni, redemptionTime: number): AuthCredentialWithPniResponse;
|
|
@@ -7,19 +7,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
const crypto_1 = require("crypto");
|
|
8
8
|
const Constants_1 = require("../internal/Constants");
|
|
9
9
|
const Native = require("../../../Native");
|
|
10
|
-
const AuthCredentialResponse_1 = require("./AuthCredentialResponse");
|
|
11
10
|
const AuthCredentialWithPniResponse_1 = require("./AuthCredentialWithPniResponse");
|
|
12
11
|
class ServerZkAuthOperations {
|
|
13
12
|
constructor(serverSecretParams) {
|
|
14
13
|
this.serverSecretParams = serverSecretParams;
|
|
15
14
|
}
|
|
16
|
-
issueAuthCredential(aci, redemptionTime) {
|
|
17
|
-
const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
|
|
18
|
-
return this.issueAuthCredentialWithRandom(random, aci, redemptionTime);
|
|
19
|
-
}
|
|
20
|
-
issueAuthCredentialWithRandom(random, aci, redemptionTime) {
|
|
21
|
-
return new AuthCredentialResponse_1.default(Native.ServerSecretParams_IssueAuthCredentialDeterministic(this.serverSecretParams.getContents(), random, aci.getServiceIdFixedWidthBinary(), redemptionTime));
|
|
22
|
-
}
|
|
23
15
|
issueAuthCredentialWithPniAsServiceId(aci, pni, redemptionTime) {
|
|
24
16
|
const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
|
|
25
17
|
return this.issueAuthCredentialWithPniAsServiceIdWithRandom(random, aci, pni, redemptionTime);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import ByteArray from '../internal/ByteArray';
|
|
3
|
+
import ServerSecretParams from '../ServerSecretParams';
|
|
4
|
+
/**
|
|
5
|
+
* The key pair used to issue and verify group send endorsements.
|
|
6
|
+
*
|
|
7
|
+
* Group send endorsements use a different key pair depending on the endorsement's expiration (but
|
|
8
|
+
* not the user ID being endorsed). The server may cache these keys to avoid the (small) cost of
|
|
9
|
+
* deriving them from the root key in {@link ServerSecretParams}. The key object stores the
|
|
10
|
+
* expiration so that it doesn't need to be provided again when issuing endorsements.
|
|
11
|
+
*
|
|
12
|
+
* @see {@link GroupSendEndorsementsResponse.issue}
|
|
13
|
+
* @see {@link GroupSendFullToken#verify}
|
|
14
|
+
*/
|
|
15
|
+
export default class GroupSendDerivedKeyPair extends ByteArray {
|
|
16
|
+
constructor(contents: Buffer);
|
|
17
|
+
/**
|
|
18
|
+
* Derives a new key for group send endorsements that expire at `expiration`.
|
|
19
|
+
*
|
|
20
|
+
* `expiration` must be day-aligned as a protection against fingerprinting by the issuing server.
|
|
21
|
+
*/
|
|
22
|
+
static forExpiration(expiration: Date, params: ServerSecretParams): GroupSendDerivedKeyPair;
|
|
23
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2024 Signal Messenger, LLC.
|
|
4
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
//
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const ByteArray_1 = require("../internal/ByteArray");
|
|
8
|
+
const Native = require("../../../Native");
|
|
9
|
+
/**
|
|
10
|
+
* The key pair used to issue and verify group send endorsements.
|
|
11
|
+
*
|
|
12
|
+
* Group send endorsements use a different key pair depending on the endorsement's expiration (but
|
|
13
|
+
* not the user ID being endorsed). The server may cache these keys to avoid the (small) cost of
|
|
14
|
+
* deriving them from the root key in {@link ServerSecretParams}. The key object stores the
|
|
15
|
+
* expiration so that it doesn't need to be provided again when issuing endorsements.
|
|
16
|
+
*
|
|
17
|
+
* @see {@link GroupSendEndorsementsResponse.issue}
|
|
18
|
+
* @see {@link GroupSendFullToken#verify}
|
|
19
|
+
*/
|
|
20
|
+
class GroupSendDerivedKeyPair extends ByteArray_1.default {
|
|
21
|
+
constructor(contents) {
|
|
22
|
+
super(contents, Native.GroupSendDerivedKeyPair_CheckValidContents);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Derives a new key for group send endorsements that expire at `expiration`.
|
|
26
|
+
*
|
|
27
|
+
* `expiration` must be day-aligned as a protection against fingerprinting by the issuing server.
|
|
28
|
+
*/
|
|
29
|
+
static forExpiration(expiration, params) {
|
|
30
|
+
return new GroupSendDerivedKeyPair(Native.GroupSendDerivedKeyPair_ForExpiration(Math.floor(expiration.getTime() / 1000), params.contents));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.default = GroupSendDerivedKeyPair;
|
|
34
|
+
//# sourceMappingURL=GroupSendDerivedKeyPair.js.map
|