Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
//-----------------------------------------------------------------------
// <copyright file="PasswordChangeRequest.cs" company="aliasvault">
// Copyright (c) aliasvault. All rights reserved.
// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.
// </copyright>
//-----------------------------------------------------------------------
namespace AliasVault.Shared.Models.WebApi.V2.Auth;
/// <summary>
/// Request for POST /v2/Auth/change-password. Carries the new SRP credentials plus the Account Key
/// re-encrypted with the KEK derived from the new password's unlock key.
/// </summary>
public class PasswordChangeRequest
{
/// <summary>Gets or sets the client's public ephemeral for the SRP proof of the current password.</summary>
public required string CurrentClientPublicEphemeral { get; set; }
/// <summary>Gets or sets the client's session proof for the SRP proof of the current password.</summary>
public required string CurrentClientSessionProof { get; set; }
/// <summary>Gets or sets the new unlock key derivation salt.</summary>
public required string NewPasswordSalt { get; set; }
/// <summary>Gets or sets the new SRP verifier.</summary>
public required string NewPasswordVerifier { get; set; }
/// <summary>Gets or sets the Account Key rewrapped with the KEK derived from the new password. The VEK,
/// account keypair and grants are untouched by a password change.</summary>
public required string NewEncryptedAccountKey { get; set; }
/// <summary>Gets or sets the algorithm of <see cref="NewEncryptedAccountKey"/>, as a VaultKeyAlgorithm token.</summary>
public required string NewEncryptedAccountKeyAlgorithm { get; set; }
/// <summary>Gets or sets the KDF type the client derived the new unlock key with.</summary>
public required string NewEncryptionType { get; set; }
/// <summary>Gets or sets the KDF settings JSON the client derived the new unlock key with.</summary>
public required string NewEncryptionSettings { get; set; }
}