Skip to content

Misc – KN5 Encryption

Surfin Bird edited this page Jul 4, 2019 · 16 revisions

If you would want to protect your models from being edited or stolen, with Custom Shaders Patch, there is an option allowing you to encrypt them. Of course, it’s not going to work with original AC, in fact, it’ll look quite strange in it. Like so:

Example of failed decryption

This is in fact how encrypted model is stored and how any unpackers would extract it. I believe there is little point in trying to fix such model by hand. Oh, and textures are encrypted too.

There are two possible models for encrypter to work in: first simply encrypts model with your own key, but second also includes checksum of data.acd in encryption process as well. This way, if somebody would decide to “fix” physics by editing data, model would stop decrypting properly.

Whole process is very simple: just drag’n’drop KN5 to encrypt on EXE-file, and new encrypted file will be saved next to original KN5 (this way, the tool won’t overwrite any important files). After that, replace original model with encrypted one manually, but don’t forget to backup original model, as there are no specialized decryptors available yet.

Please keep in mind that for now, even Content Manager can’t decrypt models, so showroom won’t be available. Possibly, later on, it’ll be able to decrypt some models, but not all of them.

Tips:

  • First of all, I’d like to ask, think twice before encrypting your models. For example, looking closer into how other people’s cars are made helped me a lot to learn how to do it. And there might nothing wrong if somebody would tune some car for their own personal use. But, of course, there are some people out there who like to mess up with models and re-release them as their own, for some strange reason concentrating on some specific type of cars. If you think your model might attract those people, encryption is completely justified, of course;

  • If you want to add an option for people to create skins without risking to have your model compatible with CM, one way for that might be to create LOD B and don’t encrypt it. You can also add new [LOD_HR] section in lods.ini with decrypted model of lower resolution: AC would ignore it, but CM would load it as default model. It’s not going to look great with encrypted textures anyway, so, if needed, let me know and I’ll prepare a tool which won’t encrypt textures. Or, prepare different KN5 with lower resolution textures for LOD_HR;

  • Encrypted model might take less disk space comparing to original: it’s normal as encrypter also applies lossless compression for textures to save disk space and speed up loading;

  • Don’t share your special tools: they have your own key in them, so if leaked, they can make decryption of your models easier;

  • Prepare previews before encrypting model: again, CM doesn’t know how to decrypt those;

  • As I’m not an expert in field by any means, and it’s a cheap and dirty solution, so I can’t guarantee models at all that won’t get hacked. So far, I haven’t heard of any models being decrypted, but the whole thing is quite new.

General Information

Car Physics

Track Physics

Car & Track Configs

Car Configs

Instruments
Miscellaneous

Track Configs

Post-processing Filters

Python Apps

Lua Apps

Server Configs

Other Things

Unrelated to Custom Shaders Patch

Clone this wiki locally