Skip to content
pubscout

crypton

2.2.1, released 3 years ago by konstantinullrich.de

A simple Dart library for asymmetric encryption and digital signatures.

WASM-ready
$ flutter pub add crypton
Source repository

What it does

Crypton provides a simplified interface to interact with PointyCastle for asymmetric encryption, decryption, and digital signatures. It supports generating random RSA and EC keypairs, signing strings, validating signatures, and handling RSA string encryption.

AI-written summary of version 2.2.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to implement RSA encryption or decryption for strings.
  • You need to generate random RSA or EC keypairs and handle digital signatures.

Skip it when

  • You need symmetric encryption or hashing (the author recommends steel_crypt instead).

Strengths

  • Provides a simplified wrapper around complex PointyCastle operations.
  • Supports both RSA and EC keypair generation and signing.

Weaknesses

  • Not recommended for symmetric encryption or hashing.
  • Limited feature scope focused strictly on basic asymmetric operations.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2
RSAKeypair rsaKeypair = RSAKeypair.fromRandom();
String encrypted = rsaKeypair.publicKey.encrypt('Hello World');
String decrypted = rsaKeypair.privateKey.decrypt(encrypted);

Alternatives

Packages that do the same job and could replace crypton.

  • cryptography_plus

    Cryptographic algorithms for encryption, signatures, key agreement, and hashing across platforms.

  • cryptography

    Cross‑platform cryptographic algorithms for Dart and Flutter.

  • ecdsa

    Implements ECDSA signing and verification in pure Dart.

  • xml_crypto

    Xml digital signature library for Dart for signing and verifying XML documents.

Works with

Packages commonly used together with crypton: ones it builds on, ones built on it, and its own family.