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

Firebase uses insecure CC_SHA1 hash algorithm #4326

ssavchenko opened this issue Nov 15, 2019 · 2 comments

Firebase uses insecure CC_SHA1 hash algorithm #4326

ssavchenko opened this issue Nov 15, 2019 · 2 comments


Copy link

ssavchenko commented Nov 15, 2019

[READ] Step 1: Are you in the right place?


[REQUIRED] Step 2: Describe your environment

  • Xcode version: 11.2.1
  • Firebase SDK version: 6.13.0
  • Firebase Component: FirebaseInstanceID
  • Component version: 6.13.0

[REQUIRED] Step 3: Describe the problem


NSData *FIRInstanceIDSHA1(NSData *data)

in FIRInstanceIDKeyPairUtilities.m

uses insecure CC_SHA1 hashing algorithm, while Apple officially considers this algorithm insecure. They state in iOS 13 CryptoKit documentation:

"This hash algorithm isn't considered cryptographically secure, but is provided for backward compatibility with older services that require it. For new services, prefer one of the secure hashes, like SHA512."


This comment has been minimized.

Copy link

chliangGoogle commented Nov 15, 2019

Thank you for bringing to our attention. FIRInstanceIDSHA1 is NOT used for cryptographic purpose for any encryption or decryption. We use this hash method on a public key string to generate a random unique string for instanceID. Firebase does not use this hash method or this public/private key string for any encryption or decryption of our secret data.

We will kick out PR soon to clarify the naming of our method to avoid more confusions. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

4 participants