google / google/ExoPlayer

Add support for AndroidKeystore Symmetric Keys with AESCipherDataSource and AESCipherDataSink

Open
#4,193 3 comments 0 reactions 1 assignee Claimed by @AquilesCanta View on GitHub
enhancement low priority
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

I'm attempting to implement offline playback, using ExoPlayer 2 CacheDataSource with an AesCipherDataSource and an AesCipherDataSink. The content is stored offline in a service that runs in the background. Currently the only way I have found to provide a key is by generating it myself using SecureRandom and providing the bytes to the AesCipherDataSink constructor. In order to securely and dynamically generate secret keys for use in both the AesCipherDataSink during caching and the AesCipherDataSource during playback, I'd like to be able to use the AndroidKeystore. As designed, the AndroidKeystore will not provide the key material for use inside of the app. Can you implement a way for us to use a keystore along with keyalias and any protection parameters require to retrieve the key from the keystore and then use that during encryption and decryption?

I'm currently using ExoPlayer 2.7.3

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.