-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCM #21
GCM #21
Conversation
CBC, for publication resources, and content-key (this last one is arguably not necessary, but the config option is available in the LCP server)
Cross posting from the Go server PR: There are several AES-256 encryptors (I documented this in the README):
|
the content key algorithm (see server readium/readium-lcp-server@7cda4ad )
…of 12 bytes, tag overhead of 16 bytes, and authenticated encryption verification (GHASH HMAC) without additional data. PROBLEM: not sure how to seek for audio/video streaming (partial HTTP byte range request). Need to test, but pretty sure the current block-align algorithm fails, and even if succeeds, auth verif will fail because MAC_AT_END)
network timeout results in authorized license reading, whereas user cancellation abandons the attempt to read the encrypted EPUB
utility function (plus, I disabled code that isn't used, using the existing USE_NET_PROVIDER preprocessor directive)
video/audio streaming, and added key building based on start of data stream, followed by block-level decryption (not working, I get a 4-byte overflow which is exactly CryptoPP::AES::BLOCKSIZE / authentication tag (16 bytes) minus the initialization vector (12 bytes)...not sure why yet.
audio/video streaming (GCM decryption)
12-bytes initialization vector). Videos now play the first milliseconds, but decrypted cypher stream is subsequently totally scrambled.
basic CBC-like initialization vector / key setup (fails)
Merging now with non-working AES-256-GCM decryption of partial buffers (HTTP byte range requests). CryptoPP does not seem to implement "seeking" in the pipelining API (pump() etc.) which would make it easy to synchronize the IV / key in order to decode blocks of data at random access locations in the cypher text. TODO (will post a separate issue) |
compiling implementation of AES GCM (needs testing) as alternative to CBC, for publication resources, and content-key (this last one is arguably not necessary, but the config option is available in the LCP server)