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

RequestValidator::computeSignature uses oudated sha1 hashing function #476

Closed
greggles opened this issue May 24, 2018 · 1 comment
Closed

Comments

@greggles
Copy link

greggles commented May 24, 2018

Version: 5.19.1+

Code Snippet

base64_encode(hash_hmac("sha1", $url, $this->authToken, true));

Feature Request

The computeSignature function uses sha1 to verify that incoming requests come from Twilio. The sha1 function is increasingly unsafe as collisions have been found. It will take a coordinated effort to migrate away from this function, so it seems worth starting.

@imthepitts
Copy link
Contributor

Hi @greggles, thanks for checking with us.

We've discussed this with our security team and gotten some feedback. In short, the critical component of HMAC-SHA1 that distinguishes it from SHA-1 alone is the use of your Twilio AuthToken as a complex secret key, so while there are possible collision-based attacks on SHA-1 (and especially on MD5), HMACs are not affected by those same attacks - it's the combination of the underlying hashing algorithm (SHA-1) and the strength of the secret key (AuthToken) that protects you in this case. We are not using SHA-1 alone.

Hope that helps.

If you have further concerns, please contact our Support team: https://www.twilio.com/help/contact

Zack

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