Overview

To test for the use of broken hashing algorithms in iOS apps, we need to focus on APIs from cryptographic frameworks and libraries that are used to perform hashing operations.

Note: the Security framework only supports asymmetric algorithms and is therefore out of scope for this test.

Steps

  1. Use MASTG-TECH-0058 to extract the relevant binaries from app package.
  2. Use MASTG-TECH-0066 to look for the relevant APIs in the app binaries.

Observation

The output should contain the disassembled code of the functions using the relevant cryptographic functions.

Evaluation

The test case fails if you can find the use of broken hashing algorithms within the source code. For example:

Further Validation Required:

Inspect each reported code location using MASTG-TECH-0076 to determine whether the algorithm is used in a security-relevant context to protect sensitive data:

Stay up-to-date: This is a non-exhaustive list of broken algorithms. Make sure to check the latest standards and recommendations from organizations such as the National Institute of Standards and Technology (NIST), the German Federal Office for Information Security (BSI) or any other relevant authority in your region. This is important when building an app that uses data that will be stored for a long time. Make sure you follow the NIST recommendations from NIST IR 8547 "Transition to Post-Quantum Cryptography Standards", 2024.