A blueprint for formal verification of Apple corecrypto

(security.apple.com)

113 points | by hasheddan 1 day ago

5 comments

  • AlotOfReading 21 hours ago
    SAW/Cryptol are amazingly easy to use compared to other formal methods tools. It's a shame that C++ is still popular in high assurance spaces, because the tooling for it and the ability to write safe code is so much worse than C these days.
    • pjmlp 15 hours ago
      When did C got safe strings and arrays?

      Ideally neither C nor C++ should be used when security matters.

      • Nokinside 11 hours ago
        Explain to someone like me who uses C in safety-critical software in aerospace and defense why not?

        For me, choosing the language is not enough. It's the tooling that goes far beyond the language that is important for safety and quality of compiler and runtime. C has very mature tooling options. So does ADA.

        https://www.absint.com/astree/index.htm

        Abstract Interpretation in a Nutshell https://www.di.ens.fr/~cousot/AI/IntroAbsInt.html

        • pjmlp 10 hours ago
          Explain to us why you are not allowed to use 100% of ISO C, without certification processes that castrate C to the point it feels like Ada 83 with curly brackets.

          Proceses that outside high integrity computing no one is willing to make themselves go through without legal requirements and liability.

          Most of it because during 1980's it was cheaper to advocate for C plus certification than pay for Ada compilers and developers.

          • Nokinside 10 hours ago
            Because we want to write correct code. We want to verify the absence of many types of errors where amateurish language war stuff like Rust vs C does not even scratch the surface.

            I would propose that we change your original statement "Ideally neither C nor C++ should be used when security matters." into:

            "Ideally people who don't care about secrurity should not write code when security matters."

            Can we agree that this is better than talking about programming languages?

            • pjmlp 9 hours ago
              Except security matters everywhere in modern computing, and the world is full of amateurs that call themselves engineers, writing C without any of those tools, or legal consequences.
              • Veserv 7 hours ago
                If it mattered they would not be using C without any of those tools or techniques. Therefore, it is empirically proven that it either does not matter or they are deploying code unfit for purpose and should not be writing such code.

                And that is precisely what they said:

                > Ideally people who don't care about secrurity [sic] should not write code when security matters.

                The absence of legal consequences further supports the fact that it does not matter.

                • ethical 6 hours ago
                  There are always legal consequences, take a butchers...

                  https://www.google.com/search?q=any+case+law+to+defeat+this+...

                • pjmlp 6 hours ago
                  It does certainly matter, it needed to go beyond what is acceptable for governments and security agencies to finally start reacting, since Morris worm came to be.

                  Naturally the move fast and break things culture sees it otherwise.

      • AlotOfReading 3 hours ago
        I've never met a company I could convince to buy an Ada toolchain. Someone at Nvidia managed the feat and it's a pretty good measure of their enthusiasm that they seem to be pushing the hard work off onto adacore instead of spreading it internally.
  • H0-LawJik 23 hours ago
    The missing-step bug in early ML-DSA is the perfect case for SAW. rare inputs that pass code review because the line that should be there doesn't look absent, it looks like the next line is correct. tests wouldn't catch it unless someone happened to roll exactly the right inputs.
    • FiloSottile 12 hours ago
      I would really like to look at the bug and whether we could have caught it with conventional testing, but it doesn't look like Apple actually disclosed it?
  • FabHK 18 hours ago
    Had totally forgotten that Apple had rolled out post-quantum crypto (ML-KEM and ML-DSA, FIPS 203 and FIPS 204, respectively) already back in 2024. [1]

    Slightly off topic, but it's great to see "crypto" to mean cryptography, helping users to keep their data secure, and not as so often these days those silly cryptocurrency crime tokens.

    [1] https://security.apple.com/blog/imessage-pq3/

  • throwaway85825 19 hours ago
    Verified crypto is important but apple still doesnt take parser security seriously enough. They know it's insecure and offer lockdown mode instead of fixing it.
    • ethical 11 hours ago
      Can't wait to find all the holes in the github code, part-ay time!
  • ethical 11 hours ago
    [flagged]