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: let user choose an encryption algorithm for a repository #894

Closed
vitonsky opened this issue Jan 22, 2025 · 4 comments
Closed

Feature: let user choose an encryption algorithm for a repository #894

vitonsky opened this issue Jan 22, 2025 · 4 comments

Comments

@vitonsky
Copy link

The problem

Hey, i just found gocryptfs and it feels good, but as i understood gocryptfs supports only AES encryption.

That's good and fast, but it looks like gocryptfs is just yet another tool curated by CIA that let users encrypt data with a way that will be unbreakable by random people on the internet and will be easy to decrypt by government, since AES encryption is designed and selected by US government.

Known how it works and we have a lot of cases like with DES, where algorithm has been designed by government this way to make it resistant to usual people and even small groups of people since they have no enough powerful computers, but weak against resources available for government.

The key problem in gocryptfs design i see is user have no chance to choose another algorithm that would be resistent to attackers who know about weakness and backdoors in AES and have resources to attack it.

The solution

Implement alternative algorithms to encrypt data and provide some option to setup new repository with specific algorithm or even cascade of algorithms like aes->twofish->serpent or twofish->kuznyechik. You may check example with list of available algorithms in veracrypt.

In case with cascade encryption we have to use derived keys for every algorithm.
This feature would allow users to choose encryption they trust in.

I think implementation must not be difficult, since we have to just implement new variant of cipher with the same interface.

Custom algorithm probably will have worsen performance than AES, but that's not a problem for people who concerned about security over performance.

Usage could looks like that:

  • gocryptfs --init --cipher twofish
  • gocryptfs --init --cipher twofish,serpent
  • gocryptfs --init --cipher aes,kuznyechik,serpent

Information about used algorithm would be added to config file in repository

@rfjakob
Copy link
Owner

rfjakob commented Jan 23, 2025

Hi, you can use

Here, XChaCha20-Poly1305 does not use AES at all.

@rfjakob rfjakob closed this as completed Jan 23, 2025
@vitonsky
Copy link
Author

@rfjakob i don't see in docs any information about how to use twofish cipher, serpent or at least kuznyechik.

Also, there are no info about cascade cipher modes

@rfjakob
Copy link
Owner

rfjakob commented Jan 24, 2025 via email

@vitonsky
Copy link
Author

What you think about add some ciphers (at least those i listed above) and maybe even cascade encryption mode? I've created another issue about it #895

gocryptfs looks interesting, but for me as user it is suspicious why i can use only encryption algorithms that in wide use nowadays and there even a lot of hardware to accelerate its performance (it works to attackers too) but i can't choose alternative, that i trust in.

If you have at least 2 encryption implementation (maybe 3 if count another AES mode), then we have to just find another ciphers implementation for golang, implement some bindings for gocryptfs and provide option to use new algorithms.

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

2 participants