flutter_concrete 0.5.0 copy "flutter_concrete: ^0.5.0" to clipboard
flutter_concrete: ^0.5.0 copied to clipboard

Concrete ML FHE client for Flutter. Native TFHE-rs encryption/decryption via Dart FFI with quantization support.

0.5.0 #

  • Pure LWE keygen: Circuits with no bootstrapping keys (e.g. logistic regression, linear regression) now generate raw LweSecretKey with exact prime dimensions instead of failing on the GLWE extraction path. Existing keys generated by prior versions or by Python's FHEModelClient are auto-detected and continue to work.
  • Fix encrypt/decrypt encoding: carry-bit delta convention now matches Concrete's 2^(64 - width - 1), unsigned outputs are no longer truncated by the width-bit mask, and lweEncryptSeeded uses encodingWidth instead of concreteShape.last for bits-per-value.
  • Fix quantization pipeline: removed spurious offset from output dequant formula to match Python's scale * (raw - zp), separated input offset into applyInputOffsets() to match Python's fhe.Client.encrypt behavior, and fixed nBits/isSigned extraction from input quantizers in ClientZipParser.
  • Per-class output zero points: OutputQuantParam accepts an optional zeroPoints list for linear models that produce per-output-class zero point arrays. Single shared input quantizer support for linear models.
  • Swift Package Manager support: iOS builds now support SPM in addition to CocoaPods.

0.4.0 #

  • Model-agnostic post-processing: decryptAndDequantize now applies the correct post-processing for each Concrete ML model type (tree ensembles, linear classifiers, neural networks, regressors), matching Python's FHEModelClient.deserialize_decrypt_dequantize.
  • Auto-detection from client.zip: Model class name (e.g. XGBClassifier) is parsed from serialized_processing.json and mapped to the appropriate transform via a lookup table covering 17 standard Concrete ML sklearn models.
  • PostProcessing sealed class: New public API with variants auto, ensembleClassifier, ensembleProbabilistic, ensembleRegressor, xgbRegressor, classifier, regressor, none, and custom. Pass as optional parameter to decryptAndDequantize to override auto-detection.
  • Breaking: dequantizeOutputs no longer performs tree aggregation. The nClasses field has been removed from QuantizationParams. Post-processing (sum, softmax, sigmoid) is now handled by PostProcessing. Callers using PostProcessing.auto() (the default) see identical behavior.
  • New getters: ConcreteClient.modelClassName, ConcreteClient.detectedPostProcessing
  • Added dartdoc comments to all public API members
  • OutputQuantParam now supports per-class zero points via optional zeroPoints field; single shared input quantizer support for linear models
  • Added example/example.dart
  • Fixed lint issues (for-loop braces, unnecessary library name)

0.3.0 #

  • CiphertextFormat.CONCRETE support: Native seeded LWE encryption and decryption for Concrete's default ciphertext format. Enables n_bits 1–7 (no longer forced to n_bits=8), producing dramatically smaller circuits and faster inference.
  • Automatic format detection: ConcreteClient reads client.specs.json to determine whether the model uses CONCRETE or TFHE-rs format and routes through the appropriate path. No public API changes.
  • Dynamic keygen parameters: fhe_keygen derives GLWE dimensions from the circuit topology instead of hardcoding V0_10, supporting any parameter set the Concrete compiler chooses.
  • Cap'n Proto Value serialization: New fhe_serialize_value / fhe_deserialize_value FFI functions for Concrete's ciphertext transport format.
  • nClasses from output shape: dequantizeOutputs correctly aggregates per-tree scores for CONCRETE format models where tfhers_specs is absent.
  • New internal types: ConcreteCipherInfo, ConcreteCipherCompression

0.2.0 #

  • Dynamic key topology: Keygen reads client.specs.json from client.zip instead of hardcoded key counts. Supports any Concrete ML circuit.
  • Multi-width encrypt/decrypt: Dispatches to FheUint8–64 / FheInt8–64 based on encoding width. No longer limited to uint8/int8.
  • Model change detection: SHA-256 hash of topology + encoding stored in KeyStorage; keys auto-regenerate when the model changes.
  • Int64List I/O for quantization with dynamic bit-width clamping

0.1.0 #

  • Initial release
  • ConcreteClient: setup from Concrete ML client.zip, key generation/restoration, quantize+encrypt, decrypt+dequantize
  • KeyStorage abstract interface for key persistence
  • 8-bit quantization (uint8 input, int8 output) compatible with Concrete ML models
  • Cargokit-based native build with precompiled binary support
  • Android and iOS platform support

0.1.1 #

  • Updated README.md
1
likes
160
points
335
downloads

Documentation

API reference

Publisher

verified publisherolivegradient.com

Weekly Downloads

Concrete ML FHE client for Flutter. Native TFHE-rs encryption/decryption via Dart FFI with quantization support.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

archive, collection, crypto, ffi, flutter

More

Packages that depend on flutter_concrete

Packages that implement flutter_concrete