All entries

    Verify a Signed Payment Receipt Offline

    A signed receipt can be checked offline if the verifier already trusts the signing key and knows the exact encoding.

    A verifier compares two rows of receipts and linked signatures
    Conceptual pixel-art illustration.

    A signed receipt can be checked offline if the verifier already trusts the signing key and knows the exact encoding.

    Build the example

    Create a small fictional receipt with amount, currency, timestamp and previous entry digest. Serialize with a specified canonical encoding, hash it and sign using an asymmetric test key. Give the verifier the public key through a trusted channel. A hash chain can connect records, and a signature binds the payload to the key.

    Construct two synthetic receipts that share one field value but have different receipt IDs and previous digests. Verify each record and the chain as separate checks. If the last record is removed, an offline verifier needs a trusted expected head to know the tail was truncated. State whether that extra anchor is available.

    Watch the failure boundary

    Sign a domain-specific payload so a receipt signature cannot be reused as proof for another operation. Record the algorithm and key identifier alongside the packet. A key rotation can leave historical receipts valid if the verifier retains trusted public keys for those periods. Test verification after a rotation with two fictional keys.

    Verify the behavior

    Change one digit in the amount, remove a middle record and swap two records. Verify that each edit is detected. A correctly signed document can still describe incorrect source data, and checking an offline packet does not establish a provider’s latest payment state.

    FURTHER READING

    Sources

    Technical references checked .

    END OF ENTRY / 58
    Eeshan Singh with Big Ben in London
    BEHIND THE JOURNAL

    Eeshan Singh

    I’m Eeshan Singh Pokharia, an AI Full Stack Developer and CoFounder of UltraFit360. I work across AI features, full-stack product development, and web and mobile experiences—from Figma and frontend interactions to the systems behind them.

    Sign a domain-specific payload so a receipt signature cannot be reused as proof for another operation. Record the algorithm and key identifier alongside the packet. A key rotation can leave historical receipts valid if the verifier retains trusted public keys for those periods. Test verification after a rotation with two fictional keys.

    Meet the author
    THE CONVERSATION

    Your side of the story.