Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please review #59

Merged
merged 12 commits into from
Oct 28, 2018
Merged
Prev Previous commit
Next Next commit
Implement EdDSA signature algorithm support via Chaos.NaCl
  • Loading branch information
aseigler committed Oct 19, 2018
commit fd9413cc52cefe7a466a0137181f7625d7a43dc5
6 changes: 6 additions & 0 deletions fido2-net-lib.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Chaos.NaCl", "Chaos.NaCl\Chaos.NaCl.csproj", "{AE28FD14-7985-4707-A963-C94B8597AE50}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -32,6 +34,10 @@ Global
{06E82E3F-C626-4070-98BB-6D307DA86AC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{06E82E3F-C626-4070-98BB-6D307DA86AC2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{06E82E3F-C626-4070-98BB-6D307DA86AC2}.Release|Any CPU.Build.0 = Release|Any CPU
{AE28FD14-7985-4707-A963-C94B8597AE50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE28FD14-7985-4707-A963-C94B8597AE50}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE28FD14-7985-4707-A963-C94B8597AE50}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE28FD14-7985-4707-A963-C94B8597AE50}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion fido2-net-lib/AuthDataHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static bool VerifySigWithCoseKey(byte[] data, PeterO.Cbor.CBORObject cose
switch (crv) // https://www.iana.org/assignments/cose/cose.xhtml#elliptic-curves
{
case 6:
throw new Fido2VerificationException("ALG_SIGN_ED25519_EDDSA_SHA512_RAW support not yet implmented");
return Chaos.NaCl.Ed25519.Verify(sig, GetHasher(HashAlgorithmName.SHA512).ComputeHash(data), coseKey[PeterO.Cbor.CBORObject.FromObject(-2)].GetByteString());
default:
throw new ArgumentOutOfRangeException("crv");
}
Expand Down
6 changes: 5 additions & 1 deletion fido2-net-lib/Fido2NetLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.2.4" />
<PackageReference Include="System.Memory" Version="4.5.1" />
<PackageReference Include="System.Security.Cryptography.Cng" Version="4.5.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Chaos.NaCl\Chaos.NaCl.csproj" />
</ItemGroup>

</Project>