fix sals for vault #8
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
src/vault/keyspace
this module should work in webassembly and native, there seems to be issues with how we do it
we also need to add symmetric encryption/decryption
src/vault/symmetric is wrong, should be linked to the secret of the keyspace, so its trivial for a user to do the encryption/decryption, prob implemented in the keyspace
the original intent can be seen in https://git.ourworld.tf/herocode/webassembly
see branch 'origin/rework', see start.sh and webbrowser example (there is still bug)
this needs all to be ported to keyspace
src/vault/kvs
compilation should change depending which platform we compile for
src/vault/ethereum
Compiling for wasm is hard in the current codebase as there are a lot of dependencies, some of which just don't work on wasm. To fix this, I'm moving the vault code to a separate module (created a workspace), to limit the dependency tree involved in the vault and to be able to provide a clean minimal isolated API.
Additionally, add rewrite the implementations for (a)symmetric encryption and signing manually, since the existing ones are broken/feature blaring security holes.
Code is on branch development_lee. There is 1 Vault type, which is the entry point. A vault can open a keyspace with a password. The password is used to derive a symmetric encryption key using pbkdf2 with a custom salt at 100000 rounds (now is the time to reduce this is this is deemed too much). In the keyspace generic
Key
's are saved, which can be upcast into the correct types (symmetric, asymmetric, and signing keys). The existing algorithms have been used for this (ChaCha20Poly1305 AEAD encryption for symmetric, secp256k1 ecdh for asymmetric key exchange which derives a symmetric key using the afforementioned ChaCha20Poly1305, and secp256k1 ECDSA for signing).Code works on both native (using tokio, requires feature
native
) and wasm (requires featurewasm
). The type is the same for all platforms, and it's a struct, so no trait and generics are needed. The database layers are done by sameh in https://git.ourworld.tf/samehabouelsaad/sal-modular. As I understand from our talk he will also work on the ethereum part.