bin file extracted from a ZXHN H168N V3.1. RouterPassView is able to decrypt the file successfully but the tool can't re-encrypt the file, it gave me some info about the method used to decrypt here they are

File Type: 29 Encrypted Data Start Position: 227 Encryption Algorithm: AES-128 Encryption Key: 34303263333864653339626564363635 Compression: zlib/deflate

am a noob when it comes to this stuff so idk how to code my own tool does anyone know a tool that i could use to decrypt and re-encrypt the file

  • They use zlib encryption in the firmware, have you tried encrypting it with zlib and repack it with binwalk squashfs? Edit: would you mind sharing decrypted firmware? So, I’ll have a look into it.
    – Jason S
    May 2, 2021 at 1:48
  • @Alex811 can yoU HELP Me to decrypt my router config Model number is ZTE ZXHN H168N V2.2 .. I TRIED ALL THE WAYS ITS SIGnature is speedport 2i . i also have mdsum of tapgram_m file ... d0e615736322e6bc91fdb4e044bcdb20 .... but cannot get the key.
    – Alvi Guy
    Sep 24, 2021 at 8:22

2 Answers 2


You can use the zcu module (written by Mark Streetster) to decrypt/encrypt your config.bin file.

  • i tried that but it didn't work even when i specified the key it gave me an error that i can't remember what type/version should i use
    – Luser
    Nov 28, 2020 at 21:49
  • @Ammar Yasser If you want to upload a copy of your config.bin file I will check it out.
    – user2017
    Nov 29, 2020 at 22:39

I'd comment but I don't have rep. If you're still looking into it or anyone else comes across this, zcu indeed seems to be the way to go. I've managed to use it for a router that uses the same encryption key (ZXHN H267A V1.0) and the re-encrypted file seems byte-perfect.

It's not instantly obvious (at least with this particular key), but the answer is quite simple: RouterPassView gives you the key's hex representation, whereas zcu wants it in plain text. If you convert the key you wrote into text you get: 402c38de39bed665

Btw, since I saw people ask for the config.bin, before you share it, keep in mind that the file probably contains a bunch of sensitive info (passwords used by the router and potentially your phone number if it supports VoIP).

Good luck, have fun!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.