<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp "&#160;">
  <!ENTITY zwsp "&#8203;">
  <!ENTITY nbhy "&#8209;">
  <!ENTITY wj "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     ipr="trust200902"
     docName="draft-midwestcyber-dspip-00"
     category="std"
     submissionType="IETF"
     consensus="true"
     tocInclude="true"
     sortRefs="true"
     symRefs="true"
     version="3">

  <front>
    <title abbrev="DSPIP">Digital Signing of Physical Items Protocol (DSPIP)</title>

    <seriesInfo name="Internet-Draft" value="draft-midwestcyber-dspip-00"/>

    <author initials="A." surname="Boell" fullname="Andy Boell" role="editor">
      <organization>Midwest Cyber LLC</organization>
      <address>
        <postal>
          <street>1022 Brickyard Dr</street>
          <city>Hooper</city>
          <region>NE</region>
          <code>68031</code>
          <country>United States of America</country>
        </postal>
        <email>contact@dspip.io</email>
        <uri>https://dspip.io</uri>
      </address>
    </author>

    <date year="2026" month="January" day="13"/>

    <area>Security</area>
    <workgroup>Internet Engineering Task Force</workgroup>

    <keyword>digital-signature</keyword>
    <keyword>shipping</keyword>
    <keyword>qr-code</keyword>
    <keyword>cryptography</keyword>
    <keyword>dns</keyword>
    <keyword>pki</keyword>

    <abstract>
      <t>This document specifies the Digital Signing of Physical Items
      Protocol (DSPIP), a cryptographic protocol for authenticating
      physical items using digitally signed QR codes. This specification
      focuses on the SHIP type for shipping and logistics applications,
      providing cryptographic authentication of packages with chain of
      custody tracking.</t>

      <t>The protocol introduces privacy-preserving delivery mechanisms
      including encrypted recipient information, last mile provider
      selection, physical anti-cloning protections through split-key
      labels, and scalable revocation and delivery confirmation systems.
      DSPIP uses DNS-based public key distribution similar to DKIM and
      supports optional blockchain integration for immutable record
      keeping. While this specification focuses on shipping applications,
      the protocol includes a type field to enable future expansion to
      other use cases.</t>
    </abstract>
  </front>

  <middle>
    <!-- Section 1: Introduction -->
    <section anchor="introduction">
      <name>Introduction</name>
      <t>Supply chain logistics require verifiable proof of package
      authenticity, chain of custody, and delivery confirmation. Current
      shipping systems rely on proprietary tracking databases with varying
      security models and no cryptographic verification of package
      authenticity or delivery. QR codes on shipping labels can be easily
      copied, leading to fraud and misdirection of packages.</t>

      <t>DSPIP provides a cryptographic protocol specifically designed for
      shipping and logistics, enabling verification of package origin,
      custody chain, and delivery while protecting recipient privacy. The
      protocol addresses the fundamental challenge of QR code cloning
      through physical binding mechanisms and provides privacy-preserving
      delivery that reveals recipient information only to authorized last
      mile providers.</t>

      <t>By using the secp256k1 elliptic curve, DSPIP keys are compatible
      with major blockchain networks, allowing optional integration for
      immutable custody records while not requiring blockchain for basic
      operation. The protocol includes a type field set to "SHIP" for
      this specification, enabling future expansion to other applications.</t>

      <t>The design goals for DSPIP shipping protocol are:</t>
      <ul>
        <li>Cryptographic Authentication: Verify package origin and integrity
        through digital signatures</li>
        <li>Privacy Preservation: Protect recipient information during transit
        through encryption</li>
        <li>Anti-Cloning: Prevent QR code duplication through physical
        binding mechanisms</li>
        <li>Decentralized Verification: No central authority required for
        package validation</li>
        <li>Offline Capable: Verification possible without network
        connectivity</li>
        <li>Delivery Confirmation: Cryptographic proof of successful delivery</li>
        <li>Scalable Operations: Support high-volume shipping with efficient
        revocation and confirmation systems</li>
        <li>Standards Compliant: Integrate with existing logistics systems
        and standards</li>
        <li>Cost Effective: Near-zero marginal cost per package authenticated</li>
        <li>Blockchain Optional: Can integrate with blockchain but operates
        independently</li>
      </ul>

      <t>DSPIP follows a "digital envelope" paradigm for shipping labels:</t>
      <ul>
        <li>Envelope exterior (publicly readable): Sender identity, last mile
        provider destination, tracking number, and timestamp are encoded
        but not encrypted. This functions like the address on a physical
        envelope.</li>
        <li>Signature (authenticity seal): A cryptographic signature proves
        the label was created by the claimed sender and has not been
        tampered with, similar to a shipping seal.</li>
        <li>Private contents (encrypted): The actual recipient address and
        delivery instructions are encrypted for the last mile provider,
        like the contents of a sealed package that only the authorized
        recipient can access.</li>
      </ul>
      <t>This model protects recipient privacy while maintaining package
      routability and authenticity verification.</t>
    </section>

    <!-- Section 1.1: Requirements Language -->
    <section anchor="requirements-language">
      <name>Requirements Language</name>
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref target="RFC2119"/>
      <xref target="RFC8174"/> when, and only when, they appear in all
      capitals, as shown here.</t>
    </section>

    <!-- Section 2: Relationship to Existing Standards -->
    <section anchor="existing-standards">
      <name>Relationship to Existing Standards</name>
      <t>DSPIP builds upon established standards while introducing novel
      shipping-specific features:</t>

      <t>Standards This Document Builds Upon:</t>
      <ul>
        <li><xref target="RFC6376"/> (DKIM): DSPIP adopts DKIM's DNS-based public key
        distribution model for shipping providers</li>
        <li><xref target="RFC8017"/> (PKCS #1): Uses established cryptographic specifications</li>
        <li><xref target="ISO18004"/>: Utilizes QR code standards for label encoding</li>
        <li><xref target="SEC2"/>: Employs secp256k1 curve specifications (same curve
        as used by Bitcoin <xref target="Bitcoin"/> and Ethereum <xref target="Ethereum"/>)</li>
        <li><xref target="ECIES"/>: Elliptic Curve Integrated Encryption Scheme for
        recipient privacy</li>
        <li><xref target="Ed25519"/>: For split-key label authentication</li>
      </ul>

      <t>Related Shipping Standards:</t>
      <ul>
        <li><xref target="GS1-EPCIS"/>: DSPIP adds cryptographic authentication to event-
        based visibility</li>
        <li><xref target="EDI856"/> (ASN): DSPIP enables verification without central
        database</li>
        <li>Last Mile Standards: DSPIP adds encrypted routing for privacy</li>
      </ul>

      <t>Novel Contributions:</t>
      <ul>
        <li>Privacy-Preserving Delivery: Encrypted recipient information
        with last mile provider routing</li>
        <li>Physical Anti-Cloning: Split-key labels with destructive reveal
        prevent QR code duplication</li>
        <li>Cryptographic Proof of Delivery: Challenge-response confirmation
        without key exposure</li>
        <li>Scalable Confirmation Systems: Bulk revocation and delivery
        lists for high-volume operations</li>
      </ul>
    </section>

    <!-- Section 3: Protocol Overview -->
    <section anchor="protocol-overview">
      <name>Protocol Overview</name>

      <section anchor="data-flow">
        <name>Data Flow</name>
        <t>The DSPIP shipping protocol flow consists of the following steps:</t>
        <ol>
          <li>Payload Creation: Sender creates a JSON payload containing sender information, last mile provider or recipient, tracking number, and timestamp</li>
          <li>Privacy Selection: Choose privacy mode (standard, encrypted, or split-key) based on security requirements</li>
          <li>Recipient Encryption: For privacy modes, encrypt recipient information with last mile provider's public key</li>
          <li>Encoding: Payload is Base64 encoded to ensure consistent handling</li>
          <li>Signing: Sender signs the data using their private key (or label's private key for split-key mode)</li>
          <li>QR Generation: Complete data structure is serialized and encoded as a QR code</li>
          <li>Label Application: QR code is printed on shipping label and attached to package</li>
          <li>Transit Scanning: Carriers scan QR code at each custody transfer point</li>
          <li>DNS Lookup: Scanner queries DNS TXT record to retrieve public key</li>
          <li>Verification: Scanner verifies signature (or requests Zone B reveal for split-key)</li>
          <li>Privacy Decryption: Last mile provider decrypts recipient information using their private key</li>
          <li>Delivery: Package delivered to actual recipient address</li>
          <li>Confirmation: Cryptographic proof of delivery recorded</li>
          <li>Optional Blockchain: Custody chain recorded for audit trail</li>
        </ol>
      </section>

      <section anchor="protocol-workflow">
        <name>Protocol Workflow</name>
        <figure anchor="fig-workflow">
          <name>DSPIP Shipping Flow</name>
          <artwork type="ascii-art"><![CDATA[
+--------+                    +----------+              +---------+
| Sender |                    | Carrier  |              |Recipient|
+--------+                    +----------+              +---------+
    |                              |                        |
    | 1. Create Shipping Payload   |                        |
    |    {sender, provider,        |                        |
    |     trackingId, timestamp}   |                        |
    |                              |                        |
    | 2. Select Privacy Mode       |                        |
    | 3. Encrypt Recipient         |                        |
    | 4. Base64 Encode             |                        |
    | 5. Sign with Private Key     |                        |
    | 6. Generate QR Code          |                        |
    | 7. Attach Label to Package   |                        |
    |==============================|========================|
    |                    8. Scan QR Code                    |
    |                    9. Parse Data                      |
    |                   10. DNS Lookup                      |
    |                   11. Verify Signature                |
    |                   12. Check Revocation                |
    |                   13. Decrypt Recipient               |
    |                   14. Deliver Package                 |
    |                         |=========================>   |
    |                   15. Delivery Confirmation           |
    |                         |<========================    |
    |                   16. Record Proof                    |
]]></artwork>
        </figure>
      </section>
    </section>

    <!-- Section 4: Data Formats -->
    <section anchor="data-formats">
      <name>Data Formats</name>

      <section anchor="payload-structure">
        <name>Payload Structure</name>
        <t>The payload contains shipping information encoded as JSON. Country codes use <xref target="ISO3166"/> alpha-2 format:</t>
        <sourcecode type="json"><![CDATA[
{
  "type": "SHIP",               // REQUIRED: Fixed for shipping
  "issuer": {                   // REQUIRED: Sender information
    "name": "string",
    "organization": "string",
    "address": {
      "street1": "string",
      "city": "string",
      "state": "string",
      "postalCode": "string",
      "country": "string"       // REQUIRED: per ISO3166 alpha-2
    }
  },
  "subject": {                  // REQUIRED: Recipient/Provider
    "name": "string",
    "lastMileProvider": "string",
    "address": { ... }
  },
  "itemId": "string",           // REQUIRED: Tracking number
  "timestamp": number,          // REQUIRED: Unix timestamp (ms)
  "typeData": {}                // SHIP-specific fields
}
]]></sourcecode>
      </section>

      <section anchor="ship-type-fields">
        <name>SHIP Type Payload Fields</name>
        <t>The typeData object contains shipping-specific information including privacy mode, carrier details, customs information, and delivery confirmation settings.</t>
      </section>

      <section anchor="privacy-modes">
        <name>Privacy Modes</name>
        <t>DSPIP supports three privacy modes for shipping:</t>

        <section anchor="standard-mode">
          <name>Standard Mode (Legacy)</name>
          <t>Traditional shipping with full recipient information visible.</t>
        </section>

        <section anchor="encrypted-mode">
          <name>Encrypted Mode</name>
          <t>Privacy-preserving with encrypted recipient data. The recipient's address and delivery instructions are encrypted with the last mile provider's public key.</t>
        </section>

        <section anchor="split-key-mode">
          <name>Split-Key Mode</name>
          <t>Maximum security with physical anti-cloning. Uses Ed25519 keys printed in separate scratch-off zones on the physical label.</t>
        </section>
      </section>

      <section anchor="qr-data-structure">
        <name>QR Data Structure</name>
        <t>The complete QR code data structure contains:</t>
        <ul>
          <li>protocol: Fixed string "DSPIP"</li>
          <li>version: Semantic version string ("1.0")</li>
          <li>type: Fixed to "SHIP" for this specification</li>
          <li>keyLocator: DNS path for public key lookup</li>
          <li>encodedPayload: Base64-encoded JSON payload</li>
          <li>signature: Hex-encoded ECDSA signature</li>
          <li>privateMessage: Optional Base64-encoded encrypted message</li>
        </ul>
      </section>

      <section anchor="serialization-format">
        <name>Serialization Format</name>
        <t>QR data MUST be serialized using pipe (|) delimiters:</t>
        <artwork><![CDATA[
DSPIP|<version>|<type>|<keyLocator>|<payload>|<sig>[|<msg>]
]]></artwork>
        <t>The pipe delimiter was chosen for its low frequency in Base64 and domain names. Implementations MUST validate that exactly 6 or 7 pipe-delimited fields are present.</t>
      </section>
    </section>

    <!-- Section 5: DNS Key Distribution -->
    <section anchor="dns-key-distribution">
      <name>DNS Key Distribution</name>
      <t>DSPIP uses DNS TXT records for public key distribution, following the model established by DKIM <xref target="RFC6376"/>.</t>

      <section anchor="key-locator-format">
        <name>Key Locator Format</name>
        <t>Key locators MUST follow this pattern:</t>
        <artwork><![CDATA[
<selector>._dspip.<domain>
]]></artwork>
        <t>Where selector is a unique identifier for the specific key, _dspip is the fixed protocol subdomain (underscore prefix per <xref target="RFC8552"/>), and domain is the organization's domain name.</t>
      </section>

      <section anchor="dns-txt-record-format">
        <name>DNS TXT Record Format</name>
        <t>The DNS TXT record MUST contain a semicolon-separated list of tag=value pairs:</t>
        <artwork><![CDATA[
v=DSPIP1; k=ec; c=secp256k1; p=<base64_public_key>; [optional]
]]></artwork>
        <t>Required tags: v (protocol version), k (key type), c (curve identifier), p (public key in Base64).</t>
        <t>Optional tags: t (creation timestamp), x (expiration), n (notes), types, auth, address, coverage.</t>

        <section anchor="address-field-format">
          <name>Address Field Format</name>
          <t>The address field specifies the physical location of signing facilities using scheme prefixes:</t>
          <ul>
            <li>plus: (DEFAULT) Open Location Code / Plus Code</li>
            <li>street: Percent-encoded street address per <xref target="RFC3986"/></li>
            <li>geo: Geographic coordinates (latitude,longitude)</li>
            <li>facility: Named facility reference</li>
          </ul>
          <t>If no scheme prefix is present, implementations MUST interpret the value as a Plus Code. See <xref target="PLUSCODE"/> for the Open Location Code specification.</t>
        </section>
      </section>

      <section anchor="selector-discovery">
        <name>Selector Discovery</name>
        <t>Organizations MAY publish a discovery record at the base _dspip subdomain to enable discovery of available selectors.</t>
      </section>

      <section anchor="key-lifecycle">
        <name>Key Lifecycle Management</name>
        <t>DSPIP keys have a defined lifecycle to ensure security while maintaining verification capability for in-transit packages.</t>
        <t>Keys transition through states: Active (can sign and verify), Verify-Only (can only verify), and Expired (invalid).</t>
        <t>For shipping applications, the RECOMMENDED key lifetime is: Active signing period of 365 days, verify-only period of 365 additional days, for a total key lifetime of 730 days (2 years).</t>

        <section anchor="record-signature">
          <name>Record Signature (rsig)</name>
          <t>The rsig field provides cryptographic authentication of lifecycle metadata within the DNS record itself, protecting against unauthorized modification by intermediate DNS resolvers.</t>
        </section>
      </section>

      <section anchor="key-revocation">
        <name>Key Revocation</name>
        <t>When a signing key is compromised or must be retired, organizations MUST have a mechanism to inform verifiers. The key revocation record provides a dedicated endpoint for key status.</t>
      </section>

      <section anchor="package-revocation">
        <name>Package Revocation</name>
        <t>Individual packages may need to be revoked due to loss, theft, or fraud. DSPIP provides individual revocation records and bulk revocation lists for scalability.</t>
        <t>Lists MUST be served over HTTPS and SHOULD auto-prune entries older than 180 days. Lists MAY use <xref target="BLOOM"/> filters for privacy.</t>
      </section>

      <section anchor="delivery-confirmation-dist">
        <name>Delivery Confirmation Distribution</name>
        <t>Last mile providers MAY publish delivery confirmations via DNS TXT records pointing to confirmation endpoints.</t>
      </section>
    </section>

    <!-- Section 6: Cryptographic Operations -->
    <section anchor="crypto-operations">
      <name>Cryptographic Operations</name>

      <section anchor="key-generation">
        <name>Key Generation</name>
        <t>DSPIP uses the secp256k1 elliptic curve as specified in <xref target="SEC2"/>:</t>
        <ul>
          <li>Curve: secp256k1</li>
          <li>Private key: 256 bits (32 bytes)</li>
          <li>Public key: 264 bits (33 bytes compressed)</li>
        </ul>
        <t>For split-key labels, <xref target="Ed25519"/> is used with 256-bit keys.</t>
      </section>

      <section anchor="signature-creation">
        <name>Signature Creation</name>
        <t>Standard signature using ECDSA:</t>
        <ol>
          <li>Construct signable content: signable = protocol | version | type | keyLocator | payload</li>
          <li>Calculate SHA-256 hash of signable content</li>
          <li>Sign hash using ECDSA with private key</li>
          <li>Encode signature in DER format</li>
          <li>Convert to hexadecimal string</li>
        </ol>
      </section>

      <section anchor="signature-verification">
        <name>Signature Verification</name>
        <t>Standard verification reconstructs signable content, calculates SHA-256 hash, retrieves public key from DNS, and verifies ECDSA signature.</t>
        <t>Split-key verification requires Zone B reveal and uses Ed25519 verification without DNS lookup.</t>
      </section>
    </section>

    <!-- Section 7: Verification Process -->
    <section anchor="verification-process">
      <name>Verification Process</name>

      <section anchor="verification-algorithm">
        <name>Verification Algorithm</name>
        <t>Input: QR code data string. Output: Verification result with validity status.</t>
        <ol>
          <li>PARSE: Split QR data by pipe delimiter, validate 6 or 7 fields present</li>
          <li>VALIDATE PROTOCOL: Protocol MUST equal "DSPIP", Version MUST be compatible, Type MUST equal "SHIP"</li>
          <li>DECODE PAYLOAD: Base64 decode and parse JSON</li>
          <li>DNS LOOKUP: Query DNS TXT record for keyLocator</li>
          <li>VERIFY SIGNATURE: Verify with public key</li>
          <li>PRIVACY DECRYPTION: Decrypt encryptedRecipient if last mile provider</li>
          <li>REVOCATION CHECK: Query revocation list</li>
          <li>OPTIONAL BLOCKCHAIN: Record custody transfer</li>
        </ol>
      </section>

      <section anchor="privacy-delivery-protocol">
        <name>Privacy-Preserving Delivery Protocol</name>
        <t>The privacy-preserving delivery protocol protects recipient information during transit through ECIES encryption with the last mile provider's public key.</t>
        <t>Recipients are encrypted using ECIES over secp256k1 per <xref target="ECIES"/>:</t>
        <ol>
          <li>Generate ephemeral key pair (r, R = rG)</li>
          <li>Compute shared secret: S = r * LastMilePublicKey</li>
          <li>Derive encryption key: K = KDF(S || R) using <xref target="SHA256"/></li>
          <li>Encrypt: C = AES-256-GCM(K, recipient_data) per <xref target="AES"/></li>
          <li>Output: R || C || tag</li>
        </ol>
      </section>

      <section anchor="split-key-authentication">
        <name>Physical Authentication via Split-Key Labels</name>
        <t>Split-key labels provide physical anti-cloning through two scratch-off zones containing Ed25519 key material. Zone A contains the private key (revealed at label creation), Zone B contains the public key (revealed at delivery verification).</t>
      </section>

      <section anchor="delivery-confirmation-protocol">
        <name>Delivery Confirmation Protocol</name>
        <t>Cryptographic delivery confirmation uses challenge-response protocol where the recipient proves possession of their verification key.</t>
      </section>
    </section>

    <!-- Section 8: Security Considerations -->
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>DSPIP addresses the following shipping-specific threats:</t>
      <ul>
        <li>Package Forgery: Mitigated through cryptographic signatures</li>
        <li>QR Code Cloning: Prevented through split-key labels</li>
        <li>Recipient Privacy Breach: Protected through encryption</li>
        <li>Delivery Fraud: Cryptographic proof prevents false claims</li>
        <li>Package Tampering: Signatures detect modifications</li>
        <li>Replay Attacks: Unique tracking IDs prevent reuse</li>
        <li>Man-in-the-Middle: DNSSEC protects key lookups</li>
        <li>Tracking Attacks: Privacy modes prevent correlation</li>
      </ul>

      <t>Shipping keys SHOULD use hardware security modules. Last mile
      providers MUST secure decryption keys. Organizations SHOULD rotate
      keys annually.</t>

      <t>Use encrypted mode for consumer deliveries. Limit address fields
      to necessary information. Comply with <xref target="GDPR"/> where
      applicable.</t>

      <t>Package revocation for lost/stolen items through individual records
      or bulk lists. SHIP entries expire after 180 days.</t>

      <t>Label manufacturing requires secure facilities, audit trails, no
      retention of private keys, and tamper-evident packaging.</t>
    </section>

    <!-- Section 9: IANA Considerations -->
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document requests IANA to register the following:</t>
      <ol>
        <li>Registration of "_dspip" in the "Underscored and Globally Scoped DNS Node Names" registry per <xref target="RFC8552"/></li>
        <li>Reservation of "DSPIP" as a protocol identifier</li>
        <li>Registration of DSPIP-specific DNS TXT record tags</li>
        <li>Creation of DSPIP Type Registry with initial value SHIP</li>
        <li>Creation of DSPIP Privacy Mode Registry (standard, encrypted, split-key)</li>
        <li>Creation of DSPIP Authentication Profile Registry</li>
        <li>Creation of DSPIP Key Revocation Reason Registry</li>
        <li>Creation of DSPIP Item Revocation Reason Registry</li>
        <li>Creation of DSPIP Delivery Confirmation Type Registry</li>
        <li>Creation of DSPIP Key Status Registry</li>
        <li>Creation of DSPIP Delegation Scheme Registry</li>
        <li>Creation of DSPIP Address Scheme Registry</li>
      </ol>
    </section>

  </middle>

  <back>
    <!-- References -->
    <references>
      <name>Normative References</name>

      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6376.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8552.xml"/>

      <reference anchor="SEC2" target="https://www.secg.org/sec2-v2.pdf">
        <front>
          <title>SEC 2: Recommended Elliptic Curve Domain Parameters</title>
          <author>
            <organization>Standards for Efficient Cryptography Group</organization>
          </author>
          <date year="2010" month="January"/>
        </front>
        <refcontent>Version 2.0</refcontent>
      </reference>

      <reference anchor="ECIES">
        <front>
          <title>A Survey of the Elliptic Curve Integrated Encryption Scheme</title>
          <author initials="V." surname="Gayoso Martinez" fullname="V. Gayoso Martinez"/>
          <author initials="L." surname="Hernandez Encinas" fullname="L. Hernandez Encinas"/>
          <author initials="C." surname="Sanchez Avila" fullname="C. Sanchez Avila"/>
          <date year="2010" month="August"/>
        </front>
        <refcontent>Journal of Computer Science and Engineering, Volume 2, Issue 2</refcontent>
      </reference>

      <reference anchor="Ed25519">
        <front>
          <title>High-speed high-security signatures</title>
          <author initials="D." surname="Bernstein" fullname="D. Bernstein"/>
          <date year="2012" month="September"/>
        </front>
        <seriesInfo name="DOI" value="10.1007/s13389-012-0027-1"/>
        <refcontent>Journal of Cryptographic Engineering, Volume 2, pp 77-89</refcontent>
      </reference>
    </references>

    <references>
      <name>Informative References</name>

      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8017.xml"/>

      <reference anchor="ISO18004">
        <front>
          <title>Information technology - Automatic identification and data capture techniques - QR Code bar code symbology specification</title>
          <author>
            <organization>ISO/IEC</organization>
          </author>
          <date year="2015"/>
        </front>
        <refcontent>ISO/IEC 18004:2015</refcontent>
      </reference>

      <reference anchor="ISO3166">
        <front>
          <title>Codes for the representation of names of countries and their subdivisions</title>
          <author>
            <organization>ISO</organization>
          </author>
          <date year="2020"/>
        </front>
        <refcontent>ISO 3166-1:2020</refcontent>
      </reference>

      <reference anchor="GS1-EPCIS" target="https://www.gs1.org/standards/epcis">
        <front>
          <title>EPCIS (Electronic Product Code Information Services) Standard</title>
          <author>
            <organization>GS1</organization>
          </author>
          <date year="2022"/>
        </front>
        <refcontent>Version 2.0</refcontent>
      </reference>

      <reference anchor="EDI856">
        <front>
          <title>Ship Notice/Manifest Transaction Set</title>
          <author>
            <organization>X12</organization>
          </author>
          <date year="2020"/>
        </front>
        <refcontent>ASC X12 Standard EDI 856</refcontent>
      </reference>

      <reference anchor="Bitcoin" target="https://bitcoin.org/bitcoin.pdf">
        <front>
          <title>Bitcoin: A Peer-to-Peer Electronic Cash System</title>
          <author initials="S." surname="Nakamoto" fullname="Satoshi Nakamoto"/>
          <date year="2008"/>
        </front>
      </reference>

      <reference anchor="Ethereum" target="https://ethereum.org/whitepaper/">
        <front>
          <title>Ethereum: A Next-Generation Smart Contract and Decentralized Application Platform</title>
          <author initials="V." surname="Buterin" fullname="Vitalik Buterin"/>
          <date year="2014"/>
        </front>
      </reference>

      <reference anchor="GDPR">
        <front>
          <title>Regulation (EU) 2016/679 (General Data Protection Regulation)</title>
          <author>
            <organization>European Parliament and Council</organization>
          </author>
          <date year="2016" month="April"/>
        </front>
      </reference>

      <reference anchor="AES">
        <front>
          <title>Advanced Encryption Standard (AES)</title>
          <author>
            <organization>National Institute of Standards and Technology</organization>
          </author>
          <date year="2001" month="November"/>
        </front>
        <refcontent>FIPS PUB 197</refcontent>
      </reference>

      <reference anchor="SHA256">
        <front>
          <title>Secure Hash Standard (SHS)</title>
          <author>
            <organization>National Institute of Standards and Technology</organization>
          </author>
          <date year="2015" month="August"/>
        </front>
        <refcontent>FIPS PUB 180-4</refcontent>
      </reference>

      <reference anchor="PLUSCODE" target="https://github.com/google/open-location-code">
        <front>
          <title>Open Location Code (Plus Codes)</title>
          <author>
            <organization>Google</organization>
          </author>
        </front>
        <annotation>An open-source system for encoding geographic coordinates into a compact, URL-safe string.</annotation>
      </reference>

      <reference anchor="BLOOM">
        <front>
          <title>Space/Time Trade-offs in Hash Coding with Allowable Errors</title>
          <author initials="B." surname="Bloom" fullname="Burton Bloom"/>
          <date year="1970" month="July"/>
        </front>
        <refcontent>Communications of the ACM, Volume 13, Issue 7, pp 422-426</refcontent>
      </reference>
    </references>

    <!-- Appendix A: Test Vectors -->
    <section anchor="test-vectors" numbered="true" toc="include">
      <name>Test Vectors</name>

      <section anchor="test-key-pair">
        <name>Test Key Pair</name>
        <t>Private Key (hex):</t>
        <artwork><![CDATA[
e8f32e723decf4051aefac8e2c93c9c5b214313817cdb01a1494b917c8436b35
]]></artwork>
        <t>Public Key Compressed (hex):</t>
        <artwork><![CDATA[
0339a36013301597daef41fbe593a02cc513d0b55527ec2df1050e2e8ff49c85c2
]]></artwork>
        <t>Public Key Base64 (for DNS):</t>
        <artwork><![CDATA[
AzmjYBMwFZfa70H75ZOgLMUT0LVVJ+wt8QUOLo/0nIXC
]]></artwork>
      </section>

      <section anchor="test-standard-mode">
        <name>Standard Mode Shipping</name>
        <t>Payload:</t>
        <sourcecode type="json"><![CDATA[
{
  "type": "SHIP",
  "issuer": {
    "organization": "ACME Logistics",
    "address": {"city": "Omaha", "state": "NE", "country": "US"}
  },
  "subject": {
    "name": "Bob Jones",
    "address": {
      "street1": "456 Main Street",
      "city": "Lincoln",
      "state": "NE",
      "postalCode": "68501",
      "country": "US"
    }
  },
  "itemId": "TRACK-2025-000123",
  "timestamp": 1703548800000,
  "typeData": {
    "privacyMode": "standard",
    "parcelId": "TRACK-2025-000123",
    "carrier": "ACME",
    "service": "Ground"
  }
}
]]></sourcecode>
        <t>Signature (DER-encoded ECDSA/secp256k1, hex):</t>
        <artwork><![CDATA[
30440220250f55bf60f3f82031677d17e6202fbf12e31b9ce8d1541e287e1fdd8
ce40a41022056ef5cd183a674c4f5fdc5e0cac1dcfd386de2e7d505681f83104e
2b1f53a315
]]></artwork>
      </section>

      <section anchor="test-privacy-mode">
        <name>Privacy Mode Shipping</name>
        <t>Recipient data (to be encrypted):</t>
        <sourcecode type="json"><![CDATA[
{
  "recipientName": "Bob Jones",
  "address": {
    "street1": "456 Main Street",
    "apartment": "4B",
    "city": "Lincoln",
    "state": "NE",
    "postalCode": "68501"
  },
  "deliveryInstructions": "Use back door, code 4321"
}
]]></sourcecode>
      </section>

      <section anchor="test-split-key-mode">
        <name>Split-Key Mode</name>
        <t>Label Serial: LABEL-2025-ABC123</t>
        <t>Zone A Private Key (Ed25519, hex):</t>
        <artwork><![CDATA[
9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60
]]></artwork>
        <t>Zone B Public Key (Ed25519, hex):</t>
        <artwork><![CDATA[
d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a
]]></artwork>
        <t>Signature (Ed25519, hex):</t>
        <artwork><![CDATA[
1fb94d499a504e201433d0e783906a013e26c21daca3ab8c5ad1e9fcf73a1c58
c9ed3abd60802f3abaac01d35bada76ab1bf571ca1641b8d3ea62f7468fbef0f
]]></artwork>
      </section>

      <section anchor="test-dns-records">
        <name>DNS TXT Records</name>
        <t>Warehouse:</t>
        <artwork><![CDATA[
warehouse._dspip.example.com. IN TXT "v=DSPIP1; k=ec; c=secp256k1;
  p=AzmjYBMwFZfa70H75ZOgLMUT0LVVJ+wt8QUOLo/0nIXC; types=SHIP"
]]></artwork>
      </section>

      <section anchor="test-revocation-list">
        <name>Revocation List</name>
        <sourcecode type="json"><![CDATA[
{
  "version": "1.0",
  "issuer": "warehouse._dspip.example.com",
  "updated": 1703548800,
  "revoked": [
    {
      "itemId": "TRACK-2025-000123",
      "revoked": 1703548900,
      "reason": "lost"
    }
  ],
  "signature": "base64_signature"
}
]]></sourcecode>
      </section>
    </section>

    <!-- Appendix B: Implementation Guidelines -->
    <section anchor="implementation-guidelines" numbered="true" toc="include">
      <name>Implementation Guidelines</name>

      <section anchor="qr-code-generation">
        <name>QR Code Generation</name>
        <t>Recommended settings:</t>
        <ul>
          <li>Error correction level M (15%) for standard labels</li>
          <li>Error correction level Q (25%) for split-key labels</li>
          <li>Error correction level H (30%) for outdoor use</li>
          <li>Automatic version selection</li>
          <li>Binary encoding mode</li>
        </ul>
      </section>

      <section anchor="performance-benchmarks">
        <name>Performance Benchmarks</name>
        <t>Expected operation times:</t>
        <ul>
          <li>Key generation: 5-10 ms</li>
          <li>Signature creation: 2-5 ms</li>
          <li>DNS lookup: 20-100 ms (cacheable)</li>
          <li>Signature verification: 3-8 ms</li>
          <li>ECIES encryption: 10-20 ms</li>
          <li>ECIES decryption: 10-20 ms</li>
        </ul>
      </section>

      <section anchor="caching-strategy">
        <name>Caching Strategy</name>
        <t>Key records follow standard DNS caching semantics with recommended TTL of 3600-86400 seconds.</t>
        <t>Revocation lists require stricter freshness controls with recommended refresh interval of 5-15 minutes.</t>
        <t>Large-scale logistics operations SHOULD implement centralized caching infrastructure.</t>
      </section>
    </section>

    <!-- Appendix C: Use Case Examples -->
    <section anchor="use-case-examples" numbered="true" toc="include">
      <name>Use Case Examples</name>

      <section anchor="ecommerce-privacy">
        <name>E-commerce Order with Privacy</name>
        <t>Customer checkout flow with privacy-preserving delivery:</t>
        <ol>
          <li>Customer enters address, selects preferred carrier</li>
          <li>System retrieves carrier's public key, encrypts recipient</li>
          <li>Label shows only carrier destination</li>
          <li>Carrier decrypts at delivery, completes with proof</li>
        </ol>
      </section>

      <section anchor="high-value-anticloning">
        <name>High-Value Package with Anti-Cloning</name>
        <t>Split-key label flow for valuable items:</t>
        <ol>
          <li>Sender scratches Zone A, signs package, destroys private key</li>
          <li>Package transits with unverifiable signature (cloning prevented)</li>
          <li>Recipient scratches Zone B, reveals public key, verifies</li>
        </ol>
      </section>

      <section anchor="corporate-mailroom">
        <name>Corporate Mailroom Delivery</name>
        <t>Internal routing with organizational keys:</t>
        <ol>
          <li>Employee selects corporate mailroom as destination</li>
          <li>System encrypts internal routing (dept, room number)</li>
          <li>Mailroom decrypts and routes internally</li>
        </ol>
      </section>

      <section anchor="international-shipping">
        <name>International Shipping</name>
        <t>Cross-border delivery with customs compliance:</t>
        <ol>
          <li>Customs info public, recipient encrypted</li>
          <li>Customs verifies declarations, cannot see recipient</li>
          <li>Local provider decrypts and completes delivery</li>
        </ol>
      </section>
    </section>
  </back>
</rfc>
