In early 2025, Xteink's pocket-sized e-readers-devices already prized for their portability and week-long battery life-gained something that changes their value proposition entirely: direct access to DRM-protected ebooks from Libby and Kobo. The headline sounds like a simple feature update. But the engineering underneath is anything but trivial. Supporting public library lending on a low-power, e-ink device means solving hard problems around secure license storage, offline expiry enforcement, and authenticated content delivery-all within a hardware footprint that can't afford heavy cryptographic overhead.
Xteink's Libby integration is less about adding an app and more about proving that a constrained embedded device can participate in a modern digital rights ecosystem without compromising security or user experience. In our production work with offline-first mobile systems, we've repeatedly seen vendors underestimate the complexity of DRM clock skew, token refresh. And secure key storage. Xteink's rollout offers a useful reference architecture for anyone building content-licensed hardware, from e-readers to IoT dashboards.
This article unpacks the technical layers behind the announcement: the DRM protocol stack, OAuth device authorization, edge delivery of ACSM and EPUB files, secure storage on e-ink hardware. And the observability patterns needed to keep license lending reliable at scale. If you're a developer working on offline content systems, you'll find concrete takeaways that apply well beyond e-readers. For related work, see our deep dive on mobile app certificate pinning and token refresh strategies.
The DRM Layer Behind Library Lending on E-Ink Devices
When a user borrows a book through Libby on a Xteink device, the actual file transfer is often handled through Adobe Digital Editions (ADE) DRM. The process begins with an ACSM file-a small XML payload that contains a link to the encrypted EPUB and the license acquisition URL. The e-reader must parse the ACSM, contact the Adobe Content Server (ACS), present its device certificate, and receive a license containing the AES decryption key wrapped for that specific device.
This isn't a simple download-and-open flow. The device certificate is typically an X. 509 certificate issued during manufacturing and stored in a hardware-backed keystore. In production environments where we've integrated ACS, we found that certificate chain validation alone can add 300-800 ms to the first-launch path on low-power ARM cores. Xteink's pocket e-readers run on processors closer to a Raspberry Pi Zero than a smartphone. So every millisecond of TLS handshake and RSA decryption matters. Caching the Adobe CA roots and using ECDSA-based client certificates instead of RSA can cut that overhead considerably.
The license itself is time-limited: most library loans last 7, 14. Or 21 days. The ACS returns a license with notBefore and notAfter fields, often encoded as ISO 8601 timestamps. The e-reader's reading app must enforce these times client-side, because once the file is decrypted, there's no server to check in with. This is where many third-party readers fail-they rely on the system clock without tamper detection. And a user can simply roll back the date to keep reading an expired book. See our breakdown of secure time synchronization using NTP with leap-second handling for production systems.
OAuth 2. 0 and Device Authorization for Public Library accounts
Libby's integration on Xteink uses the OverDrive API, which authenticates users via OAuth 2. 0 Device Authorization Grant as defined in RFC 8628. The e-reader displays a short code and a URL, the user authenticates on their phone or computer. And the device polls for an access token. This flow avoids entering library card credentials on a cramped e-ink keyboard-an important usability decision. But also a security one: the device never sees the user's password, only a scoped token.
From an engineering perspective, the polling loop for device authorization is deceptively tricky. The spec says the client should poll every 5 seconds, but an e-ink device that wakes from deep sleep to poll every 5 seconds will drain its battery in hours. Xteink likely batches polling into longer intervals (30-60 seconds) and only activates the network radio during those windows. We've seen similar patterns in our own device-side OAuth implementations: using exponential backoff with a maximum of 5 minutes reduces wakeups without violating the spec's spirit. Though some authorization servers enforce strict interval metadata via the interval response field.
After obtaining the access token, the device must also manage refresh tokens. Library borrowing sessions can last weeks, but access tokens expire in hours. A well-designed token store on the e-reader keeps the refresh token in an encrypted blob separate from the decrypted content. And refreshes it opportunistically during scheduled syncs. The OverDrive API also exposes a checkouts endpoint that returns a list of active loans with their expiration timestamps, allowing the device to build a local loan cache.
Offline Access and License Caching: A Systems Design Challenge
Once a user borrows a book, they expect to read it on an airplane or in a subway tunnel-completely offline. That means the DRM license, the decryption key. And the encrypted EPUB must all be available without any network call. But the license's expiration time is still enforced locally. This creates a clock trust problem: if the device's RTC drifts backward, an expired book becomes readable again. Xteink's pocket readers, like many embedded devices, have a real-time clock that can drift by seconds or minutes per day. A strict NTP-disciplined clock is essential; RFC 5905 defines NTP, but mobile devices often use SNTP with coarse polling. A reliable option stores the last known trusted time from a server and uses a monotonic counter to detect backwards jumps.
License caching also raises a storage question. A typical library EPUB is 1-5 MB, and a license file is under 1 KB. But a power user might have ten loans cached. Clearing expired loans requires a scheduled job that runs at boot and at regular intervals-but if the job relies on the system clock and the clock is wrong, it might delete a loan that hasn't actually expired yet. Our preferred approach is to store the license's absolute expiry as a Unix timestamp, compute remaining time using a trusted clock, and never delete based on local watch time alone. Additionally, the e-reader can re-sync licenses when it reconnects to Wi-Fi, requesting a fresh license from ACS if the local one is within 24 hours of expiry.
From a data engineering standpoint, each loan object is a tiny piece of structured data that needs versioning. If the user returns the book early via Libby on their phone, the Xteink device must eventually learn about the return. OverDrive's API provides a return endpoint. And the device can mark the local license as revoked. But revocation is only as good as the next sync. This is why offline-first systems use tombstones and conflict-free replicated data types (CRDTs) for local caches-a pattern we've covered in our article on offline data sync with CRDTs in mobile apps.
Edge Content Delivery for EPUB and ACSM Files
When a user downloads a book, the encrypted EPUB is pulled from OverDrive's content delivery network. These are static files. But they are accessed via signed URLs with short expiration windows. The ACSM file itself often contains a pre-signed URL that's valid for only 10-15 minutes after license issuance. This prevents unauthorized sharing of links and ensures that only the intended device can fetch the file. On a constrained e-reader, the download must happen over Wi-Fi. And it's often implemented as an HTTP range request to allow resumable transfers.
Edge
.Need a Custom App Built?
Let's discuss your project and bring your ideas to life.
Contact Me Today →