sec
1.1.1, released 2 years ago by an unverified publisher
Standards for Efficient Cryptography implementation including SECP256K1 and SECP256R1.
What it does
Implements Standards for Efficient Cryptography (SEC) curves, including SECP256K1, SECP256R1, and many others. Provides functionality for public key recovery ID calculation and public key compression and decompression.
AI-written summary of version 1.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to work with SECP256K1 or SECP256R1 curves for cryptography or cryptocurrency tasks.
- You need to calculate public key recovery IDs or compress and decompress public keys.
Skip it when
- You only need basic hashing algorithms not related to elliptic curve cryptography.
- You do not require specific elliptic curve cryptography implementations.
Strengths
- Supports a wide variety of elliptic curve algorithms including numerous SEC, Brainpool, and GOST curves.
- Provides public key compression, decompression, and recovery ID calculation.
Weaknesses
- Limited documentation beyond the basic README usage example.
- Relies entirely on external dependencies like pointycastle for underlying cryptographic features.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
not documented
import 'package:sec/sec.dart';
import 'package:convert/convert.dart';
final privateKey = BigInt.parse(
'c57304b3a53051600d7035fc593083810a8fa250e6a7a2803cf6a0f3c2750503',
radix: 16,
);
final publicKey = Secp256k1.createPublicKey(privateKey, true);
final pkHex = hex.encode(publicKey);Alternatives
Packages that do the same job and could replace sec.
- webcrypto
Cross-platform implementation of Web Cryptography APIs for Dart.
89Compare - io
Utilities for the Dart VM Runtime including ANSI colors, file copying, and exit code values.
88Compare - emoji_regex
Provides a regular expression to match all emoji symbols and sequences as per the Unicode Standard.
47Compare - shared_map
A synchronized Map for sharing key‑value data across Dart isolates and processes
44Compare
Works with
Packages commonly used together with sec: ones it builds on, ones built on it, and its own family.
- pointycastlesec depends on itA Dart library providing a wide range of cryptographic algorithms and primitives.
- walletBuilt on secCrypto wallet package for Bitcoin, Ethereum and Tron written in pure Dart.
- web3dartBuilt on secA Dart library to connect to Ethereum clients and interact with smart contracts.