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

Question about truncated MAC in mediacipher.py #3260

Open
EvanXiaa opened this issue Apr 24, 2024 · 0 comments
Open

Question about truncated MAC in mediacipher.py #3260

EvanXiaa opened this issue Apr 24, 2024 · 0 comments
Assignees

Comments

@EvanXiaa
Copy link

EvanXiaa commented Apr 24, 2024

Hey guys, I just noticed that the MAC encoded are truncated here.

        mac = hmac.new(mac_key, digestmod=hashlib.sha256)
        mac.update(iv)
        mac.update(ciphertext)

        return ciphertext + mac.digest()[:10]

Curious about why we are not using the complete MAC here for better security?

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

2 participants