crypto/crypto/crypto library
The 'crypto' library provides a collection of cryptographic algorithms and utilities for various cryptographic operations and security functions.
Classes
-
Absorbing<
F extends Object> - AEAD
- An abstract class representing an Authenticated Encryption with Associated Data (AEAD) cipher.
- AES
- Represents an Advanced Encryption Standard (AES) block cipher.
-
BaseBls12Point<
SCALAR extends JubJubField< SCALAR> , P extends BaseBls12Point<SCALAR, P> > -
BaseCommitDomain<
SCALAR extends PastaFieldElement< SCALAR> , BASE extends PastaFieldElement<BASE> , P extends PastaPoint<SCALAR, BASE, P> , AFFINE extends PastaAffinePoint<SCALAR, BASE, P> > - BaseCurve
- BaseExtendedPointNative
-
BaseHashDomain<
SCALAR extends PastaFieldElement< SCALAR> , BASE extends PastaFieldElement<BASE> , P extends PastaPoint<SCALAR, BASE, P> , AFFINE extends PastaAffinePoint<SCALAR, BASE, P> > -
BaseJubJubAffinePoint<
SCALAR extends JubJubScalar< SCALAR> > - Base class for affine JubJub points.
-
BaseJubJubNielsPoint<
SCALAR extends JubJubScalar< SCALAR> > - Base class for Niels-form JubJub points (used for fast addition).
-
BaseJubJubPoint<
SCALAR extends JubJubScalar< SCALAR> , P extends BaseJubJubPoint<SCALAR, P> > - Base abstract class for JubJub points with full group and cofactor operations.
-
BasePastaPoint<
SCALAR extends PastaFieldElement< SCALAR> , BASE extends PastaFieldElement<BASE> > - BaseProjectivePointNative
-
BaseRedJubJubPoint<
SCALAR extends JubJubScalar< SCALAR> > - BinaryNumeralString
- Numeral string representation for FF1 in binary form (radix = 2).
- BLAKE2b
- Implementation of the BLAKE2b hash function that implements the SerializableHash interface.
- Blake2bConfig
- Configuration class for the Blake2b hash function.
- Blake2bState
- Represents the state of a BLAKE2b hash function.
- Blake2bTree
- Configuration for the tree structure in Blake2b.
- BLAKE2s
- Implementation of the BLAKE2s hash function that implements the SerializableHash interface.
- Blake2sConfig
- Configuration class for the Blake2b hash function.
- Blake2sState
- Blake2sTree
- Configuration for the tree structure in Blake2b.
- BlockCipher
- An abstract class representing a block cipher for symmetric encryption and decryption.
- BlockCipherMode
- An abstract class representing a block mode.
-
Bls12AffinePoint<
P extends Bls12Point< P> > - Affine-coordinate BLS12 point with non-native field elements.
- Bls12Fp
- Implementation of the BLS12-381 base field GF(p).
- Bls12Fp12
- Quadratic extension field GF(p¹²) over GF(p⁶), represented as c0 + c1·w with w² = v.
- Bls12Fp2
- Implements arithmetic over the quadratic extension field Fp2.
- Bls12Fp6
- Cubic extension field GF(p⁶) over GF(p²), represented as c0 + c1·v + c2·v² with v³ = u + 1.
- Bls12FpConst
-
Constants for the BLS12-381 base field GF(p).
All values are expressed using
BigInt. -
Bls12NativeAffinePoint<
P extends Bls12NativePoint< P> > - Affine-coordinate BLS12 point with native field elements (coordinates stored as single BigInts).
- Bls12NativeFp
- Native BLS12-381 base field element backed by a single BigInt.
- Bls12NativeFp12
- Quadratic extension field GF(p¹²) over GF(p⁶), represented as c0 + c1·w with w² = v.
- Bls12NativeFp2
- Implements arithmetic over the quadratic extension field Fp2.
- Bls12NativeFp6
- Cubic extension field GF(p⁶) over GF(p²), represented as c0 + c1·v + c2·v² with v³ = u + 1.
-
Bls12NativePoint<
P extends Bls12NativePoint< P> > - BLS12 point using native field representation (each field element is backed by a single BigInt).
- Bls12PairingUtils
- Utilities for computing pairings and Miller loop operations on BLS12-381.
-
Bls12Point<
P extends Bls12Point< P> > - Generic BLS12 point using non-native field representation (field elements may be split into limbs).
-
BlsField<
F extends BlsField< F> > - Base interface for BLS scalar or base fields.
- CBC
- Implements a block cipher using CBC mode.
- ChaCha20
- ChaCha20Poly1305
- ChaCha20Rng
-
CofactorGroupElement<
SCALAR extends CryptoField< SCALAR> , F extends CryptoGroupElement<F, SCALAR> > - CommitDomain
- CommitDomainNative
-
Coordinates<
F extends Object> - Crc16
- Crc32
- A class for calculating cyclic redundancy check (CRC32) values.
-
CryptoField<
F extends CryptoField< F> > - CryptoFieldElement
-
CryptoGroupElement<
F, SCALAR extends CryptoField< SCALAR> > - CryptoOps
- CryptoOpsConst
-
CryptoPrimeFieldElement<
F extends CryptoPrimeFieldElement< F> > - CTR
- Counter (CTR) mode for block ciphers.
- Curve
- This is an abstract base class for elliptic curves.
- CurveED
- This class represents a twisted Edwards elliptic curve defined over a prime field.
- CurveFp
- This class represents a finite field elliptic curve defined over a prime field (Fp).
- Curves
- This class provides a collection of predefined elliptic curves for various cryptographic applications.
- ECB
- Electronic Codebook (ECB) mode for AES encryption and decryption.
- ECDSAPrivateKey
- Represents an ECDSA (Elliptic Curve Digital Signature Algorithm) private key.
- ECDSAPublicKey
- Represents an ECDSA (Elliptic Curve Digital Signature Algorithm) public key.
- ECDSASignature
-
Represents an ECDSA (Elliptic Curve Digital Signature Algorithm) signature
containing
randscomponents. - ECDSAUtils
-
ECPoint<
SCALAR extends Object, POINT extends ECPoint< SCALAR, POINT> > - Ed25519Utils
- Utility class for Ed25519-specific operations.
- EDDSAPrivateKey
- Represents an EdDSA private key and provides methods for key operations.
- EDDSAPublicKey
- Represents an EdDSA public key in the Edwards curve format.
- EDPoint
- A class representing a point on an Edwards curve.
- F4Jumble
- Implements the F4Jumble transformation and its inverse.
-
FF1<
T extends NumeralString< T> > - FF1Binary
- FF1 format-preserving encryption specialized for binary data.
- FF1Flexible
- FF1 format-preserving encryption using a flexible numeral string.
- FF1Radix
- Represents an FF1 radix configuration, including its type and length constraints.
- FieldElement
-
FieldSqrtResult<
F extends CryptoField< F> > - FlexibleNumeralString
- Numeral string representation for FF1 with flexible radix digits.
- FortunaPRNG
- The FortunaPRNG class represents an implementation of the Fortuna pseudorandom number generator (PRNG) algorithm.
- G1AffinePoint
- BLS12-381 G1 group in projective coordinates (x : y : z).
- G1NativeAffinePoint
- BLS12-381 G1 group in projective coordinates (x : y : z).
- G1NativeProjective
- BLS12-381 G1 group in projective coordinates (x : y : z).
- G1Projective
- BLS12-381 G1 group in projective coordinates (x : y : z).
- G2AffinePoint
- BLS12-381 G2 group afiine in projective coordinates (x : y : z) over GF(p²).
- G2NativeAffinePoint
- BLS12-381 G2 group affine in projective coordinates (x : y : z) over GF(p²).
- G2NativePrepared
- Precomputes Miller loop coefficients for a G2 point to speed up pairings.
- G2NativeProjective
- BLS12-381 G2 group in projective coordinates (x : y : z) over GF(p²).
- G2Projective
- BLS12-381 G2 group in projective coordinates (x : y : z) over GF(p²).
- GammaDistribution
- GCM
- Galois/Counter Mode (GCM) implementation for authenticated encryption with associated data (AEAD).
-
Grain<
F extends PastaFieldElement< F> > - GroupElementCached
- GroupElementP1P1
- GroupElementP2
- GroupElementP3
- GroupElementPrecomp
- GtNative
- Element of GT, the BLS12-381 pairing target group, represented additively.
- Hash
-
The
Hashabstract class defines the basic operations for hash algorithms. - HashBytesState
-
The
HashBytesStateclass represents the state of a hashing process that operates on a byte array. - HashDomain
- HashDomainConst
- HashDomainNative
- HashState
-
The
HashStateabstract class serves as a marker interface for hash state classes. - HKDF
- A Dart implementation of the HKDF (HMAC-based Key Derivation Function) as defined in RFC 5869. This class supports both the extract and expand phases.
-
HMAC<
T extends HashState> -
The
HMACclass represents a Hash-based Message Authentication Code. - JubJubAffineNativePoint
- JubJubAffineNielsNativePoint
- JubJubAffineNielsPoint
- JubJubAffinePoint
-
JubJubField<
F extends JubJubField< F> > - JubJubFq
- JubJubFqConst
- JubJubFr
- Element of the JubJub scalar field Fr, internally represented as 4 64-bit limbs in Montgomery form.
- JubJubFrConst
- JubJubNativeConst
-
JubJubNativeFieldElement<
F extends JubJubNativeFieldElement< F> > - JubJubNativeFq
- Element of the JubJub field Fq.
- JubJubNativeFr
- Element of the JubJub scalar field Fr.
- JubJubNativePoint
- JubJubNielsNativePoint
- JubJubNielsPoint
- JubJubPoint
-
JubJubPrimeField<
F extends JubJubPrimeField< F> > -
JubJubScalar<
F extends JubJubScalar< F> > - Jwt
- JwtHeader
- JwtPayload
- Keccack
- LimbBuffer
- MD4
- Implementation of the MD4 (Message Digest 4) hash function.
- MD5
- A class that represents the MD5 hash algorithm, which is used to compute MD5 message digests. This class implements the SerializableHash interface.
-
MdsGenerateResult<
F extends PastaFieldElement< F> > - MerlinTranscript
- A transcript object for the Merlin cryptographic protocol.
-
MillerLoopDriver<
O> - Interface defining operations required to drive a Miller loop computation.
- MillerLoopDriverBls12
- MillerLoopDriverBls12Pairing
- Implements the Miller loop driver for BLS12-381 pairings using affine G1 and projective G2 points.
- MillerLoopResultBls12
-
MultiMillerLoop<
TERMS extends Object, RESULT extends Object> - Interface for performing multi-Miller loop computations over multiple term pairs.
- MultiMillerLoopBls12
- Computes a combined Miller loop over multiple G1/G2 pairs for BLS12-381.
- MuSig2
- Musig2Bsae
- Musig2Const
- MuSig2DeterministicSignature
- MuSig2KeyAggContext
- MuSig2Nonce
- MuSig2Session
- MuSig2SessionValues
- MuSig2Tweak
- MuSig2Utils
-
NumeralString<
T extends NumeralString< T> > - Abstract interface representing a numeral string over some radix.
- P128Pow5T3Fp
- P128Pow5T3Fq
- P128Pow5T3NativeFp
- P128Pow5T3NativeFq
- PallasAffineNativePoint
- PallasAffinePoint
- PallasFp
- PallasFPConst
- PallasIsoAffineNativePoint
- PallasIsoAffinePoint
- PallasIsoNativePoint
- PallasIsoPoint
- PallasNativeFp
- PallasNativePoint
- PallasPoint
-
PastaAffinePoint<
SCALAR extends PastaFieldElement< SCALAR> , BASE extends PastaFieldElement<BASE> , P extends PastaPoint<SCALAR, BASE, P> > -
PastaCurveParams<
F extends PastaFieldElement< F> > -
PastaFieldElement<
F extends PastaFieldElement< F> > - Abstract base class for elements of a Pasta prime field, supporting arithmetic, comparison, and byte/bit conversions.
- PastaNativeConst
-
PastaNativeFieldElement<
F extends PastaNativeFieldElement< F> > -
PastaPoint<
SCALAR extends PastaFieldElement< SCALAR> , BASE extends PastaFieldElement<BASE> , P extends PastaPoint<SCALAR, BASE, P> > -
PastaSqrtTables<
F extends PastaFieldElement< F> > - PastaUtils
- PBKDF2
-
The
PBKDF2class is an implementation of the Password-Based Key Derivation Function 2 (PBKDF2) algorithm. - Poly1305
-
The
Poly1305class represents an implementation of the Poly1305 one-time message authentication code (MAC). -
PoseidonHash<
F extends PastaFieldElement< F> > -
PoseidonHashDomain<
F extends PastaFieldElement< F> > -
PoseidonSpec<
F extends PastaFieldElement< F> > - PoseidonUtils
- ProjectivAffinePoint
- Represents a point in affine coordinates on an elliptic curve.
- ProjectiveECCPoint
- Represents a point in projective coordinates on an elliptic curve.
- ProjectivePointNative
- RFC6979
- A class that implements the RFC6979 deterministic K value generation algorithm for ECDSA.
- RIPEMD128
-
A class representing the RIPEMD-128 hash algorithm, extending the
_RIPEMDbase class. - RIPEMD160
-
A class representing the RIPEMD-160 hash algorithm, extending the
_RIPEMDbase class. - RIPEMD256
-
A class representing the RIPEMD-256 hash algorithm, extending the
_RIPEMDbase class. - RIPEMD320
-
A class representing the RIPEMD-320 hash algorithm, extending the
_RIPEMDbase class. - RistrettoPoint
- A class representing a RistrettoPoint, a point on an elliptic curve in the Ristretto255 group, derived from an Edwards curve point.
- Rng
- SchnorrkelKeyCost
- The SchnorrkelKeyCost class defines various constants related to the sizes and lengths of Schnorrkel keys and components.
- SchnorrkelKeypair
- Represents a Schnorrkel key pair, consisting of a secret key and a public key.
- SchnorrkelMiniSecretKey
- The SchnorrkelMiniSecretKey class represents a mini-secret key used for generating Schnorr key pairs.
- SchnorrkelPublicKey
- Represents a Schnorrkel public key used for verifying signatures.
- SchnorrkelSecretKey
- The SchnorrkelSecretKey class represents a Schnorrkel secret key used for cryptographic operations.
- SchnorrkelSignature
- Represents a Schnorrkel digital signature.
- Scrypt
- A class for performing scrypt key derivation.
- Secp256k1Utils
-
SerializableHash<
T extends HashState> -
The
SerializableHashabstract class extends theHashclass and adds functionality for saving, restoring, and cleaning hash states. - SH1State
- The SH1State class represents the state of the SHA-1 hash algorithm.
- SHA1
- A class representing the SHA-1 (Secure Hash Algorithm 1) hash algorithm.
- SHA224
-
The
SHA224class represents the SHA-224 hash algorithm, which is a variant of SHA-256. - SHA256
- The SHA256 class represents the SHA-256 hash algorithm.
- SHA256State
- SHA3
-
The
SHA3class is used to compute hash digests of data, and it allows customization of the digest length - SHA3224
- The SHA3224 class represents a specific implementation of the SHA-3 (Secure Hash Algorithm 3) hash function with a digest length of 224 bits (28 bytes).
- SHA3256
- The SHA3256 class represents a specific implementation of the SHA-3 (Secure Hash Algorithm 3) hash function with a digest length of 256 bits (32 bytes).
- SHA3384
- The SHA3384 class represents a specific implementation of the SHA-3 (Secure Hash Algorithm 3) hash function with a digest length of 384 bits (48 bytes).
- SHA3512
- The SHA3512 class represents a specific implementation of the SHA-3 (Secure Hash Algorithm 3) hash function with a digest length of 512 bits (64 bytes).
- SHA384
-
The
SHA384class extends the SHA-512 hash algorithm to produce 384-bit digests. - SHA512
-
The
SHA512class implements the SHA-512 hash algorithm. - SHA512256
- The SHA512256 class extends the SHA-512 hash function, specifically truncating its output to 256 bits (32 bytes). It inherits the implementation of the SHA-512 hash algorithm
- SHA512State
-
The
SHA512Stateclass represents the state of a SHA-512 hash calculation. - SHAKE
- The SHAKE class represents the SHAKE (Secure Hash Algorithm KEccak) extendable-output hash function.
- SHAKE128
- SHAKE128 is an implementation of the SHAKE128 extendable-output function.
- SHAKE256
- SHAKE256 is an implementation of the SHAKE256 extendable-output function.
- SinsemillaPad
- Pads the given iterator
-
Sponge<
F extends PastaFieldElement< F> > -
SpongeMode<
F extends Object> -
Squeezing<
F extends Object> - Strobe
- Strobe is a cryptographic framework for building secure, stateful, and authenticated cryptographic protocols. Strobe-128/1600 and Strobe-256/1600 for standards compliance.
- StrobeFlags
- Class representing Strobe operation flags.
- StrobeOperation
- enum representing Strobe operations.
- StrobeSecParam
- VestaAffineNativePoint
- VestaAffinePoint
- VestaFq
- VestaFQConst
- VestaIsoAffineNativePoint
- VestaIsoAffinePoint
- VestaIsoNativePoint
- VestaIsoPoint
- VestaNativeFq
- VestaNativePoint
- VestaPoint
- VRFInOut
- The VRFInOut class represents the input and output data of a Verifiable Random Function (VRF) computation.
- VRFPreOut
- VRFProof
- The VRFProof class represents a Verifiable Random Function (VRF) proof, consisting of two components 'c' and 's'.
-
WnafBase<
SCALAR extends CryptoPrimeFieldElement< SCALAR> , G extends CryptoGroupElement<G, SCALAR> > -
WnafScalar<
SCALAR extends CryptoPrimeFieldElement< SCALAR> , G extends CryptoGroupElement<G, SCALAR> > - WnafUtils
- X25519
- Implements scalar multiplication on Curve25519 using the Montgomery ladder. This is the basis for X25519 key agreement as described in RFC 7748.
- X25519KeyConst
- X25519Keypair
- Represents an X25519 keypair used for elliptic curve Diffie-Hellman (ECDH).
- XModemCrc
- A class for calculating and verifying XModem CRC (Cyclic Redundancy Check).
- XXHash64
Enums
- EncodeType
- ExpansionMode
- The ExpansionMode enum defines different expansion modes used in Schnorr signatures (Schnorrkel).
- FF1Encoding
- Encoding modes for FF1 format-preserving encryption.
- FieldType
- JwtSupportedAlgorithm
- PastaCurveName
- SboxType
Typedefs
-
GenerateRandom
= List<
int> Function(int length) -
The
GenerateRandomtypedef defines a function signature for generating random data with a specified length. -
GroupElementDsmp
= List<
GroupElementCached> -
HashFunc<
T extends HashState> = SerializableHash< T> Function()