Skip to content

Commit 78497ca

Browse files
committed
added sharing features
1 parent ac76928 commit 78497ca

File tree

9 files changed

+1801
-16
lines changed

9 files changed

+1801
-16
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,13 @@ cargo run --example multipart_upload
226226

227227
# S3 compatibility guide
228228
cargo run --example s3_compatible
229+
230+
# Security verification
231+
cargo run --example security_verification
232+
233+
# Sharing Demo
234+
cargo run --example sharing_demo
235+
229236
```
230237

231238
## Security

crates/fula-crypto/src/error.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,12 @@ pub enum CryptoError {
6767
/// Hex decode error
6868
#[error("hex decode error: {0}")]
6969
HexDecode(#[from] hex::FromHexError),
70+
71+
/// Share token expired
72+
#[error("share token expired")]
73+
ShareExpired,
74+
75+
/// Access denied
76+
#[error("access denied: {0}")]
77+
AccessDenied(String),
7078
}

crates/fula-crypto/src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
//! - **BLAKE3**: Fast cryptographic hashing
88
//! - **Bao**: Verified streaming for integrity verification
99
//! - **Key Management**: DEK/KEK architecture for efficient key rotation
10+
//! - **Sharing**: Secure file/folder sharing without exposing master keys
11+
//! - **Key Rotation**: Full filesystem key rotation with DEK re-wrapping
1012
//!
1113
//! ## Security Model
1214
//!
@@ -36,13 +38,17 @@ pub mod error;
3638
pub mod hashing;
3739
pub mod hpke;
3840
pub mod keys;
41+
pub mod rotation;
42+
pub mod sharing;
3943
pub mod streaming;
4044
pub mod symmetric;
4145

4246
pub use error::{CryptoError, Result};
4347
pub use hashing::{Blake3Hash, Hasher, HashOutput};
44-
pub use hpke::{Decryptor, EncapsulatedKey, EncryptedData, Encryptor, HpkeConfig};
48+
pub use hpke::{Decryptor, EncapsulatedKey, EncryptedData, Encryptor, HpkeConfig, SharePermissions};
4549
pub use keys::{DekKey, KekKeyPair, KeyManager, PublicKey, SecretKey};
50+
pub use rotation::{KeyRotationManager, FileSystemRotation, WrappedKeyInfo, RotationResult};
51+
pub use sharing::{ShareToken, ShareBuilder, ShareRecipient, AcceptedShare, FolderShareManager, AccessValidation};
4652
pub use streaming::{BaoEncoder, BaoDecoder, BaoOutboard, VerifiedStream};
4753
pub use symmetric::{Aead, AeadCipher, Nonce};
4854

0 commit comments

Comments
 (0)