MTA Forums topic: Link
If you need help with anything related to this project, please read the corresponding section on the MTA forum thread linked above.
Star ⭐ this repository if you like it!
This MTA resource lets you encrypt any files using a secret key (string) that is stored inside a script that it generates & compiles. You use the script it creates to decrypt the files in your own resource(s).
It uses aes128
(Advanced Encryption Standard in CTR mode) with 16 characters long keys.
- Makes no calls to the server for decrypting the files clientside.
- Decrypter script is compiled using MTA's Luac, you can't uncompile it.
- Decrypter script is not sent to the client's cache, so you can only steal it if you have access to the server's files. But even if you obtain it, see point number 3.
- It would take many years to test all possible secret key combinations to decrypt any files encrypted with this resource.
- Decrypting files clientside likely impacts script performance a bit, but it's the price to pay. However, Aes128 is the fastest encryption method available natively in MTA, so you should get very satisfying results.
- Create empty file named
nando_decrypter
inside nando_crypt - Use
start nando_crypt
to initiate the resource - Use
/nandocrypt
to open the panel
-
Generate or pick a secret key using the panel. This string of characters will be used to encrypt and decrypt your files.
-
Encrypt a file stored in the server using the panel. A new file will be created using the prefix defined (e.g.
elegant.dff.nandocrypt
). Anando_decrypter
script file will be created, as well asnando_decrypter_keys.json
which stores the necessary keys used in nando_decrypter to decrypt your files alongside the secret key stored in it. -
Test decryption of that file using the panel. Enter the file name without the custom extension and it will try to decrypt it using the decrypter file generated (which can be used both clientside and serverside).
-
Copy
nando_decrypter
file generated to your own unique resource and use it to decrypt the files you just encrypted in your own way. Keepnando_decrypter_keys.json
in thenando_crypt
resource because it is used by the ecrypter to generate thenando_decrypter
script. -
Check nando_crypt-example to understand how this can be achieved.
- If working on a project with multiple people or a shared repository, don't share the secret key used to encrypt the files.
- Sorry if the instructions seem a bit confusing at first! I think that if you experiment with the resource you will get used to it.
- mta-mod-downloader & mta-auto-modloader: mod downloader systems which support NandoCrypt
- mta-add-models: a library for adding new models (vehicles, skins, etc) to your server which supports NandoCrypt