HomePhabricator
Diffusion Comm 56be0a1c5e98

[identity] Add types for Ed25519-signed nonce challenge

Description

[identity] Add types for Ed25519-signed nonce challenge

Summary:
For the "Existing Device Login" (5.3.6), we want to introduce the challenge-response approach to protect from replay attacks.
We agreed to re-use nonces from the GenerateNonce RPC which is currently used for wallet login/registration.

This diff introduces types for verifying if the nonce is properly signed by the client using Olm account (ed25519).
The code is similiar to what we do for verifying keyserver messages for reserved usernames.

Test Plan: Added unit test, the data comes from D11037 test plan

Reviewers: varun, michal

Reviewed By: varun

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D11073

Details

Provenance
bartekAuthored on Feb 14 2024, 4:30 AM
Reviewer
varun
Differential Revision
D11073: [identity] Add types for Ed25519-signed nonce challenge
Parents
rCOMM71e367ae06b1: [identity] Extract function to verify nonce
Branches
Unknown
Tags
Unknown