Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-118814

[OpenSSL 3.0] QCryptographicHash::Keccak_256 produces the same output as Sha3_256

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS
    • 63fa92f2e (dev), 503ed57f9 (6.6), cb1491eff (tqtc/lts-6.5)

    Description

      Code

      #include <QCryptographicHash>
      #include <QDebug>
      
      int main()
      {
          const QByteArray input("Hello World!");
          qDebug() << QCryptographicHash::hash(input, QCryptographicHash::Sha3_256).toHex();
          qDebug() << QCryptographicHash::hash(input, QCryptographicHash::Keccak_256).toHex();
      }
      

       

      Expected output (using OpenSSL 1.1.1)

      "d0e47486bbf4c16acac26f8b653592973c1362909f90262877089f9c8a4536af"
      "3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0"
      

       

      Actual output (using OpenSSL 3.0.11)

      "d0e47486bbf4c16acac26f8b653592973c1362909f90262877089f9c8a4536af"
      "d0e47486bbf4c16acac26f8b653592973c1362909f90262877089f9c8a4536af"
      

       

      Example configure options

      -release -no-dbus -no-use-gold-linker -openssl-linked -platform macx-ios-clang -qt-host-path <DEPENDENCYDIR>qt-host/ -- -DOPENSSL_ROOT_DIR=<DEPENDENCYDIR>openssl-ios/ -DQT_UIKIT_SDK=iphoneos
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jgrulich Jan Grulich
            skoh-qt Sze Howe Koh
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews