Bug in OpenSSL

Discussion in '3DS - Flashcards & Custom Firmwares' started by Bug_Checker_, Dec 28, 2013.

?

If you are in this sub forum of hacking, do you even understand this thread?

This poll will close on Oct 28, 2019 at 2:59 PM.
  1. Yes

    72.2%
  2. No

    27.8%
Multiple votes are allowed.
  1. Bug_Checker_
    OP

    Bug_Checker_ GBAtemp Advanced Fan

    Member
    950
    444
    Jun 10, 2006
    United States
    For those people who maybe messing around with naehrwert's gateway stuff, This is just a heads up. There appears to be a bug in the latest (11-Feb-2013) OpenSSL ver 1.0.1e (only tested on Win64 build).
    the error is as follows:

    bad decrypt
    11016:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:.\crypto\evp\evp_enc.c:539:
    error in enc

    It will truncate the decrypted launcher file by 16 bytes. The work around is to pad the ENCRYPTED file by 16 null bytes(00). You will still receive the above error message but the file will be identical to release launcher_dec.bin.
     
  2. Vappy

    Vappy GBAtemp Advanced Maniac

    Member
    1,506
    1,153
    May 23, 2012
    zecoxao likes this.
  3. Bug_Checker_
    OP

    Bug_Checker_ GBAtemp Advanced Fan

    Member
    950
    444
    Jun 10, 2006
    United States
    Sorry, (just to amend my earlier post) simply adding the "nopad" switch seems to solve the problem w/o having to append any info to original file.
    So for IV=00 :
    openssl enc -d -aes-128-cbc -K <key> -iv 00 -nopad -in <infile> -out <outfile>
    or
    enc -d -aes-128-cbc -K <key> -iv 00 -nopad -in <infile> -out <outfile>
     
  4. octopus

    octopus Member New

    Member
    295
    106
    Sep 6, 2013
    Somalia