-
-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move crypto/key_passphrase.ts
to crypto-api/key-passphrase.ts
#4401
Move crypto/key_passphrase.ts
to crypto-api/key-passphrase.ts
#4401
Conversation
Sorry, back to draft I pushed the wrong button. |
9640cfd
to
d7f433e
Compare
I tried to add documentation but my knowledge around crypto is not enough. Maybe @andybalaam or @richvdh can give me a hand on it? Thanks! |
rypto/key_passphrase.ts
to crypto-api/key-passphrase.ts
crypto/key_passphrase.ts
to crypto-api/key-passphrase.ts
d7f433e
to
c542099
Compare
8876e25
to
e1cc2d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These methods are all about deriving a recovery or backup key from a passphrase; the relevant spec is https://spec.matrix.org/v1.11/client-server-api/#deriving-keys-from-passphrases.
…ey-passphrase # Conflicts: # src/client.ts # src/crypto-api/index.ts # src/crypto/backup.ts # src/crypto/index.ts # src/rust-crypto/rust-crypto.ts
553ec16
to
8386415
Compare
8386415
to
81f91c7
Compare
81f91c7
to
1d99bc4
Compare
b8b5a5b
to
bf5ccb8
Compare
- Call `deriveRecoveryKeyFromPassphrase` into `RustCrypto.createRecoveryKeyFromPassphrase` instead of using `keyFromPassphrase`
bf5ccb8
to
8845de9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than a few nits
src/common-crypto/key-passphrase.ts
Outdated
* Derive a backup key from a passphrase using the salt and iterations from the auth data. | ||
* @param authData - The auth data containing the salt and iterations | ||
* @param passphrase - The passphrase to derive the key from | ||
* @deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @deprecated | |
* | |
* @deprecated Deriving a backup key from a passphrase is not part of the matrix spec. | |
* Instead, a random key is generated and stored/shared via 4S. |
Checklist
public
/exported
symbols have accurate TSDoc documentation.Task element-hq/element-web#26922
Changes:
keyFromAuthData
tocommon-crypto
and deprecates it. It should be deleted but it's still used.deriveKey
intocrypto-api
and renamed intoderiveRecoveryKeyFromPassphrase
MatrixClient.keyBackupKeyFromPassword