Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt + OpenSSL & EVP_DecryptFinal_ex error bad decrypt
Forum Updated to NodeBB v4.3 + New Features

Qt + OpenSSL & EVP_DecryptFinal_ex error bad decrypt

Scheduled Pinned Locked Moved Unsolved General and Desktop
13 Posts 3 Posters 4.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    qDebug
    wrote on last edited by
    #3

    I wonder if there is some one out there using OpenSSL EVP + Qt successfully? Most of the examples are outdated and not working. And if i ask, i always hear: try something else, it is better.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #4

      Hi,

      Did you got the OpenSSL part working without Qt ?
      What examples are you referring to ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qDebug
        wrote on last edited by
        #5

        Hi SGaist!

        I'm using

        vh/0fb1R3awZqWeKpYDqlCafaRS7s49EIAPBmZXKgLo=
        

        for testing. The encoded string ist "this is a test". My key is "test" (md5).

        echo vh/0fb1R3awZqWeKpYDqlCafaRS7s49EIAPBmZXKgLo= | openssl.exe enc -d -a -A -aes-128-cbc -iv be1ff47dbd51ddac19a9678aa580ea94 -K 098f6bcd4621d373cade4e832627b4f6
        

        This works, it gets decrypted as expected like:

        YÈ])-EÖºà¯ÌSå+£gthis is a test
        

        In my code i get a bad decrypt. I did google a lot about what may the problem. I did test and try other OpenSSL versions as well. The only think i did not try yet, is building OpenSSL myself but i'm not sure if this makes any difference.

        Thanks!

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #6

          There's no need to build your own version of OpenSSL,. My question was rather: did you got EVP API working without using Qt at all ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            qDebug
            wrote on last edited by
            #7

            Like in Visual Studio? No. Since i plan to use it in Qt i started here.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #8

              No, I mean, just using plain C with char arrays etc.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • Q Offline
                Q Offline
                qDebug
                wrote on last edited by
                #9

                No, i did not.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  Then you should start by doing that. Ensure that you get it working correctly with the raw API and then you can start integrating it your GUI application.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  1
                  • Q Offline
                    Q Offline
                    qDebug
                    wrote on last edited by
                    #11

                    OK, so no one got it working in Qt yet.

                    Thanks.

                    jsulmJ 1 Reply Last reply
                    0
                    • Q qDebug

                      OK, so no one got it working in Qt yet.

                      Thanks.

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      @qDebug said in Qt + OpenSSL & EVP_DecryptFinal_ex error bad decrypt:

                      OK, so no one got it working in Qt yet.

                      How do you know?

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • Q Offline
                        Q Offline
                        qDebug
                        wrote on last edited by
                        #13

                        This is my superpower, i can tell.

                        I'm right as long as some one proves me wrong ;-)

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved