-
Notifications
You must be signed in to change notification settings - Fork 262
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
gocryptfs for Windows - Cross-platform support #6
Comments
IDK if this helps; https://github.com/dokan-dev/dokany Totally unrelated, just happen to see that project the other day |
Dokany sounds good for many fs deficiencies on Windows! |
Dokany looks good. It even has a FUSE layer: https://github.com/dokan-dev/dokany/wiki/FUSE |
Hi everyone, I am one of the maintainers of Dokany. (I don't have Go knowledge so I cannot do the 'port' my self) |
Hello, I have implemented the gocryptfs filesystem in a C++ application for Windows using Dokany. https://github.com/bailey27/cppcryptfs I'd like to thank rfjakob for making such clear and complete design documents for gocyptfs. It has been a pleasure working from them. |
Very cool @bailey27, will try this ASAP PS: You should make some releases |
Thanks for wanting to try it out. Please let me know if you have any issues building or using it. I want to wait until cppcryptfs has gained some maturity before doing any binary releases. |
Wow, awesome work! Congratulations for getting this done!
|
Thanks. I wanted to make the gocryptfs software itself work with Dokany or Dokan Fuse, but I decided it would be too risky for me. I barely know anything about go, and I was worried about having to code and debug in an unfamiliar environment. Thank you again for making such a well-designed and well-documented filesystem. |
@rfjakob , I would like to ask you if you think my "volume label" feature in cppcryptfs is designed correctly (cryptographically). When cppcryptfs saves the Windows volume label, it converts it from unicode-16 to utf-8 and then encrypts it with the master key using AES256-GCM with a 128-bit random iv and 8 zero bytes of auth data and then base64-encodes it and saves it in gocryptfs conf (in "VolumeName"). Does that sound OK? |
Yes, that looks fine! |
@rfjakob , Thanks. I've dropped support for CBC now. I require GCMIV128 as well. |
@bailey27 I have added AES-SIV (RFC5297) support in gocryptfs v1.1. AES-SIV does not need unique nonces, and I needed that to implement reverse mode, where I cannot use random nonces. It's not a default mode and will probably be rarely used for now, but if you want to add it to cppcryptfs, the feature flag is called No changes for filenames. As always, an example filesytem for testing is available in the |
@rfjakob , Thanks for the heads-up. I have just now added code for detecting the AESSIV flag and displaying an error message if it is found. I don't currently have a need for reverse mode. So I don't know if or when I will implement one in cppcryptfs. But if I do a reverse mode, then I will try to implement AES-SIV. |
@bailey27 Reverse mode is great for doing encrypted backups with rsync. Anything that you would have unencrypted locally and only encrypt for storing it remotely. It's a really great feature. |
@xelra , I see how reverse mode would be useful. I am looking at existing C implementations of AES-SIV. |
Botan ( https://github.com/randombit/botan ) seems to have it. But that's a pretty big library just for AES-SIV. |
@rfjakob , Thanks for pointing out Botan. I think it is too big. If I used it, then I think I might as well stop using openssl and use Botan for everything, which I don't want to do. I think I'll just lift the AES-SIV code from a project that has a permissive license and put it in cppcryptfs. I think that isn't the ideal way to use code from other projects, but it does reduce the number of dependencies. I could try to lift it from Botan, but the Botan code seems to depend on the rest of Botan too much. There's a Ruby extension for aes-siv written in C and on top of openssl, but it's GPL. There's also aes-siv code in wpa_supplicant, which is BSD. I also found this one https://github.com/arktronic/aes-siv which has a permissive license. It seems to work (it passes the test vectors). The project itself doesn't build a library, but instead an executable which is the test program. I think I'll use the siv and ctr code from it, but use the basic AES primitives from openssl instead of the ones that come with the project. |
AESSIV is working in cppcryptfs. I hope to get started on reverse mode soon. |
Wow, awesome! |
I think due to the fact that cppcryptfs exists and is well-maintained we can call this issue fixed 👍 |
@rfjakob I am finding this issue somewhat late as it looks like you just closed it. I am the author of WinFsp which is a FUSE solution for Windows and cgofuse which is a cross-platform FUSE library for Go, with OSX, Linux and Windows support. WinFsp and cgofuse have already been used to port rclone mount to Windows. If you are still interested in a Windows port I would be glad to help. Caveats:
I understand that these are some hard caveats and you are probably unwilling to choose such a route. However if you decide to go ahead you can count on my support. |
Congratulation again to @bailey27 for porting cryptfs to windows and maintaining cppcryptfs perfectly ! |
@billziss-gh I have noticed WinFsp when you have mentioned it over at cppcryptfs. I love the emphasis you put on testing and the work you have done there. The project looks excellent. For gocryptfs, I don't think I'll want to swap out the FUSE library. go-fuse is very stable now, but the distinct advantage is that it is all-Go, which means gocryptfs can compile ( |
@rfjakob thank you for the kind words re: WinFsp. I agree on the importance of testing and note that gocryptfs is already very well tested. Great work.
I actually agree. Cgofuse introduces some hard requirements and dependencies, which I am not happy about. I would love to find a better way to get cross-platform FUSE support on Go without the cgo requirement. |
Because it's Go, could it be made to run on Windows as well? (Cross-platform support is an attractive feature.)
See discussion here #2 (comment) and here #2 (comment)
The text was updated successfully, but these errors were encountered: