No announcement yet.

Encryption-Decryption Dilemna

  • Filter
  • Time
  • Show
Clear All
new posts

  • Encryption-Decryption Dilemna

    I'm not quite as familiar with SUF as I am with AMS, so forgive me if this is a RTFM-type question. But I've noticed that there seems to be a problem when trying to decode Base64/Blowfish encrypted SUF installers.

    I created a basic toolset in AMS to:
    • i) encrypt a binary file (ie. setup.exe) to Base64/Blowfish encoded output.
    • ii) decode and execute the encrypted output from AMS.
    This is the 2-piece toolset created with AMS (demo apz attached below):

    The 1st tool is used to encrypt the binary file.
    The 2nd tool is used to decode and execute the encrypted output.

    Seems to work AOK if I create a mockup installer with Inno Setup. (The attached apz files will demonstrate this). And it seems to work just fine with mockup installers created in other similar software suites.

    But when I create the same mockup installer with SUF, I encounter a problem during the decode/execute phase. Whereby the following error is thrown:

    So what's the problem, here? Do SUF-created installers have some kind of protective wrapping which prevents Base64/Blowfish encoding from being applied? I can't quite identify the source of the problem, here. Any insights?
    Attached Files

  • #2
    In the encryption tool, change the line

    Crypto.Base64EncodeToFile(tReturn[1], _SourceFolder.."\\temp.txt", 76);

    Crypto.Base64EncodeToFile(tReturn[1], _SourceFolder.."\\temp.txt", 0);
    and try again.



    • #3
      Okay, great. Thanks Ulrich - yes that certainly fixes the problem.

      But for curiosity's sake, are you able to clarify?: Ensuring that the Base64-encoded file is without line-breaks, does not seem to be something that's required for other binary files. At least the one's that I've tested. (ie. installers built with InnoSetup for instance).

      In fact, I've been able to set the line-length to just about anything. So why is it that when dealing specifically with SUF installers that line-breaks are not permissible?


      • #4
        I cannot explain it, as I do not have any access to the source code. I do not think that this has anything to do with the fact that the file was built with Setup Factory. It could have something to do with the file size.



        • #5
          Okay, interesting. Hadn't even considered filesize as a possible causal link. Will run more diagnostics to check that theory. Otherwise, guess it will remain a mystery. Thanks for the above 'fix' though, Ulrich. Much appreciated!