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

Dependencies Inferno on will fail if not on windows and on supported .net versions #15

Open
PeterPann23 opened this issue Mar 11, 2022 · 15 comments

Comments

@PeterPann23
Copy link

Inferno
the recommendation to use H.Formatters.Inferno will fail as the method of encryption is deprecated.

@HavenDV
Copy link
Owner

HavenDV commented Mar 11, 2022

I don't know much about cryptography, please check these links. I would also appreciate @zbalkan if he comments on this.
#1
#11
#12

@zbalkan
Copy link
Contributor

zbalkan commented Mar 11, 2022

I cloned the solution in a new computer and it did not build at all. The dependencies problem is something and more general. I'll investigate it. I have dotnet 5.0 and 6,0 installed and got the errors. Now trying to install the latest 4.x use in projects. It is 4.7.2 in Ceras and the others are previous versions.

@HavenDV
Copy link
Owner

HavenDV commented Mar 11, 2022

The project uses .Net 4.5.1 as the minimum supported framework, it needs to be installed explicitly (VS2022 does not install it automatically)

@PeterPann23
Copy link
Author

PeterPann23 commented Mar 11, 2022 via email

@HavenDV
Copy link
Owner

HavenDV commented Mar 11, 2022

Neither do the installed client machines

Sorry this was only addressed to @zbalkan . This does not apply to those who use the library.

@zbalkan
Copy link
Contributor

zbalkan commented Mar 11, 2022

Ok, @PeterPann23 , can you please detail the issue you posted?

@PeterPann23
Copy link
Author

the NuGet package compiles, the distributed application will not... depending on the client machines config, also you close the connection on errors without saying why, perhaps have a look at the [SupportedOSPlatform("windows")]

@HavenDV
Copy link
Owner

HavenDV commented Mar 12, 2022

also you close the connection on errors without saying why

For now, exceptions will be shown via:

Debug.WriteLine($"{nameof(EnableEncryption)} returns exception: {exception}");

I can add a callback that will return exceptions.

@HavenDV
Copy link
Owner

HavenDV commented Mar 12, 2022

I added the possibility of additional exception handling when calling EnableEncryption:
ec5267d

@HavenDV
Copy link
Owner

HavenDV commented Mar 12, 2022

As for the rest of the problems - I need something specific - error messages or a project to reproduce.

@HavenDV
Copy link
Owner

HavenDV commented Mar 12, 2022

I have also added a warning to the README.
image

Also, I marked EnableEncryption with System.Runtime.Versioning.SupportedOSPlatform(windows) because CngKey.Import is only available for windows platforms.
@zbalkan do you know any cross platform alternatives for this? You can see the current errors by removing SupportedOSPlatform from the H.Formatters.Inferno project

@zbalkan
Copy link
Contributor

zbalkan commented Mar 12, 2022

There are candidates like nsec, Bouncy Castle or System.Security.Cryptography namespace . But they have different runtime requirements. I can give each of them a shot and see what we can get.

@HavenDV
Copy link
Owner

HavenDV commented Mar 12, 2022

I also checked the Inferno research for compatibility and did a PR for them.
sdrapkin/SecurityDriven.Inferno#40

CngKeyExtensions.CreateNewDhmKey and GetSharedDhmSecret also windows-only.

@HavenDV
Copy link
Owner

HavenDV commented Mar 12, 2022

There are candidates like nsec, Bouncy Castle or System.Security.Cryptography namespace . But they have different runtime requirements. I can give each of them a shot and see what we can get.

System.Security.Cryptography would be the best candidate and would look the best if it were possible to use it.

P.S. If you do this, please create a new project like the Inferno project and do any experiments there.

@zbalkan
Copy link
Contributor

zbalkan commented Mar 13, 2022

I made some experiments. Currently, I plan to make a PR just to add a README for Inferno that mentions the dependencies and limitations. And another PR with a new project with a demo using System.Security.Cryptography. Yet, it will take time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants