Author Topic: How to protect your lists?  (Read 6738 times)

0 Members and 1 Guest are viewing this topic.

Offline HybridFox

  • LV2 Member (Next: 40)
  • **
  • Posts: 26
  • Rating: +2/-0
  • Species: Fox
    • View Profile
How to protect your lists?
« on: November 04, 2013, 03:17:36 pm »
So i made this program "SimCity47" And i want to Distribute it with my friends, but since i and my friends are in a coding school, the will probably start cheating with it and chaging the vars and lists, so anyone knows a good way to protect lists?

Thnx in advance ^-^  ::)
http://furrypoll.com/2013/

Do not go where the path may lead, go instead where there is no path and leave a trail.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: How to protect your lists?
« Reply #1 on: November 04, 2013, 03:20:26 pm »
I don't think there is a way with TI-BASIC, sorry.

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline HybridFox

  • LV2 Member (Next: 40)
  • **
  • Posts: 26
  • Rating: +2/-0
  • Species: Fox
    • View Profile
Re: How to protect your lists?
« Reply #2 on: November 04, 2013, 03:23:24 pm »
I don't think there is a way with TI-BASIC, sorry.

Isnt there also a way to like copy the list, reverse the order and save it to like example "LCS47B" and then when u run the program, it unreverses it and checks if the 2 lists are the same?
http://furrypoll.com/2013/

Do not go where the path may lead, go instead where there is no path and leave a trail.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: How to protect your lists?
« Reply #3 on: November 04, 2013, 03:24:46 pm »
That would be implementing your own 'encryptions' for that list, you could of cource do that and come up with your own algorythm for it ;)

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline HybridFox

  • LV2 Member (Next: 40)
  • **
  • Posts: 26
  • Rating: +2/-0
  • Species: Fox
    • View Profile
Re: How to protect your lists?
« Reply #4 on: November 04, 2013, 03:27:56 pm »
Hmmmmm, well i would sure think of that ;) it just i never worked with encryption :/
http://furrypoll.com/2013/

Do not go where the path may lead, go instead where there is no path and leave a trail.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: How to protect your lists?
« Reply #5 on: November 04, 2013, 03:32:02 pm »
another posibility would be to use basic libs and store your data to an app-variable so that they can't modify it, or, if you don't want to stick with basic you could start learning axe and create your own data-structures :)

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline harold

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 226
  • Rating: +41/-3
    • View Profile
Re: How to protect your lists?
« Reply #6 on: November 04, 2013, 03:32:28 pm »
How about a simple checksum? For example, append -Sum(list) to the end, then when loading you can check whether the sum is zero (or with some tolerance, if necessary)
Blog about bitmath: bitmath.blogspot.nl
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.

Offline HybridFox

  • LV2 Member (Next: 40)
  • **
  • Posts: 26
  • Rating: +2/-0
  • Species: Fox
    • View Profile
Re: How to protect your lists?
« Reply #7 on: November 04, 2013, 03:34:01 pm »
another posibility would be to use basic libs and store your data to an app-variable so that they can't modify it, or, if you don't want to stick with basic you could start learning axe and create your own data-structures :)
I know axe a bit, and i learned it, but i just don't like it, i prefer to code in asm on my PC

How about a simple checksum? For example, append -Sum(list) to the end, then when loading you can check whether the sum is zero (or with some tolerance, if necessary)
Not a bad idea, i'll try that
http://furrypoll.com/2013/

Do not go where the path may lead, go instead where there is no path and leave a trail.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: How to protect your lists?
« Reply #8 on: November 04, 2013, 03:35:01 pm »
There is basically no protection against knowledgeable TI-BASIC programmers. However, if you think they will be too lazy to check the source code, you could use some kind of checksum method. For example, if the list is always 25 elements of the data, the 26th element could work as the checksum:
Code: [Select]
0→L1(26
sum(L1
Ans-247iPart(Ans/247→L1(26
Then to see if the data has been tampered with:
Code: [Select]
L1(26→A
sum(L1)-A
If A≠(Ans-247iPart(Ans/247
Return

However, that won't prevent a user from incrementing one list element and then decrementing the next. For that, you could do something more complicated like squaring each element, adding 1, then multiplying all of the elements together, modulo 247 and use that to check if the data has been tampered with.

Offline HybridFox

  • LV2 Member (Next: 40)
  • **
  • Posts: 26
  • Rating: +2/-0
  • Species: Fox
    • View Profile
Re: How to protect your lists?
« Reply #9 on: November 04, 2013, 03:40:45 pm »
I think that will do ;) they are indeed lazy enough to check the source code, thanx for the help ^-^
http://furrypoll.com/2013/

Do not go where the path may lead, go instead where there is no path and leave a trail.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: How to protect your lists?
« Reply #10 on: November 04, 2013, 03:41:58 pm »
If someone can see the source encryption of any kind is no use :P
« Last Edit: November 04, 2013, 03:42:12 pm by Keoni29 »
If you like my work: why not give me an internet?








Offline HybridFox

  • LV2 Member (Next: 40)
  • **
  • Posts: 26
  • Rating: +2/-0
  • Species: Fox
    • View Profile
Re: How to protect your lists?
« Reply #11 on: November 04, 2013, 03:43:04 pm »
If someone can see the source encryption of any kind is no use :P
I know, but my classmates are to lazy to find the encryption code, or i just protect the program ;P
http://furrypoll.com/2013/

Do not go where the path may lead, go instead where there is no path and leave a trail.

Offline josh landers

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 116
  • Rating: +1/-0
    • View Profile
Re: How to protect your lists?
« Reply #12 on: November 04, 2013, 05:58:42 pm »
You do need to consider if the number of elements being change will cause any dim errors. You could make a second list that holds the sum and a 1 or 0. You could then  get the sum of the variables list check it to the othe r list and if  the send element is 0 ignore results if 1 exit the program. If you lock the program then you could force a divide by zero error to frustrate their lazy effort to even change the list in the first place, they will tet a divide error and can't even enter the source to remove it.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: How to protect your lists?
« Reply #13 on: November 04, 2013, 06:42:05 pm »
How about private key encryption? This way the program can read the data using a public key, but for editing you need a private key. Look it up on google.
« Last Edit: November 04, 2013, 06:42:38 pm by Keoni29 »
If you like my work: why not give me an internet?








Offline Hexatron

  • LV3 Member (Next: 100)
  • ***
  • Posts: 76
  • Rating: +2/-1
    • View Profile
Re: How to protect your lists?
« Reply #14 on: November 05, 2013, 02:28:51 am »
How about this :
1. Set up list
{1,2,3,4->L1
2. Take the list and turn it into a matrix:
For(I,1,4,1
  L1(I)->[A](I,1
end
3. Rotate the numbers around a bit
For(I,1,4,1
  rowSwap([A]
end
4. Store back to list
Matr►list([A],L1
5. Delete Vars
Delvar[A]DelvarL1DelvarI
6.???
7. PROFIT.