Skip to content
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

Changing Random to SecureRandom, and stop deriving key from hash #3501

Open
Gax-c opened this issue May 14, 2024 · 0 comments
Open

Changing Random to SecureRandom, and stop deriving key from hash #3501

Gax-c opened this issue May 14, 2024 · 0 comments

Comments

@Gax-c
Copy link

Gax-c commented May 14, 2024

Hi, I am new to SmartTube, and when I was browsing the code I found some potential risks.

  1. Random is used
    In the file CachedContentIndex.java the Random is define here, and later it's used to generate the IV here.
    It's not secure enough, and should switch to SecreRandom for better security.

  2. Derive key from hash
    In the file AesCipherDataSource.java the nonce is generated from hash here.
    It cannot provide enough randomness and can be predictable. Generating the nonce by SecureRandom can be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant