elliptic
0.4.0, released 4 months ago by c0mm4nd.com
Pure Dart elliptic curve math for ECDSA, ECDH, key generation.
WASM-ready
What it does
Provides elliptic curve primitives, key generation, ECDH, and utilities for working with PEM keys. It is dependency‑free and supports multiple curves including secp256k1.
AI-written summary of version 0.4.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- Implementing ECDSA or ECDH in a pure Dart project
- Generating key pairs for cryptographic protocols
- Testing or prototyping elliptic‑curve based algorithms
Skip it when
- Needing hardware‑accelerated crypto or native performance
- Using a full cryptographic library that already includes curve support
Strengths
- Pure Dart, no third‑party dependencies
- Regular security updates and point validation
- Supports many standard curves
Weaknesses
- No native acceleration
- Not a complete crypto stack (no signing, hashing, etc.)
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:elliptic/elliptic.dart';
var ec = getP256();
var priv = ec.generatePrivateKey();
var pub = priv.publicKey;
print('privateKey: 0x$priv');
print('publicKey: 0x$pub');Alternatives
Packages that do the same job and could replace elliptic.
Works with
Packages commonly used together with elliptic: ones it builds on, ones built on it, and its own family.
- ecdsaBuilt on ellipticImplements ECDSA signing and verification in pure Dart.
- nostrBuilt on ellipticPure-Dart Nostr protocol library supporting events, signing, encryption, and 35+ NIPs.
- ssiBuilt on ellipticAffinidi Self-Sovereign Identity library for Dart and Flutter.
- didcommBuilt on ellipticImplements the DIDComm v2 Messaging protocol for secure and private app communication.
- ndkBuilt on ellipticDart library for building Nostr clients with relay discovery, caching and signing support.
- feature_flags_togglyBuilt on ellipticFeature flags support for Flutter applications with or without Toggly.io.