1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 05:00:19 -05:00

Merge branch 'innovation/opaque-prelogin' of github.com:bitwarden/server into innovation/opaque-prelogin

This commit is contained in:
Bernd Schoolmann 2025-03-18 13:45:56 +01:00
commit ff83735b20
No known key found for this signature in database
3 changed files with 20 additions and 8 deletions

View File

@ -20,16 +20,25 @@ public class CipherConfiguration
[Required]
public Argon2KsfParameters Argon2Parameters { get; set; }
public Bitwarden.OPAQUE.CipherConfiguration ToNativeConfiguration()
public Bitwarden.Opaque.CipherConfiguration ToNativeConfiguration()
{
if (CipherSuite == OpaqueKe3Ristretto3DHArgonSuite)
{
return new Bitwarden.OPAQUE.CipherConfiguration
return new Bitwarden.Opaque.CipherConfiguration
{
OprfCS = Bitwarden.OPAQUE.OprfCS.Ristretto255,
KeGroup = Bitwarden.OPAQUE.KeGroup.Ristretto255,
KeyExchange = Bitwarden.OPAQUE.KeyExchange.TripleDH,
KSF = new Bitwarden.OPAQUE.Argon2id(Argon2Parameters.Iterations, Argon2Parameters.Memory, Argon2Parameters.Parallelism)
OprfCs = Bitwarden.Opaque.OprfCs.Ristretto255,
KeGroup = Bitwarden.Opaque.KeGroup.Ristretto255,
KeyExchange = Bitwarden.Opaque.KeyExchange.TripleDH,
Ksf = new Bitwarden.Opaque.Ksf
{
Algorithm = Bitwarden.Opaque.KsfAlgorithm.Argon2id,
Parameters = new Bitwarden.Opaque.KsfParameters
{
Iterations = Argon2Parameters.Iterations,
Memory = Argon2Parameters.Memory,
Parallelism = Argon2Parameters.Parallelism
}
}
};
}
else

View File

@ -7,7 +7,7 @@ using Bit.Core.Auth.Models.Data;
using Bit.Core.Auth.Repositories;
using Bit.Core.Entities;
using Bit.Core.Repositories;
using Bitwarden.OPAQUE;
using Bitwarden.Opaque;
using Microsoft.Extensions.Caching.Distributed;
namespace Bit.Core.Auth.Services;

View File

@ -32,6 +32,7 @@
<PackageReference Include="Azure.Storage.Blobs" Version="12.21.2" />
<PackageReference Include="Azure.Storage.Queues" Version="12.19.1" />
<PackageReference Include="BitPay.Light" Version="1.0.1907" />
<PackageReference Include="Bitwarden.Opaque" Version="0.0.1-beta.1" />
<PackageReference Include="DuoUniversal" Version="1.2.5" />
<PackageReference Include="DnsClient" Version="1.8.0" />
<PackageReference Include="Fido2.AspNet" Version="3.0.1" />
@ -78,7 +79,9 @@
<Folder Include="Properties\" />
</ItemGroup>
<!--
<ItemGroup>
<ProjectReference Include="../../../dotnet-extensions/extensions/Bitwarden.OPAQUE/src/Bitwarden.OPAQUE.csproj" />
<ProjectReference Include="../../../dotnet-extensions/extensions/Bitwarden.Opaque/src/Bitwarden.Opaque.csproj" />
</ItemGroup>
-->
</Project>