Method for scrambling/descrambling meshes?

Chode

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 21, 2008
Messages
107
Reaction score
1
Points
0
I just discovered that the AMSO add-on scrambles the .msh files so they can not be used by any other add-on, or in any other application, for that matter (from a thread in the "General" forum).

Is there documentation for how this is accomplished, so that I could protect my work in the same fashion?

Regards
 

Xantcha

Addon Developer
Addon Developer
Joined
Mar 26, 2008
Messages
203
Reaction score
0
Points
0
Weird

Just checked -AMSO's meshes are just plain msh files with accurate data - you can load them easily. (On the other hand I checked version 1.16 and not the most recent, plus i checked only few meshes)

Anyway, there is no technical limitations for encrypting orbiter's meshes - you can decipher mesh into temporary file, oapiLoadMeshGlobal it and delete file.
Or if you think having file is insecure way, you can cipher meshes data and not the file itself.
But this will giveaway the number of groups and vertices you use so you'd better try to dynamicaly generates meshes. I have no idea about it. Try asking Artlav about Orulex - It looks like he knows the way.


Still it leaves your data vulnerable - it is in memory and not encrypted - you'd better clean or encrypt after every orbiter's render. :)

But that will kill framerates and will not make your data really safe - it can be attacked during render. So have to wait next orbiter's version and make your own visualisation program for it. :)

Also try to limit printscreening ability of user - it will make reverse engineering your mesh difficult. :)


But seriously, what's the point? Limiting use of your meshes just limits growth of orbiter (indirectly but it does). Still it is your property, so If you don't wan't your meshes to be reused just tell/write so - it will be enough. (or apply few transformations and shuffle vertices - that will be more than enough :)

EDIT: found the original thread. Looks like AMSO is indeed encrypting it's meshes. Strange move. I doubt anyone in orbiter community would steal the meshes. At least as long as AMSO is up and running.
The only thing that comes to mind: AMSO preparing to go commercial with it's own game engine. Looks like Alain Capt trying to protect meshes from salvaging after AMSO's departure from Orbitersim.
 
Last edited:

Cornflake

New member
Joined
Feb 5, 2008
Messages
117
Reaction score
3
Points
0
Location
Colorado, USA
Just checked -AMSO's meshes are just plain msh files with accurate data - you can load them easily. (On the other hand I checked version 1.16 and not the most recent, plus i checked only few meshes)

Which files did you test? I have found in version 1.17 that some of the launch pad, chute meshes, etc are not encrypted - but all the directly apollo related ones like the Apollo_CM.msh. Try opening that mesh and see what the results are (I mean opening in a 3D program, not just looking at the .msh in a text editor. That won't tell you anything). By the way, is 1.16 available for download anywhere?

But seriously, what's the point? Limiting use of your meshes just limits growth of orbiter (indirectly but it does).

I agree. Knowledge would never be spread between people if everyone went to the trouble of keeping others from using their stuff. And besides, as long as a copywright is given with your work, I'm sure any website would comply to take the material down if someone was copying the work or claiming it as their own.
 

Chode

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 21, 2008
Messages
107
Reaction score
1
Points
0
EDIT: found the original thread. Looks like AMSO is indeed encrypting it's meshes. Strange move. I doubt anyone in orbiter community would steal the meshes. At least as long as AMSO is up and running.
The only thing that comes to mind: AMSO preparing to go commercial with it's own game engine. Looks like Alain Capt trying to protect meshes from salvaging after AMSO's departure from Orbitersim.

This is my biggest concern. Not only has he protected meshes from further use, he also has incorporated many "free contributions" into AMSO.
Again, I hope to be proved wrong.

Regards
 

FordPrefect

Addon Developer
Addon Developer
Donator
Joined
Feb 7, 2008
Messages
407
Reaction score
41
Points
28
...And besides, as long as a copywright is given with your work, I'm sure any website would comply to take the material down if someone was copying the work or claiming it as their own.

Oh yes of course...sigh Do you really believe that?

I can fully understand Alain and Luis to protect their meshes from being reverse engineered, and there's nothing wrong with that. AMSO is working in Orbiter and is free, everything else is voluntary. As Chode, I am interested too in any possible method to "encrypt" the meshes to avoid exactly that.

Also, I don't think Alain has any plans of going commercial. It's just simply protecting the work from being used outside of Orbiter.
 

Redburne

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 19, 2008
Messages
71
Reaction score
1
Points
6
Any attempt to encrypt the meshes is ultimately futile.

Future versions of Orbiter will separate the core engine and the rendering engine. All you need is a stub engine that receivers the mesh and writes the data to a file.
As there are already three open source engines (DX7, DX9, OGLA), modifying one of them to do the job is only a matter of minutes to a developer familiar with the project, and a matter of a few hours to other developers.
 

Xantcha

Addon Developer
Addon Developer
Joined
Mar 26, 2008
Messages
203
Reaction score
0
Points
0
Well, considering amount and quality of work put into AMSO,

it could be actually interesting for someone outside the orbiter community. Since AMSO is not open source, it just might need some protection.
Still, the best chance to meet *someone outside* is to publich a commersial sim. :)

As to the encrypting technology - as far as I know orbiter API is limited in that it does not allow triangle manipulation and creation/deletion of individual vertices. So, as was discussed, encrypting entire .msh will require brief creation of deciphered file which is undesirable. May be I am wrong on this.

But changin the data works just fine - encrypting vertex coordinates works pretty well for now, encrypring textures is way more tricky...

P.S. And AMSO becoming a commercial product.. Sure it will be sad since it's leaving orbiter. But it could bring more interested people to orbiter. Or it might not. Really depends on marketing - space sims are not that popular. It also could split apollo fans in half, or it might not. One thing for sure - if it will ever leave orbiter - lots of flame are ahed :)

