Overview
VoicePact uses cryptographic digital signatures to ensure contract authenticity and non-repudiation. Each party’s confirmation is signed with unique cryptographic keys derived from their phone number, creating legally binding digital signatures.Cryptographic Security
Ed25519 elliptic curve signatures for maximum security
Non-Repudiation
Parties cannot deny signing once signature is recorded
SMS Integration
Simple SMS confirmation creates cryptographic signature
Audit Trail
Complete signature history with timestamps and metadata
How It Works
Key Derivation
Unique signing keys are derived from the party’s phone number using PBKDF2 key derivation.
Signature Generation
When a party confirms via SMS/USSD, a digital signature is generated using their derived key.
Signature Recording
The signature is stored in the database with timestamp, IP address, and user agent.
Signature Methods
VoicePact supports multiple signature methods:- sms_confirmation: Reply to SMS with YES/NO command
- ussd_confirmation: Confirm through USSD menu
- voice_confirmation: Verbal confirmation during call
- api_signature: Direct API call with authentication
Creating Signatures
Via SMS Confirmation
When a party replies to a contract SMS:- Parses the contract ID
- Derives the signing key for the phone number
- Generates a cryptographic signature
- Records the signature in the database
Via API
Create a signature programmatically:Signature Generation
The cryptographic process:Signature Components
A signature includes:- Contract Data: Hash of contract content
- Phone Number: Signer’s identifier
- Timestamp: When signature was created
- Message: Combined string that is signed
Key Derivation
Signing keys are derived from phone numbers:- Each phone number has a unique key
- Keys are deterministic (same phone = same key)
- Keys cannot be reverse-engineered
- Master key adds additional security layer
Signature Verification
Verify a signature:Time-Window Verification
Signatures are verified with time-window tolerance:- Clock synchronization differences
- Network delays
- Processing time variations
Database Model
Signatures are stored with complete audit information:Signature Status
Signatures progress through states:SMS Confirmation Codes
Generate 6-digit confirmation codes:Code Verification
Contract Hash Generation
Every contract gets a unique cryptographic hash:Hash Algorithm
VoicePact uses BLAKE2b or SHA-256:Contract Integrity Validation
Verify contract hasn’t been tampered with:Audit Signatures
Every contract action is signed for audit trail:Audit Verification
Key Pair Generation
Generate Ed25519 key pairs:Webhook Signatures
Secure webhook payloads with HMAC signatures:Webhook Verification
Session Tokens
Generate secure session tokens for USSD/API:Data Encryption
Encrypt sensitive contract data:- PBKDF2 key derivation
- 100,000 iterations
- Random salt per encryption
- Context-specific keys
Payment References
Generate unique payment reference codes:Contract Verification Codes
Generate human-readable verification codes:Security Best Practices
Key Management
Key Management
- Store master keys in secure environment variables
- Use different keys for development/production
- Rotate keys periodically
- Never log private keys
Signature Validation
Signature Validation
- Always verify signatures before trusting data
- Check signature expiration times
- Validate signer authority for contract
- Log failed verification attempts
Audit Trail
Audit Trail
- Sign all critical actions
- Store complete signature metadata
- Include IP addresses and timestamps
- Make audit logs immutable
Webhook Security
Webhook Security
- Verify all webhook signatures
- Use HTTPS for webhook endpoints
- Implement replay attack prevention
- Rate limit webhook processing
Error Handling
Legal Considerations
Digital signatures in VoicePact:- Legally Binding: Meet requirements for electronic signatures in many jurisdictions
- Non-Repudiation: Parties cannot deny signing
- Authentication: Phone number confirms identity
- Integrity: Any tampering is detectable
- Audit Trail: Complete record of all signatures
Performance
Signature operations are highly optimized:- Key Derivation: ~100ms (cached per session)
- Signature Generation: <10ms
- Signature Verification: <10ms
- Hash Generation: <1ms
Next Steps
Voice Contracts
Create contracts that require signatures
SMS Verification
Understand SMS-based signing
USSD Integration
Sign via USSD menus
Mobile Money
Cryptographically secure payments