mirror of
https://github.com/Govor-team/Govor.git
synced 2026-11-17 04:58:46 +00:00
Add SRP password recovery and E2EE reset
Add proof-based password registration, login, enrollment, and change flows, with rate limiting and encrypted recovery-key envelopes. Support explicit E2EE identity resets while preserving historical signer verification, and document and test the new recovery workflows.
This commit is contained in:
@@ -49,6 +49,11 @@ public static class E2eeRecoveryProtocol
|
||||
public static string AccountFingerprint(string identity) =>
|
||||
Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes("govor-account-v1\n" + identity)));
|
||||
|
||||
public static string SignAccountPayload(string privateIdentity, byte[] data)
|
||||
{ using var key = PrivateIdentity(privateIdentity); return Sign(key, data); }
|
||||
public static void VerifyAccountPayload(string publicIdentity, byte[] data, string signature)
|
||||
{ using var key = PublicIdentityKey(publicIdentity); Verify(key, data, signature); }
|
||||
|
||||
public static DeviceKey Certify(DeviceKey device, string privateIdentity, long generation = 0,
|
||||
string? previousFingerprint = null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user