2 unstable releases

0.10.0 Aug 10, 2023
0.8.0 Jun 8, 2023

#2230 in Cryptography

Download history 2/week @ 2024-02-10 13/week @ 2024-02-17 27/week @ 2024-02-24 13/week @ 2024-03-02 26/week @ 2024-03-09 11/week @ 2024-03-16 19/week @ 2024-03-23 53/week @ 2024-03-30 4/week @ 2024-04-06

89 downloads per month
Used in 5 crates (3 directly)

Custom license

91KB
2K SLoC

Sentc

from Sentclose

An end-to-end encryption sdk for developer with user management.

Available in:

  • Javascript
  • Dart with flutter

Contains

  • User management: Register, login, authentication, authorisation
  • Group management: Invite or add member, role management, group encryption
  • Handling large files in browser and native

Build from source

Requirements:

  • Rust MRV 1.69.0
  • For flutter:
    • flutter_rust_bridge_codegen (cargo install flutter_rust_bridge_codegen)
    • cargo-ndk
    • llvm
    • flutter ffi (dart pub global activate ffigen)
  • For Javascript:
    • wasm-pack
    • node js min. version 14 lts

Build for rust

Build rust in the current workspace.

cargo build --release

Build javascript (wasm)

  1. Build with wasm pack in implementation/js/sentc_wasm
cd ./implementation/js/sentc_wasm
wasm-pack build --target web 
  1. Build typescript code in implementation/js/sentc_wasm
cd ./implementation/js/sentc_wasm
npm run build

Build flutter

Build with flutter rust bridge and cargo-ndk.

  1. In the current workspace, generate the flutter code
flutter_rust_bridge_codegen --rust-input implementation/dart/sentc_flutter_rust/src/sentc.rs --dart-output implementation/dart/sentc/lib/generated.dart --llvm-path <path-to-your-llvm>
  1. build the android code with cargo-ndk in implementation/dart/sentc_flutter_rust
cd ./implementation/dart/sentc_flutter_rust
cargo ndk -t armeabi-v7a -t arm64-v8a -t x86 -t x86_64 -o ../sentc/android/src/main/jniLibs build --release

lib.rs:

Sentclose crypto crate

This create is non_std with alloc

used alg:

  • Password hashing
    • argon2
  • symmetric encryption:
    • aes gcm
  • asymmetric encryption:
    • ecies based on x25519
  • signing
    • ed25519
  • hmac
    • hmac sha256

This create can be used as stand alone version without the sentclose api

Dependencies

~4–5.5MB
~109K SLoC