ego icon indicating copy to clipboard operation
ego copied to clipboard

File encryption

Open boudo opened this issue 3 years ago • 9 comments

ego

Hi, Can I encrypt the test.txt file with EGo so that it is only accessible through the enclave or can I put it directly in the enclave?

boudo avatar Mar 23 '21 12:03 boudo

Hi, yes, you can encrypt the data before writing it to the file with the SealWith... functions from https://pkg.go.dev/github.com/edgelesssys/ego/ecrypto. This will use the SGX seal key, so it can only be decrypted by the enclave. One of the next versions of EGo will include an in-enclave-memory filesystem. Then you can put it directly in the enclave. You can already achieve this manually by using the MemMapFs from https://github.com/spf13/afero.

thomasten avatar Mar 23 '21 12:03 thomasten

Hi, Thank you. I tested with SealWith... functions and also with afero, everything works fine. For one of the next versions of EGo, we must understand that there will be a configuration file that allows to tell EGo to put the test.txt file in the enclave without modifying the source code of the application?

boudo avatar Mar 24 '21 14:03 boudo

For one of the next versions of EGo, we must understand that there will be a configuration file that allows to tell EGo to put the test.txt file in the enclave without modifying the source code of the application?

Yes, that will be possible. There is already a brief documentation how this will work: https://github.com/edgelesssys/ego/blob/master/doc/ego_cli.md#enclave-configuration-file So you will be able to mount some paths as memfs and writing to these will never leave the enclave.

thomasten avatar Mar 24 '21 15:03 thomasten

Great, thank you for your answers. It is very interesting.

boudo avatar Mar 24 '21 16:03 boudo

@boudo The memfs feature is now available in v0.2

thomasten avatar Apr 21 '21 11:04 thomasten

Hi @thomasten, I suppose that the next version will support data sealing for hostfs without modifying the application code ?

boudo avatar May 03 '21 14:05 boudo

Yes, we plan to add this feature, but don't have an ETA yet.

thomasten avatar May 03 '21 15:05 thomasten

@thomasten Is there an ETA yet for data sealing for hostfs without modifying the application code ?

fnerdman avatar Oct 15 '22 09:10 fnerdman

@lead4good unfortunately no. It's not being worked on and not scheduled for the near future.

thomasten avatar Oct 16 '22 13:10 thomasten