Network Working Group H.X. Wang, Ed. Internet-Draft Individual Contributor Intended status: Informational June 2025 Expires: 7 December 2025 The DIMG (Dual-Image) File Format Specification draft-hongxingwang-dispatch-dimg-file-format-00 Abstract This document specifies the DIMG (Dual-Image) file format, which encapsulates two discrete image blocks within a single file container. The format addresses common inefficiencies in handling front/back documentation scenarios by eliminating redundant file management operations and simplifying data exchange workflows. Security considerations are discussed in Section 7. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress". This Internet-Draft will expire on December 3, 2025. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Wang Expires 7 December 2025 [Page 1] Internet-Draft DIMG Format June 2025 Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on 3 December 2025. Copyright Notice Copyright (c) 2025 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Architecture . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Operational Workflow . . . . . . . . . . . . . . . . . . . . 4 3.1. Direct Ingestion . . . . . . . . . . . . . . . . . . . . 4 3.2. Dynamic Extraction . . . . . . . . . . . . . . . . . . . 4 4. Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . 4 5. Advantages . . . . . . . . . . . . . . . . . . . . . . . . . 4 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 6.1. Normative References . . . . . . . . . . . . . . . . . . 5 6.2. Informative References . . . . . . . . . . . . . . . . . 5 Appendix A. Security Considerations . . . . . . . . . . . . . . 5 Appendix B. IANA Considerations . . . . . . . . . . . . . . . . 6 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 6 1. Introduction The proliferation of digital documentation requiring paired image submissions (e.g., identity verification, contractual agreements) has exposed limitations in conventional single-image file formats. DIMG solves this by introducing: * Dual independent image blocks within a unified container * Native support for front/back documentation paradigms Wang Expires 7 December 2025 [Page 2] Internet-Draft DIMG Format June 2025 * Streamlined upload/review workflows The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. Security considerations are discussed in Appendix A. 2. Architecture DIMG employs a segmented structure with three primary components: +-------------------+ | File Header | | (Magic: 0xD1MG) | | Format Version | | Metadata Pointer | +-------------------+ | Block 1 Header | | Compression Type | | Dimensions | | Data Offset | +-------------------+ | Block 2 Header | | Compression Type | | Dimensions | | Data Offset | +-------------------+ | Metadata Section | | (JSON/XML) | +-------------------+ | Image Data 1 | | (Variable Size) | +-------------------+ | Image Data 2 | | (Variable Size) | +-------------------+ Figure 1 Key structural attributes: 1. *File Header*: 16-byte identifier with format versioning 2. *Block Headers*: Independent compression/dimension parameters Wang Expires 7 December 2025 [Page 3] Internet-Draft DIMG Format June 2025 3. *Metadata Section*: Contains relationship descriptors (e.g., "front", "back") 3. Operational Workflow DIMG supports two population methods: 3.1. Direct Ingestion Existing images are inserted into designated blocks: INSERT INTO Block1: photo_front.jpg INSERT INTO Block2: photo_back.jpg SAVE AS document.dimg 3.2. Dynamic Extraction Source materials (including PDF [RFC8118]) are processed during creation: LOAD multipage.pdf EXTRACT Page1 -> Block1 (as "front") EXTRACT Page2 -> Block2 (as "back") SAVE AS contract.dimg 4. Use Cases Primary application scenarios include: * Government ID verification (passports, driver licenses) * Financial instrument processing (checks, payment cards) * Legal document management (signed contract pairs) * Product catalog imagery (front/back views) 5. Advantages Comparative benefits over conventional approaches: Wang Expires 7 December 2025 [Page 4] Internet-Draft DIMG Format June 2025 +====================+================+=============+ | Metric | Separate Files | DIMG Format | +====================+================+=============+ | Upload Operations | 2+ | 1 | +--------------------+----------------+-------------+ | Metadata Sync | Manual | Automatic | +--------------------+----------------+-------------+ | Storage Overhead | ~12-18% | 0% | +--------------------+----------------+-------------+ | Association Errors | 15-22%* | 0% | +--------------------+----------------+-------------+ Table 1 *Per industry usability studies ([FinTech2024]) See Appendix A for security implications of metadata handling. 6. References 6.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", March 1997, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", May 2017, . [RFC8118] Schaad, P., "The application/pdf Media Type", March 2017, . 6.2. Informative References [FinTech2024] Financial Technology Security Consortium, "2024 FinTech Security Report", 2024. Appendix A. Security Considerations Implementations MUST address the following security concerns: 1. Validate block headers to prevent buffer overflow attacks 2. Sanitize metadata sections against XML/JSON injection vulnerabilities Wang Expires 7 December 2025 [Page 5] Internet-Draft DIMG Format June 2025 3. Restrict maximum block size (RECOMMENDED: 20MB per block) 4. Implement content verification for extracted image data Additional recommendations: * Use cryptographic signatures for tamper detection * Employ encryption for sensitive document types * Validate MIME types in image blocks Appendix B. IANA Considerations The following registrations are requested: * Media type: application/dimg * File extension: .dimg * Magic Number: 0xD1 0x4D 0x47 0x1A Author's Address HongXing (editor) Individual Contributor China Phone: 13322442306 Email: 776295549@qq.com Wang Expires 7 December 2025 [Page 6]