@signalapp/libsignal-client 0.73.2 → 0.74.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 CHANGED
@@ -493,7 +493,7 @@ export function SealedSenderDecryptionResult_GetSenderE164(obj: Wrapper<SealedSe
493
493
  export function SealedSenderDecryptionResult_GetSenderUuid(obj: Wrapper<SealedSenderDecryptionResult>): string;
494
494
  export function SealedSenderDecryptionResult_Message(obj: Wrapper<SealedSenderDecryptionResult>): Buffer;
495
495
  export function SealedSenderMultiRecipientMessage_Parse(buffer: Buffer): SealedSenderMultiRecipientMessage;
496
- export function SealedSender_DecryptMessage(message: Buffer, trustRoot: Wrapper<PublicKey>, timestamp: Timestamp, localE164: string | null, localUuid: string, localDeviceId: number, sessionStore: SessionStore, identityStore: IdentityKeyStore, prekeyStore: PreKeyStore, signedPrekeyStore: SignedPreKeyStore, kyberPrekeyStore: KyberPreKeyStore): Promise<SealedSenderDecryptionResult>;
496
+ export function SealedSender_DecryptMessage(message: Buffer, trustRoot: Wrapper<PublicKey>, timestamp: Timestamp, localE164: string | null, localUuid: string, localDeviceId: number, sessionStore: SessionStore, identityStore: IdentityKeyStore, prekeyStore: PreKeyStore, signedPrekeyStore: SignedPreKeyStore, kyberPrekeyStore: KyberPreKeyStore, usePqRatchet: boolean): Promise<SealedSenderDecryptionResult>;
497
497
  export function SealedSender_DecryptToUsmc(ctext: Buffer, identityStore: IdentityKeyStore): Promise<UnidentifiedSenderMessageContent>;
498
498
  export function SealedSender_Encrypt(destination: Wrapper<ProtocolAddress>, content: Wrapper<UnidentifiedSenderMessageContent>, identityKeyStore: IdentityKeyStore): Promise<Buffer>;
499
499
  export function SealedSender_MultiRecipientEncrypt(recipients: Wrapper<ProtocolAddress>[], recipientSessions: Wrapper<SessionRecord>[], excludedRecipients: Buffer, content: Wrapper<UnidentifiedSenderMessageContent>, identityKeyStore: IdentityKeyStore): Promise<Buffer>;
@@ -565,8 +565,8 @@ export function ServiceId_ParseFromServiceIdString(input: string): Buffer;
565
565
  export function ServiceId_ServiceIdBinary(value: Buffer): Buffer;
566
566
  export function ServiceId_ServiceIdLog(value: Buffer): string;
567
567
  export function ServiceId_ServiceIdString(value: Buffer): string;
568
- export function SessionBuilder_ProcessPreKeyBundle(bundle: Wrapper<PreKeyBundle>, protocolAddress: Wrapper<ProtocolAddress>, sessionStore: SessionStore, identityKeyStore: IdentityKeyStore, now: Timestamp): Promise<void>;
569
- export function SessionCipher_DecryptPreKeySignalMessage(message: Wrapper<PreKeySignalMessage>, protocolAddress: Wrapper<ProtocolAddress>, sessionStore: SessionStore, identityKeyStore: IdentityKeyStore, prekeyStore: PreKeyStore, signedPrekeyStore: SignedPreKeyStore, kyberPrekeyStore: KyberPreKeyStore): Promise<Buffer>;
568
+ export function SessionBuilder_ProcessPreKeyBundle(bundle: Wrapper<PreKeyBundle>, protocolAddress: Wrapper<ProtocolAddress>, sessionStore: SessionStore, identityKeyStore: IdentityKeyStore, now: Timestamp, usePqRatchet: boolean): Promise<void>;
569
+ export function SessionCipher_DecryptPreKeySignalMessage(message: Wrapper<PreKeySignalMessage>, protocolAddress: Wrapper<ProtocolAddress>, sessionStore: SessionStore, identityKeyStore: IdentityKeyStore, prekeyStore: PreKeyStore, signedPrekeyStore: SignedPreKeyStore, kyberPrekeyStore: KyberPreKeyStore, usePqRatchet: boolean): Promise<Buffer>;
570
570
  export function SessionCipher_DecryptSignalMessage(message: Wrapper<SignalMessage>, protocolAddress: Wrapper<ProtocolAddress>, sessionStore: SessionStore, identityKeyStore: IdentityKeyStore): Promise<Buffer>;
571
571
  export function SessionCipher_EncryptMessage(ptext: Buffer, protocolAddress: Wrapper<ProtocolAddress>, sessionStore: SessionStore, identityKeyStore: IdentityKeyStore, now: Timestamp): Promise<CiphertextMessage>;
572
572
  export function SessionRecord_ArchiveCurrentState(sessionRecord: Wrapper<SessionRecord>): void;
@@ -585,8 +585,9 @@ export function SignalMessage_Deserialize(data: Buffer): SignalMessage;
585
585
  export function SignalMessage_GetBody(obj: Wrapper<SignalMessage>): Buffer;
586
586
  export function SignalMessage_GetCounter(obj: Wrapper<SignalMessage>): number;
587
587
  export function SignalMessage_GetMessageVersion(obj: Wrapper<SignalMessage>): number;
588
+ export function SignalMessage_GetPqRatchet(msg: Wrapper<SignalMessage>): Buffer;
588
589
  export function SignalMessage_GetSerialized(obj: Wrapper<SignalMessage>): Buffer;
589
- export function SignalMessage_New(messageVersion: number, macKey: Buffer, senderRatchetKey: Wrapper<PublicKey>, counter: number, previousCounter: number, ciphertext: Buffer, senderIdentityKey: Wrapper<PublicKey>, receiverIdentityKey: Wrapper<PublicKey>): SignalMessage;
590
+ export function SignalMessage_New(messageVersion: number, macKey: Buffer, senderRatchetKey: Wrapper<PublicKey>, counter: number, previousCounter: number, ciphertext: Buffer, senderIdentityKey: Wrapper<PublicKey>, receiverIdentityKey: Wrapper<PublicKey>, pqRatchet: Buffer): SignalMessage;
590
591
  export function SignalMessage_VerifyMac(msg: Wrapper<SignalMessage>, senderIdentityKey: Wrapper<PublicKey>, receiverIdentityKey: Wrapper<PublicKey>, macKey: Buffer): boolean;
591
592
  export function SignedPreKeyRecord_Deserialize(data: Buffer): SignedPreKeyRecord;
592
593
  export function SignedPreKeyRecord_GetId(obj: Wrapper<SignedPreKeyRecord>): number;
@@ -609,6 +610,7 @@ export function TESTING_ChatResponseConvert(bodyPresent: boolean): ChatResponse;
609
610
  export function TESTING_ChatSendErrorConvert(errorDescription: string): void;
610
611
  export function TESTING_ConnectionManager_isUsingProxy(manager: Wrapper<ConnectionManager>): number;
611
612
  export function TESTING_ConnectionManager_newLocalOverride(userAgent: string, chatPort: number, cdsiPort: number, svr2Port: number, rootCertificateDer: Buffer): ConnectionManager;
613
+ export function TESTING_ConvertOptionalUuid(present: boolean): Uuid | null;
612
614
  export function TESTING_ErrorOnBorrowAsync(_input: null): Promise<void>;
613
615
  export function TESTING_ErrorOnBorrowIo(asyncRuntime: Wrapper<NonSuspendingBackgroundThreadRuntime>, _input: null): CancellablePromise<void>;
614
616
  export function TESTING_ErrorOnBorrowSync(_input: null): void;
@@ -639,6 +641,9 @@ export function TESTING_FutureProducesPointerType(asyncRuntime: Wrapper<NonSuspe
639
641
  export function TESTING_FutureSuccess(asyncRuntime: Wrapper<NonSuspendingBackgroundThreadRuntime>, input: number): CancellablePromise<number>;
640
642
  export function TESTING_InputStreamReadIntoZeroLengthSlice(capsAlphabetInput: InputStream): Promise<Buffer>;
641
643
  export function TESTING_JoinStringArray(array: string[], joinWith: string): string;
644
+ export function TESTING_KeyTransChatSendError(): void;
645
+ export function TESTING_KeyTransFatalVerificationFailure(): void;
646
+ export function TESTING_KeyTransNonFatalVerificationFailure(): void;
642
647
  export function TESTING_NonSuspendingBackgroundThreadRuntime_New(): NonSuspendingBackgroundThreadRuntime;
643
648
  export function TESTING_OtherTestingHandleType_getValue(handle: Wrapper<OtherTestingHandleType>): string;
644
649
  export function TESTING_PanicInBodyAsync(_input: null): Promise<void>;
package/dist/Errors.d.ts CHANGED
@@ -39,7 +39,9 @@ export declare enum ErrorCode {
39
39
  ConnectionInvalidated = 35,
40
40
  ConnectedElsewhere = 36,
41
41
  BackupValidation = 37,
42
- Cancelled = 38
42
+ Cancelled = 38,
43
+ KeyTransparencyError = 39,
44
+ KeyTransparencyVerificationFailed = 40
43
45
  }
44
46
  export declare class LibSignalErrorBase extends Error {
45
47
  readonly code: ErrorCode;
@@ -179,4 +181,10 @@ export type BackupValidationError = LibSignalErrorCommon & {
179
181
  export type CancellationError = LibSignalErrorCommon & {
180
182
  code: ErrorCode.Cancelled;
181
183
  };
182
- export type LibSignalError = GenericError | DuplicatedMessageError | SealedSenderSelfSendError | UntrustedIdentityError | InvalidRegistrationIdError | VerificationFailedError | InvalidSessionError | InvalidSenderKeySessionError | NicknameCannotBeEmptyError | CannotStartWithDigitError | MissingSeparatorError | BadNicknameCharacterError | NicknameTooShortError | NicknameTooLongError | DiscriminatorCannotBeEmptyError | DiscriminatorCannotBeZeroError | DiscriminatorCannotBeSingleDigitError | DiscriminatorCannotHaveLeadingZerosError | BadDiscriminatorCharacterError | DiscriminatorTooLargeError | InputDataTooLong | InvalidEntropyDataLength | InvalidUsernameLinkEncryptedData | IoError | CdsiInvalidTokenError | InvalidUriError | InvalidMediaInputError | SvrDataMissingError | SvrRestoreFailedError | SvrRequestFailedError | UnsupportedMediaInputError | ChatServiceInactive | AppExpiredError | DeviceDelinkedError | ConnectionInvalidatedError | ConnectedElsewhereError | RateLimitedError | BackupValidationError | CancellationError;
184
+ export type KeyTransparencyError = LibSignalErrorCommon & {
185
+ code: ErrorCode.KeyTransparencyError;
186
+ };
187
+ export type KeyTransparencyVerificationFailed = LibSignalErrorCommon & {
188
+ code: ErrorCode.KeyTransparencyVerificationFailed;
189
+ };
190
+ export type LibSignalError = GenericError | DuplicatedMessageError | SealedSenderSelfSendError | UntrustedIdentityError | InvalidRegistrationIdError | VerificationFailedError | InvalidSessionError | InvalidSenderKeySessionError | NicknameCannotBeEmptyError | CannotStartWithDigitError | MissingSeparatorError | BadNicknameCharacterError | NicknameTooShortError | NicknameTooLongError | DiscriminatorCannotBeEmptyError | DiscriminatorCannotBeZeroError | DiscriminatorCannotBeSingleDigitError | DiscriminatorCannotHaveLeadingZerosError | BadDiscriminatorCharacterError | DiscriminatorTooLargeError | InputDataTooLong | InvalidEntropyDataLength | InvalidUsernameLinkEncryptedData | IoError | CdsiInvalidTokenError | InvalidUriError | InvalidMediaInputError | SvrDataMissingError | SvrRestoreFailedError | SvrRequestFailedError | UnsupportedMediaInputError | ChatServiceInactive | AppExpiredError | DeviceDelinkedError | ConnectionInvalidatedError | ConnectedElsewhereError | RateLimitedError | BackupValidationError | CancellationError | KeyTransparencyError | KeyTransparencyVerificationFailed;
package/dist/Errors.js CHANGED
@@ -47,6 +47,8 @@ var ErrorCode;
47
47
  ErrorCode[ErrorCode["ConnectedElsewhere"] = 36] = "ConnectedElsewhere";
48
48
  ErrorCode[ErrorCode["BackupValidation"] = 37] = "BackupValidation";
49
49
  ErrorCode[ErrorCode["Cancelled"] = 38] = "Cancelled";
50
+ ErrorCode[ErrorCode["KeyTransparencyError"] = 39] = "KeyTransparencyError";
51
+ ErrorCode[ErrorCode["KeyTransparencyVerificationFailed"] = 40] = "KeyTransparencyVerificationFailed";
50
52
  })(ErrorCode || (exports.ErrorCode = ErrorCode = {}));
51
53
  class LibSignalErrorBase extends Error {
52
54
  constructor(message, name, operation, extraProps) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  libsignal makes use of the following open source projects.
4
4
 
5
- ## partial-default-derive 0.1.0, partial-default 0.1.0
5
+ ## spqr 0.1.0, partial-default-derive 0.1.0, partial-default 0.1.0
6
6
 
7
7
  ```
8
8
  GNU AFFERO GENERAL PUBLIC LICENSE
@@ -1396,7 +1396,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1396
1396
 
1397
1397
  ```
1398
1398
 
1399
- ## hax-lib-macros 0.2.0, hax-lib 0.2.0
1399
+ ## hax-lib-macros 0.2.0, hax-lib-macros 0.3.1, hax-lib 0.2.0, hax-lib 0.3.1
1400
1400
 
1401
1401
  ```
1402
1402
 
@@ -1800,6 +1800,213 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1800
1800
 
1801
1801
  ```
1802
1802
 
1803
+ ## sorted-vec 0.8.6
1804
+
1805
+ ```
1806
+ Apache License
1807
+ Version 2.0, January 2004
1808
+ http://www.apache.org/licenses/
1809
+
1810
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1811
+
1812
+ 1. Definitions.
1813
+
1814
+ "License" shall mean the terms and conditions for use, reproduction,
1815
+ and distribution as defined by Sections 1 through 9 of this document.
1816
+
1817
+ "Licensor" shall mean the copyright owner or entity authorized by
1818
+ the copyright owner that is granting the License.
1819
+
1820
+ "Legal Entity" shall mean the union of the acting entity and all
1821
+ other entities that control, are controlled by, or are under common
1822
+ control with that entity. For the purposes of this definition,
1823
+ "control" means (i) the power, direct or indirect, to cause the
1824
+ direction or management of such entity, whether by contract or
1825
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
1826
+ outstanding shares, or (iii) beneficial ownership of such entity.
1827
+
1828
+ "You" (or "Your") shall mean an individual or Legal Entity
1829
+ exercising permissions granted by this License.
1830
+
1831
+ "Source" form shall mean the preferred form for making modifications,
1832
+ including but not limited to software source code, documentation
1833
+ source, and configuration files.
1834
+
1835
+ "Object" form shall mean any form resulting from mechanical
1836
+ transformation or translation of a Source form, including but
1837
+ not limited to compiled object code, generated documentation,
1838
+ and conversions to other media types.
1839
+
1840
+ "Work" shall mean the work of authorship, whether in Source or
1841
+ Object form, made available under the License, as indicated by a
1842
+ copyright notice that is included in or attached to the work
1843
+ (an example is provided in the Appendix below).
1844
+
1845
+ "Derivative Works" shall mean any work, whether in Source or Object
1846
+ form, that is based on (or derived from) the Work and for which the
1847
+ editorial revisions, annotations, elaborations, or other modifications
1848
+ represent, as a whole, an original work of authorship. For the purposes
1849
+ of this License, Derivative Works shall not include works that remain
1850
+ separable from, or merely link (or bind by name) to the interfaces of,
1851
+ the Work and Derivative Works thereof.
1852
+
1853
+ "Contribution" shall mean any work of authorship, including
1854
+ the original version of the Work and any modifications or additions
1855
+ to that Work or Derivative Works thereof, that is intentionally
1856
+ submitted to Licensor for inclusion in the Work by the copyright owner
1857
+ or by an individual or Legal Entity authorized to submit on behalf of
1858
+ the copyright owner. For the purposes of this definition, "submitted"
1859
+ means any form of electronic, verbal, or written communication sent
1860
+ to the Licensor or its representatives, including but not limited to
1861
+ communication on electronic mailing lists, source code control systems,
1862
+ and issue tracking systems that are managed by, or on behalf of, the
1863
+ Licensor for the purpose of discussing and improving the Work, but
1864
+ excluding communication that is conspicuously marked or otherwise
1865
+ designated in writing by the copyright owner as "Not a Contribution."
1866
+
1867
+ "Contributor" shall mean Licensor and any individual or Legal Entity
1868
+ on behalf of whom a Contribution has been received by Licensor and
1869
+ subsequently incorporated within the Work.
1870
+
1871
+ 2. Grant of Copyright License. Subject to the terms and conditions of
1872
+ this License, each Contributor hereby grants to You a perpetual,
1873
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
1874
+ copyright license to reproduce, prepare Derivative Works of,
1875
+ publicly display, publicly perform, sublicense, and distribute the
1876
+ Work and such Derivative Works in Source or Object form.
1877
+
1878
+ 3. Grant of Patent License. Subject to the terms and conditions of
1879
+ this License, each Contributor hereby grants to You a perpetual,
1880
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
1881
+ (except as stated in this section) patent license to make, have made,
1882
+ use, offer to sell, sell, import, and otherwise transfer the Work,
1883
+ where such license applies only to those patent claims licensable
1884
+ by such Contributor that are necessarily infringed by their
1885
+ Contribution(s) alone or by combination of their Contribution(s)
1886
+ with the Work to which such Contribution(s) was submitted. If You
1887
+ institute patent litigation against any entity (including a
1888
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
1889
+ or a Contribution incorporated within the Work constitutes direct
1890
+ or contributory patent infringement, then any patent licenses
1891
+ granted to You under this License for that Work shall terminate
1892
+ as of the date such litigation is filed.
1893
+
1894
+ 4. Redistribution. You may reproduce and distribute copies of the
1895
+ Work or Derivative Works thereof in any medium, with or without
1896
+ modifications, and in Source or Object form, provided that You
1897
+ meet the following conditions:
1898
+
1899
+ (a) You must give any other recipients of the Work or
1900
+ Derivative Works a copy of this License; and
1901
+
1902
+ (b) You must cause any modified files to carry prominent notices
1903
+ stating that You changed the files; and
1904
+
1905
+ (c) You must retain, in the Source form of any Derivative Works
1906
+ that You distribute, all copyright, patent, trademark, and
1907
+ attribution notices from the Source form of the Work,
1908
+ excluding those notices that do not pertain to any part of
1909
+ the Derivative Works; and
1910
+
1911
+ (d) If the Work includes a "NOTICE" text file as part of its
1912
+ distribution, then any Derivative Works that You distribute must
1913
+ include a readable copy of the attribution notices contained
1914
+ within such NOTICE file, excluding those notices that do not
1915
+ pertain to any part of the Derivative Works, in at least one
1916
+ of the following places: within a NOTICE text file distributed
1917
+ as part of the Derivative Works; within the Source form or
1918
+ documentation, if provided along with the Derivative Works; or,
1919
+ within a display generated by the Derivative Works, if and
1920
+ wherever such third-party notices normally appear. The contents
1921
+ of the NOTICE file are for informational purposes only and
1922
+ do not modify the License. You may add Your own attribution
1923
+ notices within Derivative Works that You distribute, alongside
1924
+ or as an addendum to the NOTICE text from the Work, provided
1925
+ that such additional attribution notices cannot be construed
1926
+ as modifying the License.
1927
+
1928
+ You may add Your own copyright statement to Your modifications and
1929
+ may provide additional or different license terms and conditions
1930
+ for use, reproduction, or distribution of Your modifications, or
1931
+ for any such Derivative Works as a whole, provided Your use,
1932
+ reproduction, and distribution of the Work otherwise complies with
1933
+ the conditions stated in this License.
1934
+
1935
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
1936
+ any Contribution intentionally submitted for inclusion in the Work
1937
+ by You to the Licensor shall be under the terms and conditions of
1938
+ this License, without any additional terms or conditions.
1939
+ Notwithstanding the above, nothing herein shall supersede or modify
1940
+ the terms of any separate license agreement you may have executed
1941
+ with Licensor regarding such Contributions.
1942
+
1943
+ 6. Trademarks. This License does not grant permission to use the trade
1944
+ names, trademarks, service marks, or product names of the Licensor,
1945
+ except as required for reasonable and customary use in describing the
1946
+ origin of the Work and reproducing the content of the NOTICE file.
1947
+
1948
+ 7. Disclaimer of Warranty. Unless required by applicable law or
1949
+ agreed to in writing, Licensor provides the Work (and each
1950
+ Contributor provides its Contributions) on an "AS IS" BASIS,
1951
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
1952
+ implied, including, without limitation, any warranties or conditions
1953
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
1954
+ PARTICULAR PURPOSE. You are solely responsible for determining the
1955
+ appropriateness of using or redistributing the Work and assume any
1956
+ risks associated with Your exercise of permissions under this License.
1957
+
1958
+ 8. Limitation of Liability. In no event and under no legal theory,
1959
+ whether in tort (including negligence), contract, or otherwise,
1960
+ unless required by applicable law (such as deliberate and grossly
1961
+ negligent acts) or agreed to in writing, shall any Contributor be
1962
+ liable to You for damages, including any direct, indirect, special,
1963
+ incidental, or consequential damages of any character arising as a
1964
+ result of this License or out of the use or inability to use the
1965
+ Work (including but not limited to damages for loss of goodwill,
1966
+ work stoppage, computer failure or malfunction, or any and all
1967
+ other commercial damages or losses), even if such Contributor
1968
+ has been advised of the possibility of such damages.
1969
+
1970
+ 9. Accepting Warranty or Additional Liability. While redistributing
1971
+ the Work or Derivative Works thereof, You may choose to offer,
1972
+ and charge a fee for, acceptance of support, warranty, indemnity,
1973
+ or other liability obligations and/or rights consistent with this
1974
+ License. However, in accepting such obligations, You may act only
1975
+ on Your own behalf and on Your sole responsibility, not on behalf
1976
+ of any other Contributor, and only if You agree to indemnify,
1977
+ defend, and hold each Contributor harmless for any liability
1978
+ incurred by, or claims asserted against, such Contributor by reason
1979
+ of your accepting any such warranty or additional liability.
1980
+
1981
+ END OF TERMS AND CONDITIONS
1982
+
1983
+ APPENDIX: How to apply the Apache License to your work.
1984
+
1985
+ To apply the Apache License to your work, attach the following
1986
+ boilerplate notice, with the fields enclosed by brackets "[]"
1987
+ replaced with your own identifying information. (Don't include
1988
+ the brackets!) The text should be enclosed in the appropriate
1989
+ comment syntax for the file format. We also recommend that a
1990
+ file or class name and description of purpose be included on the
1991
+ same "printed page" as the copyright notice for easier
1992
+ identification within third-party archives.
1993
+
1994
+ Copyright 2018 Shane Pearman
1995
+
1996
+ Licensed under the Apache License, Version 2.0 (the "License");
1997
+ you may not use this file except in compliance with the License.
1998
+ You may obtain a copy of the License at
1999
+
2000
+ http://www.apache.org/licenses/LICENSE-2.0
2001
+
2002
+ Unless required by applicable law or agreed to in writing, software
2003
+ distributed under the License is distributed on an "AS IS" BASIS,
2004
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2005
+ See the License for the specific language governing permissions and
2006
+ limitations under the License.
2007
+
2008
+ ```
2009
+
1803
2010
  ## libcrux-intrinsics 0.0.2, libcrux-ml-kem 0.0.2, libcrux-platform 0.0.2, libcrux-sha3 0.0.2
1804
2011
 
1805
2012
  ```
@@ -2384,6 +2591,85 @@ limitations under the License.
2384
2591
 
2385
2592
  ```
2386
2593
 
2594
+ ## libcrux-hacl-rs 0.0.2, libcrux-hkdf 0.0.2, libcrux-hmac 0.0.2, libcrux-macros 0.0.2, libcrux-sha2 0.0.2, libcrux-traits 0.0.2
2595
+
2596
+ ```
2597
+ Apache License
2598
+ Version 2.0, January 2004
2599
+ http://www.apache.org/licenses/
2600
+
2601
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
2602
+
2603
+ 1. Definitions.
2604
+
2605
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
2606
+
2607
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
2608
+
2609
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
2610
+
2611
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
2612
+
2613
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
2614
+
2615
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
2616
+
2617
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
2618
+
2619
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
2620
+
2621
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
2622
+
2623
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2624
+
2625
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
2626
+
2627
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
2628
+
2629
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
2630
+
2631
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
2632
+
2633
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
2634
+
2635
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
2636
+
2637
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
2638
+
2639
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
2640
+
2641
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
2642
+
2643
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
2644
+
2645
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
2646
+
2647
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
2648
+
2649
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
2650
+
2651
+ END OF TERMS AND CONDITIONS
2652
+
2653
+ APPENDIX: How to apply the Apache License to your work.
2654
+
2655
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
2656
+
2657
+ Copyright [yyyy] [name of copyright owner]
2658
+
2659
+ Licensed under the Apache License, Version 2.0 (the "License");
2660
+ you may not use this file except in compliance with the License.
2661
+ You may obtain a copy of the License at
2662
+
2663
+ http://www.apache.org/licenses/LICENSE-2.0
2664
+
2665
+ Unless required by applicable law or agreed to in writing, software
2666
+ distributed under the License is distributed on an "AS IS" BASIS,
2667
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2668
+ See the License for the specific language governing permissions and
2669
+ limitations under the License.
2670
+
2671
+ ```
2672
+
2387
2673
  ## boring 4.15.0
2388
2674
 
2389
2675
  ```
@@ -6256,7 +6542,7 @@ SOFTWARE.
6256
6542
 
6257
6543
  ```
6258
6544
 
6259
- ## anstream 0.6.18, anstyle-query 1.1.2, clap 4.5.35, colorchoice 1.0.3, env_filter 0.1.3, env_logger 0.11.8, is_terminal_polyfill 1.70.1
6545
+ ## anstream 0.6.18, anstyle-query 1.1.2, clap 4.5.35, colorchoice 1.0.3, env_filter 0.1.3, env_logger 0.11.8, is_terminal_polyfill 1.70.1, toml_datetime 0.6.8, toml_edit 0.22.24
6260
6546
 
6261
6547
  ```
6262
6548
  Copyright (c) Individual contributors
@@ -7229,7 +7515,7 @@ SOFTWARE.
7229
7515
 
7230
7516
  ```
7231
7517
 
7232
- ## curve25519-dalek-derive 0.1.1, adler2 2.0.0, anyhow 1.0.97, async-trait 0.1.88, atomic-waker 1.1.2, auto_enums 0.8.7, derive_utils 0.15.0, displaydoc 0.2.5, dyn-clone 1.0.19, fastrand 2.3.0, home 0.5.9, itoa 1.0.15, linkme-impl 0.3.33, linkme 0.3.33, linux-raw-sys 0.4.15, linux-raw-sys 0.9.3, minimal-lexical 0.2.1, once_cell 1.21.3, paste 1.0.15, pin-project-internal 1.1.10, pin-project-lite 0.2.16, pin-project 1.1.10, prettyplease 0.2.32, proc-macro2 1.0.94, quote 1.0.40, rustc-hash 1.1.0, rustix 0.38.44, rustix 1.0.5, rustversion 1.0.20, semver 1.0.26, send_wrapper 0.6.0, serde 1.0.219, serde_derive 1.0.219, serde_json 1.0.140, syn-mid 0.6.0, syn 2.0.100, thiserror-impl 1.0.69, thiserror-impl 2.0.12, thiserror 1.0.69, thiserror 2.0.12, unicode-ident 1.0.18, utf-8 0.7.6
7518
+ ## curve25519-dalek-derive 0.1.1, adler2 2.0.0, anyhow 1.0.97, async-trait 0.1.88, atomic-waker 1.1.2, auto_enums 0.8.7, derive_utils 0.15.0, displaydoc 0.2.5, dyn-clone 1.0.19, fastrand 2.3.0, home 0.5.9, itoa 1.0.15, linkme-impl 0.3.33, linkme 0.3.33, linux-raw-sys 0.4.15, linux-raw-sys 0.9.3, minimal-lexical 0.2.1, num_enum 0.7.3, num_enum_derive 0.7.3, once_cell 1.21.3, paste 1.0.15, pin-project-internal 1.1.10, pin-project-lite 0.2.16, pin-project 1.1.10, prettyplease 0.2.32, proc-macro-crate 3.3.0, proc-macro2 1.0.94, quote 1.0.40, rustc-hash 1.1.0, rustix 0.38.44, rustix 1.0.5, rustversion 1.0.20, semver 1.0.26, send_wrapper 0.6.0, serde 1.0.219, serde_derive 1.0.219, serde_json 1.0.140, syn-mid 0.6.0, syn 2.0.100, thiserror-impl 1.0.69, thiserror-impl 2.0.12, thiserror 1.0.69, thiserror 2.0.12, unicode-ident 1.0.18, utf-8 0.7.6
7233
7519
 
7234
7520
  ```
7235
7521
  Permission is hereby granted, free of charge, to any
@@ -7258,6 +7544,30 @@ DEALINGS IN THE SOFTWARE.
7258
7544
 
7259
7545
  ```
7260
7546
 
7547
+ ## winnow 0.7.4
7548
+
7549
+ ```
7550
+ Permission is hereby granted, free of charge, to any person obtaining
7551
+ a copy of this software and associated documentation files (the
7552
+ "Software"), to deal in the Software without restriction, including
7553
+ without limitation the rights to use, copy, modify, merge, publish,
7554
+ distribute, sublicense, and/or sell copies of the Software, and to
7555
+ permit persons to whom the Software is furnished to do so, subject to
7556
+ the following conditions:
7557
+
7558
+ The above copyright notice and this permission notice shall be
7559
+ included in all copies or substantial portions of the Software.
7560
+
7561
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
7562
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
7563
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
7564
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
7565
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
7566
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
7567
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7568
+
7569
+ ```
7570
+
7261
7571
  ## android_system_properties 0.1.5
7262
7572
 
7263
7573
  ```
package/dist/index.d.ts CHANGED
@@ -25,6 +25,10 @@ export declare enum ContentHint {
25
25
  Resendable = 1,
26
26
  Implicit = 2
27
27
  }
28
+ export declare enum UsePQRatchet {
29
+ Yes = 0,
30
+ No = 1
31
+ }
28
32
  export type Uuid = string;
29
33
  export declare function hkdf(outputLength: number, keyMaterial: Buffer, label: Buffer, salt: Buffer | null): Buffer;
30
34
  export declare class ScannableFingerprint {
@@ -145,9 +149,10 @@ export declare class KyberPreKeyRecord implements SignedKyberPublicPreKey {
145
149
  export declare class SignalMessage {
146
150
  readonly _nativeHandle: Native.SignalMessage;
147
151
  private constructor();
148
- static _new(messageVersion: number, macKey: Buffer, senderRatchetKey: PublicKey, counter: number, previousCounter: number, ciphertext: Buffer, senderIdentityKey: PublicKey, receiverIdentityKey: PublicKey): SignalMessage;
152
+ static _new(messageVersion: number, macKey: Buffer, senderRatchetKey: PublicKey, counter: number, previousCounter: number, ciphertext: Buffer, senderIdentityKey: PublicKey, receiverIdentityKey: PublicKey, pqRatchet: Buffer): SignalMessage;
149
153
  static deserialize(buffer: Buffer): SignalMessage;
150
154
  body(): Buffer;
155
+ pqRatchet(): Buffer;
151
156
  counter(): number;
152
157
  messageVersion(): number;
153
158
  serialize(): Buffer;
@@ -361,10 +366,10 @@ export declare class DecryptionErrorMessage {
361
366
  deviceId(): number;
362
367
  ratchetKey(): PublicKey | undefined;
363
368
  }
364
- export declare function processPreKeyBundle(bundle: PreKeyBundle, address: ProtocolAddress, sessionStore: SessionStore, identityStore: IdentityKeyStore, now?: Date): Promise<void>;
369
+ export declare function processPreKeyBundle(bundle: PreKeyBundle, address: ProtocolAddress, sessionStore: SessionStore, identityStore: IdentityKeyStore, usePqRatchet: UsePQRatchet, now?: Date): Promise<void>;
365
370
  export declare function signalEncrypt(message: Buffer, address: ProtocolAddress, sessionStore: SessionStore, identityStore: IdentityKeyStore, now?: Date): Promise<CiphertextMessage>;
366
371
  export declare function signalDecrypt(message: SignalMessage, address: ProtocolAddress, sessionStore: SessionStore, identityStore: IdentityKeyStore): Promise<Buffer>;
367
- export declare function signalDecryptPreKey(message: PreKeySignalMessage, address: ProtocolAddress, sessionStore: SessionStore, identityStore: IdentityKeyStore, prekeyStore: PreKeyStore, signedPrekeyStore: SignedPreKeyStore, kyberPrekeyStore: KyberPreKeyStore): Promise<Buffer>;
372
+ export declare function signalDecryptPreKey(message: PreKeySignalMessage, address: ProtocolAddress, sessionStore: SessionStore, identityStore: IdentityKeyStore, prekeyStore: PreKeyStore, signedPrekeyStore: SignedPreKeyStore, kyberPrekeyStore: KyberPreKeyStore, usePqRatchet: UsePQRatchet): Promise<Buffer>;
368
373
  export declare function sealedSenderEncryptMessage(message: Buffer, address: ProtocolAddress, senderCert: SenderCertificate, sessionStore: SessionStore, identityStore: IdentityKeyStore): Promise<Buffer>;
369
374
  export declare function sealedSenderEncrypt(content: UnidentifiedSenderMessageContent, address: ProtocolAddress, identityStore: IdentityKeyStore): Promise<Buffer>;
370
375
  export type SealedSenderMultiRecipientEncryptOptions = {
@@ -377,7 +382,7 @@ export type SealedSenderMultiRecipientEncryptOptions = {
377
382
  export declare function sealedSenderMultiRecipientEncrypt(options: SealedSenderMultiRecipientEncryptOptions): Promise<Buffer>;
378
383
  export declare function sealedSenderMultiRecipientEncrypt(content: UnidentifiedSenderMessageContent, recipients: ProtocolAddress[], identityStore: IdentityKeyStore, sessionStore: SessionStore): Promise<Buffer>;
379
384
  export declare function sealedSenderMultiRecipientMessageForSingleRecipient(message: Buffer): Buffer;
380
- export declare function sealedSenderDecryptMessage(message: Buffer, trustRoot: PublicKey, timestamp: number, localE164: string | null, localUuid: string, localDeviceId: number, sessionStore: SessionStore, identityStore: IdentityKeyStore, prekeyStore: PreKeyStore, signedPrekeyStore: SignedPreKeyStore, kyberPrekeyStore: KyberPreKeyStore): Promise<SealedSenderDecryptionResult>;
385
+ export declare function sealedSenderDecryptMessage(message: Buffer, trustRoot: PublicKey, timestamp: number, localE164: string | null, localUuid: string, localDeviceId: number, sessionStore: SessionStore, identityStore: IdentityKeyStore, prekeyStore: PreKeyStore, signedPrekeyStore: SignedPreKeyStore, kyberPrekeyStore: KyberPreKeyStore, usePqRatchet: UsePQRatchet): Promise<SealedSenderDecryptionResult>;
381
386
  export declare function sealedSenderDecryptToUsmc(message: Buffer, identityStore: IdentityKeyStore): Promise<UnidentifiedSenderMessageContent>;
382
387
  export declare class Cds2Client {
383
388
  readonly _nativeHandle: Native.SgxClientState;
package/dist/index.js CHANGED
@@ -18,8 +18,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
18
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
19
  };
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.sealedSenderMultiRecipientEncrypt = exports.sealedSenderEncrypt = exports.sealedSenderEncryptMessage = exports.signalDecryptPreKey = exports.signalDecrypt = exports.signalEncrypt = exports.processPreKeyBundle = exports.DecryptionErrorMessage = exports.PlaintextContent = exports.CiphertextMessage = exports.SealedSenderDecryptionResult = exports.groupDecrypt = exports.groupEncrypt = exports.SenderKeyStore = exports.KyberPreKeyStore = exports.SignedPreKeyStore = exports.PreKeyStore = exports.IdentityKeyStore = exports.IdentityChange = exports.SessionStore = exports.UnidentifiedSenderMessageContent = exports.SenderKeyMessage = exports.processSenderKeyDistributionMessage = exports.SenderKeyDistributionMessage = exports.SenderCertificate = exports.SenderKeyRecord = exports.ServerCertificate = exports.SessionRecord = exports.PreKeySignalMessage = exports.SignalMessage = exports.KyberPreKeyRecord = exports.SignedPreKeyRecord = exports.PreKeyRecord = exports.PreKeyBundle = exports.KEMKeyPair = exports.KEMSecretKey = exports.KEMPublicKey = exports.Aes256GcmSiv = exports.Fingerprint = exports.DisplayableFingerprint = exports.ScannableFingerprint = exports.hkdf = exports.ContentHint = exports.Direction = exports.CiphertextMessageType = exports.WebpSanitizer = exports.Mp4Sanitizer = exports.Net = exports.io = exports.usernames = void 0;
22
- exports.initLogger = exports.LogLevel = exports.HsmEnclaveClient = exports.Cds2Client = exports.sealedSenderDecryptToUsmc = exports.sealedSenderDecryptMessage = exports.sealedSenderMultiRecipientMessageForSingleRecipient = void 0;
21
+ exports.sealedSenderEncrypt = exports.sealedSenderEncryptMessage = exports.signalDecryptPreKey = exports.signalDecrypt = exports.signalEncrypt = exports.processPreKeyBundle = exports.DecryptionErrorMessage = exports.PlaintextContent = exports.CiphertextMessage = exports.SealedSenderDecryptionResult = exports.groupDecrypt = exports.groupEncrypt = exports.SenderKeyStore = exports.KyberPreKeyStore = exports.SignedPreKeyStore = exports.PreKeyStore = exports.IdentityKeyStore = exports.IdentityChange = exports.SessionStore = exports.UnidentifiedSenderMessageContent = exports.SenderKeyMessage = exports.processSenderKeyDistributionMessage = exports.SenderKeyDistributionMessage = exports.SenderCertificate = exports.SenderKeyRecord = exports.ServerCertificate = exports.SessionRecord = exports.PreKeySignalMessage = exports.SignalMessage = exports.KyberPreKeyRecord = exports.SignedPreKeyRecord = exports.PreKeyRecord = exports.PreKeyBundle = exports.KEMKeyPair = exports.KEMSecretKey = exports.KEMPublicKey = exports.Aes256GcmSiv = exports.Fingerprint = exports.DisplayableFingerprint = exports.ScannableFingerprint = exports.hkdf = exports.UsePQRatchet = exports.ContentHint = exports.Direction = exports.CiphertextMessageType = exports.WebpSanitizer = exports.Mp4Sanitizer = exports.Net = exports.io = exports.usernames = void 0;
22
+ exports.initLogger = exports.LogLevel = exports.HsmEnclaveClient = exports.Cds2Client = exports.sealedSenderDecryptToUsmc = exports.sealedSenderDecryptMessage = exports.sealedSenderMultiRecipientMessageForSingleRecipient = exports.sealedSenderMultiRecipientEncrypt = void 0;
23
23
  const uuid = require("uuid");
24
24
  const Errors = require("./Errors");
25
25
  __exportStar(require("./Errors"), exports);
@@ -54,6 +54,11 @@ var ContentHint;
54
54
  ContentHint[ContentHint["Resendable"] = 1] = "Resendable";
55
55
  ContentHint[ContentHint["Implicit"] = 2] = "Implicit";
56
56
  })(ContentHint || (exports.ContentHint = ContentHint = {}));
57
+ var UsePQRatchet;
58
+ (function (UsePQRatchet) {
59
+ UsePQRatchet[UsePQRatchet["Yes"] = 0] = "Yes";
60
+ UsePQRatchet[UsePQRatchet["No"] = 1] = "No";
61
+ })(UsePQRatchet || (exports.UsePQRatchet = UsePQRatchet = {}));
57
62
  function hkdf(outputLength, keyMaterial, label, salt) {
58
63
  return Native.HKDF_DeriveSecrets(outputLength, keyMaterial, label, salt);
59
64
  }
@@ -311,8 +316,8 @@ class SignalMessage {
311
316
  constructor(handle) {
312
317
  this._nativeHandle = handle;
313
318
  }
314
- static _new(messageVersion, macKey, senderRatchetKey, counter, previousCounter, ciphertext, senderIdentityKey, receiverIdentityKey) {
315
- return new SignalMessage(Native.SignalMessage_New(messageVersion, macKey, senderRatchetKey, counter, previousCounter, ciphertext, senderIdentityKey, receiverIdentityKey));
319
+ static _new(messageVersion, macKey, senderRatchetKey, counter, previousCounter, ciphertext, senderIdentityKey, receiverIdentityKey, pqRatchet) {
320
+ return new SignalMessage(Native.SignalMessage_New(messageVersion, macKey, senderRatchetKey, counter, previousCounter, ciphertext, senderIdentityKey, receiverIdentityKey, pqRatchet));
316
321
  }
317
322
  static deserialize(buffer) {
318
323
  return new SignalMessage(Native.SignalMessage_Deserialize(buffer));
@@ -320,6 +325,9 @@ class SignalMessage {
320
325
  body() {
321
326
  return Native.SignalMessage_GetBody(this);
322
327
  }
328
+ pqRatchet() {
329
+ return Native.SignalMessage_GetPqRatchet(this);
330
+ }
323
331
  counter() {
324
332
  return Native.SignalMessage_GetCounter(this);
325
333
  }
@@ -815,8 +823,8 @@ class DecryptionErrorMessage {
815
823
  }
816
824
  }
817
825
  exports.DecryptionErrorMessage = DecryptionErrorMessage;
818
- function processPreKeyBundle(bundle, address, sessionStore, identityStore, now = new Date()) {
819
- return Native.SessionBuilder_ProcessPreKeyBundle(bundle, address, sessionStore, identityStore, now.getTime());
826
+ function processPreKeyBundle(bundle, address, sessionStore, identityStore, usePqRatchet, now = new Date()) {
827
+ return Native.SessionBuilder_ProcessPreKeyBundle(bundle, address, sessionStore, identityStore, now.getTime(), usePqRatchet == UsePQRatchet.Yes);
820
828
  }
821
829
  exports.processPreKeyBundle = processPreKeyBundle;
822
830
  async function signalEncrypt(message, address, sessionStore, identityStore, now = new Date()) {
@@ -827,8 +835,8 @@ function signalDecrypt(message, address, sessionStore, identityStore) {
827
835
  return Native.SessionCipher_DecryptSignalMessage(message, address, sessionStore, identityStore);
828
836
  }
829
837
  exports.signalDecrypt = signalDecrypt;
830
- function signalDecryptPreKey(message, address, sessionStore, identityStore, prekeyStore, signedPrekeyStore, kyberPrekeyStore) {
831
- return Native.SessionCipher_DecryptPreKeySignalMessage(message, address, sessionStore, identityStore, prekeyStore, signedPrekeyStore, kyberPrekeyStore);
838
+ function signalDecryptPreKey(message, address, sessionStore, identityStore, prekeyStore, signedPrekeyStore, kyberPrekeyStore, usePqRatchet) {
839
+ return Native.SessionCipher_DecryptPreKeySignalMessage(message, address, sessionStore, identityStore, prekeyStore, signedPrekeyStore, kyberPrekeyStore, usePqRatchet == UsePQRatchet.Yes);
832
840
  }
833
841
  exports.signalDecryptPreKey = signalDecryptPreKey;
834
842
  async function sealedSenderEncryptMessage(message, address, senderCert, sessionStore, identityStore) {
@@ -866,8 +874,8 @@ function sealedSenderMultiRecipientMessageForSingleRecipient(message) {
866
874
  return Native.SealedSender_MultiRecipientMessageForSingleRecipient(message);
867
875
  }
868
876
  exports.sealedSenderMultiRecipientMessageForSingleRecipient = sealedSenderMultiRecipientMessageForSingleRecipient;
869
- async function sealedSenderDecryptMessage(message, trustRoot, timestamp, localE164, localUuid, localDeviceId, sessionStore, identityStore, prekeyStore, signedPrekeyStore, kyberPrekeyStore) {
870
- const ssdr = await Native.SealedSender_DecryptMessage(message, trustRoot, timestamp, localE164, localUuid, localDeviceId, sessionStore, identityStore, prekeyStore, signedPrekeyStore, kyberPrekeyStore);
877
+ async function sealedSenderDecryptMessage(message, trustRoot, timestamp, localE164, localUuid, localDeviceId, sessionStore, identityStore, prekeyStore, signedPrekeyStore, kyberPrekeyStore, usePqRatchet) {
878
+ const ssdr = await Native.SealedSender_DecryptMessage(message, trustRoot, timestamp, localE164, localUuid, localDeviceId, sessionStore, identityStore, prekeyStore, signedPrekeyStore, kyberPrekeyStore, usePqRatchet == UsePQRatchet.Yes);
871
879
  return SealedSenderDecryptionResult._fromNativeHandle(ssdr);
872
880
  }
873
881
  exports.sealedSenderDecryptMessage = sealedSenderDecryptMessage;
@@ -96,7 +96,18 @@ export interface Client {
96
96
  * @returns A promise that resolves if the search succeeds and the local state has been updated
97
97
  * to reflect the latest changes. If the promise is rejected, the UI should be updated to notify
98
98
  * the user of the failure.
99
- */
99
+ *
100
+ * @throws {KeyTransparencyError} for errors related to key transparency logic, which
101
+ * includes missing required fields in the serialized data. Retrying the search without
102
+ * changing any of the arguments (including the state of the store) is unlikely to yield a
103
+ * different result.
104
+ * @throws {KeyTransparencyVerificationFailed} when it fails to
105
+ * verify the data in key transparency server response, such as an incorrect proof or a
106
+ * wrong signature.
107
+ * @throws {ChatServiceInactive} if the chat connection has been closed.
108
+ * @throws {IoError} if an error occurred while commuicating with the
109
+ * server.
110
+ * */
100
111
  search(request: Request, store: Store, options?: Readonly<Options>): Promise<void>;
101
112
  /**
102
113
  * Perform a monitor operation for an account previously searched for.
@@ -114,6 +125,17 @@ export interface Client {
114
125
  * @returns A promise that resolves if the monitor succeeds and the local state has been updated
115
126
  * to reflect the latest changes. If the promise is rejected, the UI should be updated to notify
116
127
  * the user of the failure.
128
+ *
129
+ * @throws {KeyTransparencyError} for errors related to key transparency logic, which
130
+ * includes missing required fields in the serialized data. Retrying the search without
131
+ * changing any of the arguments (including the state of the store) is unlikely to yield a
132
+ * different result.
133
+ * @throws {KeyTransparencyVerificationFailed} when it fails to
134
+ * verify the data in key transparency server response, such as an incorrect proof or a
135
+ * wrong signature.
136
+ * @throws {ChatServiceInactive} if the chat connection has been closed.
137
+ * @throws {IoError} if an error occurred while commuicating with the
138
+ * server.
117
139
  */
118
140
  monitor(request: Request, store: Store, options?: Readonly<Options>): Promise<void>;
119
141
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalapp/libsignal-client",
3
- "version": "0.73.2",
3
+ "version": "0.74.0",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",