abdm_fidelius 0.1.0 copy "abdm_fidelius: ^0.1.0" to clipboard
abdm_fidelius: ^0.1.0 copied to clipboard

Dart implementation of ABDM Fidelius encryption (ECDH + HKDF + AES-256-GCM) for India's health data exchange.

0.1.0 #

Initial release — full ABDM Fidelius encryption protocol in pure Dart.

Core Library #

  • ECDH key agreement on three curves: Weierstrass Curve25519 (ABDM default), X25519, P-256
  • HKDF-SHA256 key derivation with 20-byte salt from nonce XOR
  • AES-256-GCM authenticated encryption with 128-bit tag
  • X.509 SubjectPublicKeyInfo DER encoding/decoding for all curves
  • Strict base64 validation with descriptive error messages

High-Level API #

  • FideliusCurve25519 — Weierstrass Curve25519 (ABDM gateway compatible)
  • FideliusX25519 — X25519 (RFC 7748 Montgomery form)
  • FideliusP256 — P-256 / secp256r1 (NIST)
  • Fully async API (Future<> on all methods)
  • FideliusKeyPair with safe JSON serialization (excludes private key by default)
  • FideliusEncryptedPayload with fidelius-cli compatible JSON format
  • decrypt() returns null on GCM auth failure with optional onError callback

Low-Level Primitives #

  • generateKeyPair(), deriveSharedSecret(), xorAndSplitNonces()
  • deriveKey(), aesGcmEncrypt(), aesGcmDecrypt()
  • encodeX509SpkiDer(), decodeX509SpkiDer()

CLI Tool #

  • abdm_fidelius generate — key pair generation (all curves)
  • abdm_fidelius encrypt — encrypt plaintext
  • abdm_fidelius decrypt — decrypt payload
  • JSON output, no JRE required

Interoperability #

  • Byte-for-byte compatible with Java fidelius-cli
  • Field name mapping documented (senderPublicKey ↔ keyValue)

Testing #

  • 157+ unit and integration tests across all curves and engines
  • Cross-curve isolation tests (ArgumentError and GCM failure paths)
0
likes
160
points
59
downloads

Documentation

API reference

Publisher

verified publisherpensievelabs.org

Weekly Downloads

Dart implementation of ABDM Fidelius encryption (ECDH + HKDF + AES-256-GCM) for India's health data exchange.

Homepage
Repository (GitHub)
View/report issues

Topics

#abdm #fidelius #encryption #ecdh #healthcare

License

MIT (license)

Dependencies

args, cryptography, pointycastle

More

Packages that depend on abdm_fidelius