-
-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ElementR: Add
CryptoApi#bootstrapSecretStorage
(#3483)
* Add WIP bootstrapSecretStorage * Add new test if `createSecretStorageKey` is not set * Remove old comments * Add docs for `crypto-api.bootstrapSecretStorage` * Remove default parameter for `createSecretStorageKey` * Move `bootstrapSecretStorage` next to `isSecretStorageReady` * Deprecate `bootstrapSecretStorage` in `MatrixClient` * Update documentations * Raise error if missing `keyInfo` * Update behavior around `setupNewSecretStorage` * Move `ICreateSecretStorageOpts` to `rust-crypto` * Move `ICryptoCallbacks` to `rust-crypto` * Update `bootstrapSecretStorage` documentation * Add partial `CryptoCallbacks` documentation * Fix typo * Review changes * Review changes
- Loading branch information
1 parent
8df4be0
commit 49f1157
Showing
11 changed files
with
365 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
Copyright 2023 The Matrix.org Foundation C.I.C. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
import { ISigned } from "../@types/signed"; | ||
|
||
export interface Curve25519AuthData { | ||
public_key: string; | ||
private_key_salt?: string; | ||
private_key_iterations?: number; | ||
private_key_bits?: number; | ||
} | ||
|
||
export interface Aes256AuthData { | ||
iv: string; | ||
mac: string; | ||
private_key_salt?: string; | ||
private_key_iterations?: number; | ||
} | ||
|
||
/** | ||
* Extra info of a recovery key | ||
*/ | ||
export interface KeyBackupInfo { | ||
algorithm: string; | ||
auth_data: ISigned & (Curve25519AuthData | Aes256AuthData); | ||
count?: number; | ||
etag?: string; | ||
version?: string; // number contained within | ||
} |
Oops, something went wrong.