Development & Integration Guides
Comprehensive guides for developing with and integrating MetaMUI Crypto Primitives into your applications.
Overview
This section provides practical guides for developers working with MetaMUI Crypto Primitives, covering everything from basic usage to advanced integration scenarios.
Guide Categories
🚀 Getting Started
💻 Development Guides
🔄 Migration Guides
- Classical to Post-Quantum Migration
- Version Migration Guide
- API Migration Strategies
- Legacy System Integration
🔧 Implementation Guides
Classical Algorithms
Post-Quantum Algorithms
📦 Package Management
🔒 Security Guides
Quick Reference Guides
Common Tasks
- Generating secure random numbers
- Creating and verifying signatures
- Encrypting and decrypting data
- Key derivation and management
- Password hashing
Integration Patterns
- Client-server encryption
- End-to-end encryption
- Hybrid encryption schemes
- Key agreement protocols
- Zero-knowledge proofs
Code Examples
Basic Encryption (TypeScript)
import { AES256GCM } from '@metamui/aes-256-gcm';
// Generate a key
const key = AES256GCM.generateKey();
// Encrypt data
const plaintext = new TextEncoder().encode('Hello, World!');
const { ciphertext, nonce, tag } = await AES256GCM.encrypt(key, plaintext);
// Decrypt data
const decrypted = await AES256GCM.decrypt(key, ciphertext, nonce, tag);
Post-Quantum Key Exchange
import { MLKEM768 } from '@metamui/mlkem768';
// Generate keypair
const { publicKey, secretKey } = await MLKEM768.keypair();
// Encapsulation (sender)
const { ciphertext, sharedSecret } = await MLKEM768.encapsulate(publicKey);
// Decapsulation (receiver)
const receivedSecret = await MLKEM768.decapsulate(ciphertext, secretKey);
Best Practices
- Algorithm Selection
- Use post-quantum algorithms for long-term security
- Consider hybrid approaches for transition periods
- Match algorithm strength to data sensitivity
- Key Management
- Never hard-code keys
- Use secure key derivation functions
- Implement proper key rotation
- Error Handling
- Handle cryptographic errors securely
- Avoid leaking information through error messages
- Implement proper logging without exposing sensitive data