EDIT:
2 Redburne> it does not matter, orbiter core will be the same as well as API and msh format, for backward compability, you know - orbiter have lots of the relevant "past". And new version might just make encrypting easier by allowing to create meshes dynamicaly
 

Redburne

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 19, 2008
Messages
71
Reaction score
1
Points
6
2 Redburne> it does not matter, orbiter core will be the same as well as API and msh format, for backward compability, you know - orbiter have lots of the relevant "past". And new version might just make encrypting easier by allowing to create meshes dynamicaly

Orbiter's core cannot send encrypted data to the rendering engine! It wouldn't know what to do with it. The rendering engine has to get the unencrypted mesh to display it.

The MSH file may be all scrambled, but AMSO has to unscramble it after it is loaded into Orbiter. And at that time, the rendering engine can access the mesh in its final form.

FordPrefect said:
Yes, however not everyone has the ultimate patience.

No patience required! All you need is one special rendering engine, which is easy enough to implement (I'd say about 1/10th of a second for Artlav to add it to the current OGLA version ;) ), and you could dump ANY mesh of ANY add-on with the push of a button.

(unless you mean the ultimate patience in waiting for an Orbiter version with fully separated gfx engine, then you could be right ... :lol:)
 

Redburne

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 19, 2008
Messages
71
Reaction score
1
Points
6
Ah, heck, I'm thinking too complicated.

Even with the current Orbiter version and its API, it is already possible to access the mesh data of any vessel (vessel2->GetMesh; oapiMeshGroup, ...).
Writing the actual plug-in to save it as a mesh file is left as an exercise for the reader ...
 

Xantcha

Addon Developer
Addon Developer
Joined
Mar 26, 2008
Messages
203
Reaction score
0
Points
0
You right, haven't though abought it long enough

Redburne - you are right this way of protecting meshes is useless.

And it does not requires creating renderer. All vertex data is available via OrbiterAPI - oapiObjectVisualPtr will get the visual which will get the mesh. This means that meshes of AMSO 1.17 are accessible right now.

Actually any method of encrypting meshes is useless unless implemented in orbiter's core

EDIT:
me too slow :-/
 

tomek

legal alien
Joined
Mar 26, 2008
Messages
181
Reaction score
1
Points
0
Website
www.orbiter-forum.com
Doh, I should've read this thread before writing in the other one.

I disagree, however, that it's "pointless" to encrypt the mesh. There are of course numerous ways to rip it out if one is really determined. But 99% aren't.

Notice that now you already need to at least install and configure MSVS, and read through Orbiter API to do it (assuming you even know C++ at all). Whereas to rip an unencrypted mesh, all you need to do it just download MeshWizard and that's it - you can do whatever you want with it.

And as Ford Prefect noted, trying to take something down once it's in the Net is like catching a wind.
 

TSPenguin

The Seeker
Joined
Jan 27, 2008
Messages
4,075
Reaction score
4
Points
63
And again, this thread shows that encrypting something will only bring out many ways from many people to decrypt it.
Maybe this is how the AMSO team wants to bring new people to orbiter ;)
 

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
Ah, heck, I'm thinking too complicated.

Even with the current Orbiter version and its API, it is already possible to access the mesh data of any vessel (vessel2->GetMesh; oapiMeshGroup, ...).
Writing the actual plug-in to save it as a mesh file is left as an exercise for the reader ...

Well GetMesh is useless, the handle returned by it is only valid inside clbkVisualCreated. For oapiMeshGroup to work, you need to have the mesh handle first.

Two-Three weeks ago I was playing around with encryptions. I wrote a program that would encrypt a file by scrambling the data inside it, then it would generate another file which will contain strings of numbers telling the program how to decrypt it. It worked pretty good actually, the generated key was different every time you tried to encrypt a file, even if it was the same one. It was faster then I thought, I was able to scramble executable binaries in a couple seconds. This could work for encrypting/decrypting meshes for Orbiter. I guess you would have to decrypt the file to a temporary location, then delete it at the end of the simulation session.
 

NukeET

Gen 1:1
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,035
Reaction score
93
Points
63
Location
UT_SLC
Website
sites.google.com
Orbiter's core cannot send encrypted data to the rendering engine! It wouldn't know what to do with it. The rendering engine has to get the unencrypted mesh to display it.

The MSH file may be all scrambled, but AMSO has to unscramble it after it is loaded into Orbiter. And at that time, the rendering engine can access the mesh in its final form.

That makes sense, since it appears that all of the meshes load during boot.
 

NukeET

Gen 1:1
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,035
Reaction score
93
Points
63
Location
UT_SLC
Website
sites.google.com
Redburne - you are right this way of protecting meshes is useless.

And it does not requires creating renderer. All vertex data is available via OrbiterAPI - oapiObjectVisualPtr will get the visual which will get the mesh. This means that meshes of AMSO 1.17 are accessible right now.

Actually any method of encrypting meshes is useless unless implemented in orbiter's core

EDIT:
me too slow :-/


Locks, for the most part, keep honest people honest.
 

n0mad23

Addon Developer
Addon Developer
Joined
Feb 10, 2008
Messages
1,078
Reaction score
17
Points
0
Location
Montesano
Website
soundcloud.com
I got curious about this as soon as the thread began.

I've yet to find an AMSO mesh that I couldn't load with Mesh Wizard.
 

n0mad23

Addon Developer
Addon Developer
Joined
Feb 10, 2008
Messages
1,078
Reaction score
17
Points
0
Location
Montesano
Website
soundcloud.com
Indeed I am. I've opened over 20 meshes, and each has popped right up.

Can anyone direct me to one of the problem meshes please?
 
Top