Skip to content

Add secure memory #2

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

Open
4 tasks
stkptr opened this issue Apr 14, 2024 · 0 comments
Open
4 tasks

Add secure memory #2

stkptr opened this issue Apr 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@stkptr
Copy link
Owner

stkptr commented Apr 14, 2024

libsodium provides utilities for handling "secure" memory, that is, utilities for sanity checking memory and ensuring it's overwritten with random data so that functions within the process are less likely to stumble upon keys.

Secure memory could be implemented, but it's uncertain whether there would be many guarantees on its behavior.

  • Evaluate whether or not secure memory can actually be kept by Godot (References should suffice)
  • Add a subclass of PackedByteArray, SecureBytes/SecureByteArray, which stores all data in libsodium secure memory
  • Add secure memory versions of the GDSodiumType classes
  • Add versions of every API which stores the output in an existing PackedByteArray or subclass

The procedure for using secure memory would then be very similar to using it in libsodium, but with less boilerplate.

var smem = GDSodiumSecureMemory.create(GDSodiumAEAD.CHACHA20_IETF_KEY_SIZE)
GDSodiumAEAD.chacha20_ietf_generate_key_in(smem)
smem.clear()
@stkptr stkptr added the enhancement New feature or request label Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant