Author Topic: Program DRM?  (Read 13599 times)

0 Members and 1 Guest are viewing this topic.

Offline ee511

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Program DRM?
« on: March 20, 2011, 03:05:02 pm »
How would one create some sort of a way to keep people from sharing your calculator program? The easiest way to do this that i can think of is a program that creates an appvar with an encrypted version of the calculator's ID in it, and then in the main program I would have a decryption algorithm, but I don't know how to do that...  ???

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Program DRM?
« Reply #1 on: March 20, 2011, 03:15:54 pm »
There's the problem that you can change your calc's ID, because it's stored in flash. However, most people won't bother to mess with that, so it's probably a good start.
However, if you don't mind waiting, SirCmpwn's store idea (in the funding topic, IIRC) will probably include a DRM-type mechanism.
To get the ID to begin with, you'll need some ASM, which I don't exactly know. There's almost certainly a bcall for it, but otherwise you'll have to unlock flash.
Whatever en-/decryption method you use, be aware that you have to be able to prevent the user from simply changing the appvar to match their calc ID. A method like app signing (but with a secret key only you know) could work, but getting enough strength to prevent quick cracking is difficult if not impossible to do with good speed.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline ee511

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Re: Program DRM?
« Reply #2 on: March 20, 2011, 03:19:58 pm »
well, the people who would be playing my games *probably* aren't paying any attention in math class, so I highly doubt that they can crack an encryptio algorithm or create a program to modify their flash. Is there any unique data on a calculator that cant be changed?

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Program DRM?
« Reply #3 on: March 20, 2011, 03:23:23 pm »
There is no unique data on a calculator that you can change that no one else can change.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline ee511

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Re: Program DRM?
« Reply #4 on: March 20, 2011, 03:24:12 pm »
I meant something that is a unique, unchangeable identifier of that particular calculator.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Program DRM?
« Reply #5 on: March 20, 2011, 03:27:11 pm »
To my knowledge, there's no unique immutable data. If you don't think that they'd do things like hack appvars or bother to discover an encryption method, then a simple checksum (adding all the bytes together) of the calc ID is probably enough.
I don't know how to get the ID, so you'll just have to wait for someone who does and you should be set.
You program would, then, at start-up checksum the ID and compare it to the one in the appvar. If they're different, then it would quit.
You'd also need to write a small program to generate the appvar, but that's trivial once you have the ID :)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline ee511

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Re: Program DRM?
« Reply #6 on: March 20, 2011, 03:46:11 pm »
well, I would have a program that I would run when i gave them the program which would create the appvar, and then I could either delete the program, or (if at all possible) have the game delete the authentication program automatically the first time it ran.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Program DRM?
« Reply #7 on: March 20, 2011, 03:49:12 pm »
Excellent, then :D Program deletion is possible in Axe using the DelVar command, btw.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline ee511

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Re: Program DRM?
« Reply #8 on: March 20, 2011, 03:52:40 pm »
so would the code be something like "DelVar prgmDRMAUTH"? and if the program "DRMAUTH" doesn't exist, what happens?

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Program DRM?
« Reply #9 on: March 20, 2011, 03:56:41 pm »
I think you need
Code: [Select]
DelVar "prgmDELETEME"(notice the quotes)
If it doesn't exist, nothing bad will happen. DelVar might return a success value, I'm not sure.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline ee511

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Re: Program DRM?
« Reply #10 on: March 20, 2011, 03:59:47 pm »
awesome! I knew I had to put quotes, but since i put the quotes around the code I had written, I didn't want to put quotes in.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Program DRM?
« Reply #11 on: March 21, 2011, 08:19:22 pm »
ThePenguin went into a little bit of detail to explain how to fetch the calc's ID number here.  Good luck. ;)

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Program DRM?
« Reply #12 on: March 21, 2011, 08:41:37 pm »
Fill OP4 with some default value, (in case the calc has no ID (emulators)). Asm(EF7E80) then look in OP4 for the CalcID, it is 5 bytes long. (I don't know where OP4 is in Axe, but I'm sure you can find it, it's 8499h in memory.)
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Program DRM?
« Reply #13 on: March 21, 2011, 10:19:07 pm »
What will it be filled with if it's an emulator?  Or will it just return?  Does this apply to the nSpire as well?
« Last Edit: March 21, 2011, 10:19:27 pm by graphmastur »

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Program DRM?
« Reply #14 on: March 21, 2011, 10:49:32 pm »
I have no idea on the Nspire, that's in Ti/Calc84's hands.

If it's an emulator, it appears that it just returns, at least that's what it did when I just watched it in wabbitEmu. It returns NZ if it couldn't get the ID, but I don't know how to check that in Axe.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112