Expand description
§txgate-crypto
Cryptographic operations for the TxGate signing service.
§Internal Crate Warning
This crate is an internal implementation detail of txgate.
It is published to crates.io only because Cargo requires all dependencies to be published. The API is unstable and may change without notice between any versions, including patch releases.
Do not depend on this crate directly. Instead:
- For the signing server binary:
cargo install txgate - For programmatic access: Open an issue at https://github.com/txgate-project/txgate to discuss a stable public API.
This crate provides all cryptographic functionality:
§Modules (planned)
keys- Key generation, storage, and managementsigning- Transaction signing implementationsverify- Signature verificationkms- Key Management Service integrations (AWS KMS,HashiCorpVault, etc.)algorithms- Supported cryptographic algorithms (ECDSA,EdDSA, etc.)
§Supported Algorithms (planned)
- ECDSA (secp256k1) - Bitcoin, Ethereum, EVM chains
EdDSA(Ed25519) - Solana, NEAR, etc.- SR25519 - Substrate-based chains
§Security
This crate follows best practices for cryptographic implementations:
- No unsafe code allowed
- Constant-time operations where applicable
- Secure memory handling for key material
Re-exports§
pub use encryption::decrypt_key;pub use encryption::encrypt_key;pub use encryption::EncryptedKey;pub use encryption::ENCRYPTED_KEY_LEN;pub use encryption::ENCRYPTION_VERSION;pub use encryption::NONCE_LEN;pub use encryption::PLAINTEXT_LEN;pub use encryption::SALT_LEN;pub use encryption::TAG_LEN;pub use keys::SecretKey;pub use keys::SecretKeyError;pub use keys::SECRET_KEY_LEN;pub use keypair::Ed25519KeyPair;pub use keypair::Ed25519PublicKey;pub use keypair::Ed25519Signature;pub use keypair::KeyPair;pub use keypair::Secp256k1KeyPair;pub use keypair::Secp256k1PublicKey;pub use keypair::Secp256k1Signature;pub use signer::Chain;pub use signer::CurveType;pub use signer::Ed25519Signer;pub use signer::Secp256k1Signer;pub use signer::Signer;pub use store::FileKeyStore;pub use store::KeyStore;
Modules§
- encryption
- AEAD encryption for key material at rest.
- keypair
- Cryptographic key pair traits and implementations.
- keys
- Cryptographic key types with secure memory handling.
- signer
- High-level signing traits and implementations.
- store
- Key storage traits and implementations.