SecurePDF (SPDF) is a secure document format designed to prevent malicious code injection, ensure document integrity, and provide end-to-end encryption. Unlike traditional PDF, SPDF uses a JSON-based structure with mandatory cryptographic signatures.
- No Arbitrary Code Execution: No PostScript, JavaScript, or embedded executables
- Cryptographic Signatures: Mandatory digital signatures with certificate chains
- Content Validation: Strict validation of all document components
- End-to-End Encryption: AES-256-GCM encryption for content
- Integrity Verification: SHA-3 hashes for each document component
- Modification History: Blockchain-style audit trail
{
"spdf": {
"version": "1.0.0",
"created": "2025-01-24T10:00:00Z",
"id": "uuid-v4"
},
"metadata": {
"title": "Document Title",
"author": "Author Name",
"subject": "Subject",
"keywords": ["keyword1", "keyword2"],
"permissions": {
"print": true,
"copy": false,
"modify": false,
"annotate": true
}
},
"security": {
"encryption": {
"algorithm": "AES-256-GCM",
"key_derivation": "PBKDF2",
"salt": "base64-encoded-salt",
"iterations": 100000
},
"signature": {
"algorithm": "RSA-PSS",
"hash_algorithm": "SHA3-256",
"certificate": "base64-encoded-cert",
"signature": "base64-encoded-signature",
"timestamp": "RFC3161-timestamp"
},
"content_hashes": {
"text": "sha3-256-hash",
"images": ["sha3-256-hash1", "sha3-256-hash2"],
"forms": "sha3-256-hash"
}
},
"content": {
"pages": [
{
"id": "page-uuid",
"width": 595.28,
"height": 841.89,
"elements": [
{
"type": "text",
"id": "text-uuid",
"x": 72,
"y": 720,
"width": 451.28,
"height": 20,
"content": "encrypted-base64-text",
"style": {
"font": "Arial",
"size": 12,
"color": "#000000",
"bold": false,
"italic": false
}
},
{
"type": "image",
"id": "image-uuid",
"x": 72,
"y": 600,
"width": 200,
"height": 100,
"format": "PNG",
"data": "encrypted-base64-image",
"alt": "Image description"
}
]
}
],
"forms": {
"fields": [
{
"id": "field-uuid",
"type": "text",
"name": "field_name",
"page": 0,
"x": 72,
"y": 500,
"width": 200,
"height": 20,
"required": false,
"validation": {
"type": "text",
"max_length": 100,
"pattern": "^[a-zA-Z0-9\\s]+$"
}
}
]
}
},
"audit_trail": [
{
"timestamp": "2025-01-24T10:00:00Z",
"action": "created",
"user": "user-certificate-fingerprint",
"previous_hash": null,
"hash": "sha3-256-hash"
}
]
}- Content is encrypted using AES-256-GCM
- Key derivation uses PBKDF2 with high iteration count
- Unique salt per document
- Authenticated encryption prevents tampering
- Mandatory RSA-PSS signatures with SHA3-256
- X.509 certificate chains for identity verification
- RFC3161 timestamping for non-repudiation
- Signature covers entire document structure
- Whitelist-based element types (text, image, form)
- Strict validation of allowed image formats (PNG, JPEG, WebP)
- No embedded scripts or executable content
- Form validation with safe input patterns
- SHA3-256 hashes for each content element
- Merkle tree structure for efficient verification
- Tamper detection through hash validation
- Audit trail with blockchain-like properties
- UTF-8 text content
- Standard fonts (Arial, Times, Helvetica, Courier)
- Basic styling (bold, italic, color, size)
- No dynamic content or scripts
- PNG, JPEG, WebP formats only
- Maximum resolution: 4096x4096
- Embedded as encrypted base64
- Alt text for accessibility
- Text inputs with validation
- Checkboxes and radio buttons
- Dropdown selections
- No executable form actions
- Simple text annotations
- Highlights and notes
- No rich media or scripts
- Strict JSON schema validation
- Certificate chain verification
- Signature validation before content access
- Hash verification for all elements
- Sandboxed execution environment
- No JavaScript execution
- Secure image rendering
- Form validation on client side
- Audit trail display
- Permission enforcement
- Mandatory signature generation
- Content encryption before serialization
- Hash calculation for all elements
- Audit trail maintenance
- Certificate validation
- No Code Execution: Complete elimination of script execution vectors
- Input Validation: Strict validation of all document elements
- Cryptographic Protection: Industry-standard encryption and signatures
- Certificate Management: Proper PKI infrastructure required
- Audit Trail: Immutable history of document modifications
- Permission Enforcement: Client-side permission validation
- Sandboxing: Isolated execution environment for viewers
- FIPS 140-2 Level 2 cryptographic requirements
- Common Criteria EAL4+ security profile
- GDPR compliance for personal data protection
- ISO 27001 information security standards
- v1.0.0: Initial specification release