Skip to content

Question about truncated MAC in mediacipher.py #3260

@EvanXiaa

Description

@EvanXiaa

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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions