[GH-ISSUE #718] Client-side encryption #408

Open
opened 2026-03-04 01:45:15 +03:00 by kerem · 9 comments
Owner

Originally created by @JamesB7 on GitHub (Feb 15, 2018).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/718

Hello,

Could you please consider supporting client-side encryption? ( https://docs.aws.amazon.com/general/latest/gr/aws_sdk_cryptography.html ) This would allow not sharing the encryption keys with Amazon.

Thank you!

James

Originally created by @JamesB7 on GitHub (Feb 15, 2018). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/718 Hello, Could you please consider supporting client-side encryption? ( https://docs.aws.amazon.com/general/latest/gr/aws_sdk_cryptography.html ) This would allow not sharing the encryption keys with Amazon. Thank you! James
Author
Owner

@sqlbot commented on GitHub (Feb 15, 2018):

Note that client-side encryption is not actually a feature of the S3 service itself -- it's actually a feature provided by a subset of the official AWS SDKs, none of which are used by s3fs-fuse.

<!-- gh-comment-id:365930294 --> @sqlbot commented on GitHub (Feb 15, 2018): Note that client-side encryption is not actually a feature of the S3 service itself -- it's actually a feature provided by a subset of the official AWS SDKs, none of which are used by s3fs-fuse.
Author
Owner

@maximpichler commented on GitHub (Jul 15, 2018):

Even though it's not an S3 feature, it would be very useful. Or are there other ways to do this?

<!-- gh-comment-id:405076131 --> @maximpichler commented on GitHub (Jul 15, 2018): Even though it's not an S3 feature, it would be very useful. Or are there other ways to do this?
Author
Owner

@gaul commented on GitHub (Oct 17, 2019):

An s3fs fork implements this:

https://github.com/hellochrisyou/S3FS_OpenSSL_RC4_MD5

However I think we should align with the AWS implementation to allow interoperability:

https://github.com/gaul/s3proxy/pull/296#issuecomment-530817114

<!-- gh-comment-id:543376060 --> @gaul commented on GitHub (Oct 17, 2019): An s3fs fork implements this: https://github.com/hellochrisyou/S3FS_OpenSSL_RC4_MD5 However I think we should align with the AWS implementation to allow interoperability: https://github.com/gaul/s3proxy/pull/296#issuecomment-530817114
Author
Owner

@jopdorp commented on GitHub (Jul 28, 2022):

client side encryption would be a great feature.

<!-- gh-comment-id:1197892628 --> @jopdorp commented on GitHub (Jul 28, 2022): client side encryption would be a great feature.
Author
Owner

@rebelga commented on GitHub (Apr 5, 2023):

It's a big issue for me and why I can't use this currently. Without client side encryption, my data would be too exposed. Interoperability with AWS S3 SDK is not at all important to me, just S3FS interoperability across S3 providers.

<!-- gh-comment-id:1497959833 --> @rebelga commented on GitHub (Apr 5, 2023): It's a big issue for me and why I can't use this currently. Without client side encryption, my data would be too exposed. Interoperability with AWS S3 SDK is not at all important to me, just S3FS interoperability across S3 providers.
Author
Owner

@gaul commented on GitHub (Apr 6, 2023):

@rebelga You can work around this with S3Proxy using the encryption middleware: https://github.com/gaul/s3proxy/pull/398. As for s3fs itself, I think it should follow the AWS style for interoperability.

<!-- gh-comment-id:1498378884 --> @gaul commented on GitHub (Apr 6, 2023): @rebelga You can work around this with S3Proxy using the encryption middleware: https://github.com/gaul/s3proxy/pull/398. As for s3fs itself, I think it should follow the AWS style for interoperability.
Author
Owner

@woodlyer commented on GitHub (Nov 29, 2024):

there is a good client side s3 encryption production.
juicefs. it's open source. see the doc.
https://juicefs.com/docs/community/security/encryption/

juicefs support FUSE.
But, there is a little notice.
juicefs will splite files into parts, and you will have to use juicefs to access your files in s3 server.

<!-- gh-comment-id:2507198405 --> @woodlyer commented on GitHub (Nov 29, 2024): there is a good client side s3 encryption production. juicefs. it's open source. see the doc. https://juicefs.com/docs/community/security/encryption/ juicefs support FUSE. But, there is a little notice. juicefs will splite files into parts, and you will have to use juicefs to access your files in s3 server.
Author
Owner

@ggtakec commented on GitHub (Jan 19, 2025):

In the past, I have tested encfs and ecryptfs in combination with s3fs to achieve client encryption (you must specify the use_xattr option), and it worked. I think it still works now.

<!-- gh-comment-id:2600742419 --> @ggtakec commented on GitHub (Jan 19, 2025): In the past, I have tested `encfs` and `ecryptfs` in combination with s3fs to achieve client encryption (you must specify the use_xattr option), and it worked. I think it still works now.
Author
Owner

@zeroSteiner commented on GitHub (Aug 11, 2025):

I'm currently working on this in my feat/cse-v2-aes branch. I intend to follow the v2 (latest AFAIK) scheme / security profile from the official SDK and so far I have it reading and validating encrypted files with an AES key. I'm following the official SDK for compatibility which uses AES-GCM. AES-GCM is a great cipher, but in order to take advantage of the tag authentication, files have to be read and written in their entirety which will cause more latency. I don't think there is a way around this but it is a nice security feature.

I still need to implement writing encrypted files which will take a few weeks. The current implementation is for Linux only and uses OpenSSL. I wasn't planning on supporting:

  • OSX and Windows
  • Non-OpenSSL crypto libraries
  • KMS KEKs (a large part of my effort is driven by a desire to avoid vendor lock-in with AWS and since others don't seem to support this, it doesn't make sense to add)
  • RSA KEKs

I'll update this ticket once more when I have something ready to PR. I'm hoping to have that ready in maybe 2 months.

<!-- gh-comment-id:3174427655 --> @zeroSteiner commented on GitHub (Aug 11, 2025): I'm currently working on this in my [feat/cse-v2-aes](https://github.com/zeroSteiner/s3fs-fuse/tree/feat/cse-v2-aes) branch. I intend to follow the v2 (latest AFAIK) scheme / security profile from the official SDK and so far I have it reading and validating encrypted files with an AES key. I'm following the official SDK for compatibility which uses AES-GCM. AES-GCM is a great cipher, but in order to take advantage of the tag authentication, files have to be read and written in their entirety which will cause more latency. I don't think there is a way around this but it is a nice security feature. I still need to implement writing encrypted files which will take a few weeks. The current implementation is for Linux only and uses OpenSSL. I wasn't planning on supporting: * OSX and Windows * Non-OpenSSL crypto libraries * KMS KEKs (a large part of my effort is driven by a desire to avoid vendor lock-in with AWS and since others don't seem to support this, it doesn't make sense to add) * RSA KEKs I'll update this ticket once more when I have something ready to PR. I'm hoping to have that ready in maybe 2 months.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#408
No description provided.