diff --git a/.idea/modules.xml b/.idea/modules.xml
index d3060825..d5a48bbe 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,7 +2,7 @@
-
+
\ No newline at end of file
diff --git a/.idea/encryptedfs.iml b/.idea/rencfs.iml
similarity index 100%
rename from .idea/encryptedfs.iml
rename to .idea/rencfs.iml
diff --git a/Cargo.lock b/Cargo.lock
index 2ac698ad..62255439 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -291,36 +291,6 @@ version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a"
-[[package]]
-name = "encryptedfs"
-version = "0.1.26"
-dependencies = [
- "base64",
- "bincode",
- "bytes",
- "clap",
- "cryptostream",
- "ctrlc",
- "fuse3",
- "futures-util",
- "libc",
- "mio",
- "openssl",
- "parking_lot",
- "pbkdf2",
- "rand 0.3.23",
- "rpassword",
- "serde",
- "sha2",
- "strum",
- "strum_macros",
- "thiserror",
- "tokio",
- "tracing",
- "tracing-subscriber",
- "weak-table",
-]
-
[[package]]
name = "errno"
version = "0.3.8"
@@ -803,6 +773,36 @@ dependencies = [
"bitflags 1.3.2",
]
+[[package]]
+name = "rencfs"
+version = "0.1.27"
+dependencies = [
+ "base64",
+ "bincode",
+ "bytes",
+ "clap",
+ "cryptostream",
+ "ctrlc",
+ "fuse3",
+ "futures-util",
+ "libc",
+ "mio",
+ "openssl",
+ "parking_lot",
+ "pbkdf2",
+ "rand 0.3.23",
+ "rpassword",
+ "serde",
+ "sha2",
+ "strum",
+ "strum_macros",
+ "thiserror",
+ "tokio",
+ "tracing",
+ "tracing-subscriber",
+ "weak-table",
+]
+
[[package]]
name = "rpassword"
version = "7.3.1"
diff --git a/Cargo.toml b/Cargo.toml
index 7513db67..eccf140b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,15 +1,15 @@
[package]
-name = "encryptedfs"
+name = "rencfs"
description = "An encrypted file system that mounts with FUSE on Linux. It can be used to create encrypted directories."
-version = "0.1.26"
+version = "0.1.27"
edition = "2021"
license = "Apache-2.0"
authors = ["Radu Marias "]
-repository = "https://github.com/radumarias/encryptedfs"
+repository = "https://github.com/radumarias/rencfs"
readme = "README.md"
keywords = ["filesystem", "fuse", "encryption", "system", "security"]
categories = ["cryptography", "filesystem"]
-documentation = "https://docs.rs/encryptedfs"
+documentation = "https://docs.rs/rencfs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/README.md b/README.md
index b2610405..55b34678 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# EncryptedFS
+# RencFs
An encrypted file system that mounts with FUSE on Linux. It can be used to create encrypted directories.
@@ -6,14 +6,14 @@ It can then safely backup the encrypted folder on an untrusted server without wo
You can also store it in any cloud storage like Google Drive, Dropbox, etc. and have it synced across multiple devices.
\
-[![encryptedfs-bin](https://img.shields.io/aur/version/encryptedfs-bin?color=1793d1&label=encryptedfs-bin&logo=arch-linux)](https://aur.archlinux.org/packages/encryptedfs-bin/)
-![crates.io](https://img.shields.io/crates/v/encryptedfs.svg)
-![docs.rs](https://img.shields.io/docsrs/encryptedfs?label=docs.rs)
-[![test](https://github.com/radumarias/encryptedfs/actions/workflows/test.yml/badge.svg)](https://github.com/radumarias/encryptedfs/actions/workflows/test.yml)
+[![rencfs-bin](https://img.shields.io/aur/version/rencfs-bin?color=1793d1&label=rencfs-bin&logo=arch-linux)](https://aur.archlinux.org/packages/rencfs-bin/)
+![crates.io](https://img.shields.io/crates/v/rencfs.svg)
+![docs.rs](https://img.shields.io/docsrs/rencfs?label=docs.rs)
+[![test](https://github.com/radumarias/rencfs/actions/workflows/test.yml/badge.svg)](https://github.com/radumarias/rencfs/actions/workflows/test.yml)
# Usage
-You can use it as a command line tool to mount an encrypted file system, or directly using the library to build your own binary (for library, you can follow the [documentation](https://docs.rs/encryptedfs/latest/encryptedfs/)).
+You can use it as a command line tool to mount an encrypted file system, or directly using the library to build your own binary (for library, you can follow the [documentation](https://docs.rs/rencfs/latest/rencfs/)).
## Command Line Tool
@@ -33,20 +33,20 @@ sudo apt-get update && sudo apt-get -y install fuse3
You can install the encrypted file system binary using the following command
```bash
yay -Syu
-yay -S encryptedfs
+yay -S rencfs
```
### Install with cargo
You can install the encrypted file system binary using the following command
```bash
-cargo install encryptedfs
+cargo install rencfs
```
A basic example of how to use the encrypted file system is shown below
```
-encryptedfs --mount-point MOUNT_POINT --data-dir DATA_DIR
+rencfs --mount-point MOUNT_POINT --data-dir DATA_DIR
```
Where `MOUNT_POINT` is the directory where the encrypted file system will be mounted and `DATA_DIR` is the directory where the encrypted data will be stored.\
It will prompt you to enter a password to encrypt/decrypt the data.
@@ -59,7 +59,7 @@ This is done by decrypting the key with the old password and re-encrypting it wi
To change the password, you can run the following command
```bash
-encryptedfs --change-password --data-dir DATA_DIR
+rencfs --change-password --data-dir DATA_DIR
```
Where `DATA_DIR` is the directory where the encrypted data is stored.\
It will prompt you to enter the old password and then the new password.
@@ -72,7 +72,7 @@ You can specify the encryption algorithm and derive key hash rounds adding these
--cipher CIPHER --derive-key-hash-rounds ROUNDS
```
Where `CIPHER` is the encryption algorithm and `ROUNDS` is the number of rounds to derive the key hash.\
-You can check the available ciphers with `encryptedfs --help`.
+You can check the available ciphers with `rencfs --help`.
Default values are `ChaCha20` and `600_000` respectively.
@@ -85,19 +85,19 @@ You can specify the log level adding the `--log-level` argument to the command l
## Start it in docker
```bash
-docker pull xorio42/encryptedfs
+docker pull xorio42/rencfs
```
Start a container to set up mount in it
-`docker run -it --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined xorio42/encryptedfs:latest /bin/sh`
+`docker run -it --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined xorio42/rencfs:latest /bin/sh`
In the container create mount and data directories
`mkdir fsmnt && mkdir fsdata`
-Start `encryptedfs`
+Start `rencfs`
-`encryptedfs --mount-point fsmnt --data-dir fsdata`
+`rencfs --mount-point fsmnt --data-dir fsdata`
Enter a password for encryption.
@@ -123,7 +123,7 @@ cat 1/test
## Getting the sources
```bash
-git@github.com:radumarias/encryptedfs.git
+git@github.com:radumarias/rencfs.git
````
## Dependencies
diff --git a/examples/fuser.rs b/examples/fuser.rs
index 78968245..f201ab20 100644
--- a/examples/fuser.rs
+++ b/examples/fuser.rs
@@ -6,7 +6,7 @@ use std::str::FromStr;
use clap::{Arg, ArgAction, Command, crate_version};
use fuser::MountOption;
use strum::IntoEnumIterator;
-use encryptedfs::encryptedfs::Cipher;
+use rencfs::encryptedfs::Cipher;
use crate::encryptedfs_fuse::EncryptedFsFuse;
mod encryptedfs_fuse;
diff --git a/src/lib.rs b/src/lib.rs
index ccbc8733..57a3145a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -21,8 +21,8 @@
//! use std::ffi::OsStr;
//! use fuse3::MountOptions;
//! use fuse3::raw::Session;
-//! use encryptedfs::encryptedfs::Cipher;
-//! use encryptedfs::encryptedfs_fuse3::EncryptedFsFuse3;
+//! use rencfs::encryptedfs::Cipher;
+//! use rencfs::encryptedfs_fuse3::EncryptedFsFuse3;
//!
//! async fn run_fuse(mountpoint: String, data_dir: &str, password: &str, cipher: Cipher, derive_key_hash_rounds: u32,
//! allow_root: bool, allow_other: bool, direct_io: bool, suid_support: bool) {
@@ -66,7 +66,7 @@
//! # Example
//!
//! ```
-//! use encryptedfs::encryptedfs::{EncryptedFs, FileAttr, FileType};
+//! use rencfs::encryptedfs::{EncryptedFs, FileAttr, FileType};
//! const ROOT_INODE: u64 = 1;
//! let data_dir = "/tmp/encryptedfs";
//! let password = "password";
diff --git a/src/main.rs b/src/main.rs
index 06daeb36..0577c56e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -14,8 +14,8 @@ use strum::IntoEnumIterator;
use tokio::{fs, task};
use tracing::{error, info, instrument, Level};
-use encryptedfs::encryptedfs::{Cipher, EncryptedFs, FsError};
-use encryptedfs::encryptedfs_fuse3::EncryptedFsFuse3;
+use rencfs::encryptedfs::{Cipher, EncryptedFs, FsError};
+use rencfs::encryptedfs_fuse3::EncryptedFsFuse3;
#[tokio::main]
async fn main() {
@@ -43,7 +43,7 @@ async fn main() {
fn async_main() {
let handle = tokio::runtime::Handle::current();
handle.block_on(async {
- let matches = Command::new("EncryptedFS")
+ let matches = Command::new("RencFs")
.version(crate_version!())
.author("Radu Marias")
.arg(
@@ -223,7 +223,7 @@ async fn run_normal(matches: ArgMatches, data_dir: &String, cipher: Cipher, deri
.to_string();
// when running from IDE we can't read from stdin with rpassword, get it from env var
- let mut password = env::var("ENCRYPTEDFS_PASSWORD").unwrap_or_else(|_| "".to_string());
+ let mut password = env::var("RENCFS_PASSWORD").unwrap_or_else(|_| "".to_string());
if password.is_empty() {
// read password from stdin
print!("Enter password: ");