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

[feature request]: Add secure key storage and retrieval. #82

Open
1 task done
maythamfahmi opened this issue Oct 17, 2024 · 8 comments
Open
1 task done

[feature request]: Add secure key storage and retrieval. #82

maythamfahmi opened this issue Oct 17, 2024 · 8 comments
Labels
enhancement New feature or request Extensions Package

Comments

@maythamfahmi
Copy link
Collaborator

maythamfahmi commented Oct 17, 2024

Contact Details

No response

Is your feature request related to a problem? Please describe.

Add secure key storage and retrieval.

Describe the solution you'd like

Add secure key storage and retrieval.

Describe alternatives you've considered

No response

Additional context

No response

Priority Level

Medium

Code of Conduct

  • I agree to follow this project's Code of Conduct
@maythamfahmi maythamfahmi added the enhancement New feature or request label Oct 17, 2024
@maythamfahmi maythamfahmi self-assigned this Oct 17, 2024
@maythamfahmi maythamfahmi added the version3.0.0-preview001 CryptoNet Version 3 label Oct 17, 2024
@maythamfahmi maythamfahmi removed their assignment Oct 17, 2024
@maythamfahmi
Copy link
Collaborator Author

maythamfahmi commented Nov 2, 2024

@jwdonahue any suggestion how to approch this? as you have suggested this feature.

@jwdonahue
Copy link
Collaborator

jwdonahue commented Nov 3, 2024

If there isn't an existing portable, secure key storage scheme, then we should design one. More research required. I think I stopped looking when the one thing I originally thought might work, turned out to be a Windows only kind of thing.

Requirements:

  1. Dotnet 8+ (portable), preferably C#, but C++ with a C# native library wrapper would be acceptable..
  2. Salted + Encrypted at rest.
  3. Secure RAM/Flash, where available, when not at rest.
  4. Optional USB key support.

I am not a trained security expert, so we should try to enlist one of those, if possible. I am fairly good at doing research, and this is an area I am interested in, but I am sure I can find as many ways to screw it up as get it right. There's probably lots of patent pitfalls in this area as well.


  1. Some kind of cloud support (Azure/AWS) is probably a good idea, but it should absolutely allow for local, non-cloud/subscription support.

@jwdonahue
Copy link
Collaborator

It's been years since I did a deep dive, but my recollection is that there are different levels of hardware support, for key storage and encryption schemes, across all the dotnet platforms. We should survey what is out there now, and if we can't find support for all five of those requirements, we should see if it would not be possible to come up with a reasonable interface/abstraction, and then start implementing for each target (if that's what is required).

@jwdonahue
Copy link
Collaborator

To be clear, either we do it the right way, or remove all private key storage and retrieval bits from the code base. We should NOT promote any kind of insecure private key storage or exchange mechanisms. The library may be useful enough by simply encapsulating some of the common encryption mechanisms.

@maythamfahmi
Copy link
Collaborator Author

The question is like any other secret management, is it the libaray responsiblit to take care of secret? in real world I would not save secret as plan text, I would consider saving it in key vault. With that said, if you have idea come with it and we see how we could approch it. I was thinkin we are already having an AES encryption, we could use the libaray our encryption to encrypt own key. but buttom line some one need to remember the secret of encrypiton and decryption.

@maythamfahmi
Copy link
Collaborator Author

maythamfahmi commented Dec 1, 2024

@jwdonahue all issues is done expect this one, I was thinking we should make aware of that safing key need to be done in a secure storage like Key Vault or similar technology, Another way, I was thinking of using our AES encryption to encrypt the keys in storage, but that requires the user to have a unique secret to encrypt and decrypt the keys? what do you think?

If we do not find a solutio, we could evently postpone it to 3.0.1 release.

@jwdonahue
Copy link
Collaborator

I have not had time to follow up on this.

@maythamfahmi
Copy link
Collaborator Author

no worries, I am finding a posible solution :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Extensions Package
Projects
None yet
Development

No branches or pull requests

2 participants