Add cryptographic session key management for users

Introduces a new cryptographic key management system for user sessions, including models, DTOs, interfaces, and services for handling identity keys, signed pre-keys, and one-time pre-keys. Updates the SessionKeysController and DI configuration to use the new services. Adds related EF Core configurations and migrations, and updates the UserSession model to reference the new UserCryptoSession. Removes the obsolete ISessionKeyService interface.
This commit is contained in:
Artemy
2025-07-30 21:26:35 +07:00
parent dc560ba698
commit 1d442d037c
27 changed files with 1608 additions and 83 deletions
@@ -0,0 +1,6 @@
namespace Govor.Contracts.Requests;
public class RotateOneTimePreKeysRequest
{
public ICollection<byte[]> NewOneTimePreKeys { get; set; } = new List<byte[]>();
}
@@ -2,6 +2,8 @@ namespace Govor.Contracts.Requests;
public class UploadKeysRequest
{
public string PublicEncryptionKey { get; set; }
public string PublicSigningKey { get; set; }
public byte[] IdentityKey { get; set; }
public byte[] SignedPreKey { get; set; }
public byte[] SignedPreKeySignature { get; set; }
public List<byte[]> OneTimePreKeys { get; set; } = new();
}