This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
United-TI Archives -> TI-Basic
 
    » Goto page Previous  1, 2
» View previous topic :: View next topic  
Author Message
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 02 Dec 2003 05:45:41 pm    Post subject:

How does the calculator generate random numbers? On the TI-89, which generates the same random numbers, there are two system variables for it: seed1 and seed2. Does it have a sequence where f(n+1) = f(n) xor f(n-number)?
Back to top
Fr0sty


Member


Joined: 27 Nov 2003
Posts: 202

Posted: 02 Dec 2003 05:52:22 pm    Post subject:

Arcane Wizard wrote:
Fr0sty wrote:
Anyone know of a C++ thing I can download (freeware?) to help me practice/program? I'm trying to practice cause I've been raised on TI-Basic which is kinda embarassing if you want to be a programmer you know?

I'd advice to learn some computer programming languages (Maybe QBASIC or PASCAL) first, but here are some C++ tutorials: (I find the top one to be the best, it's also the one I used to learn C++)
http://www.cplusplus.com/doc/tutorial

http://cplus.about.com/library/blcplustut.htm

http://www.cprogramming.com/

I hope I still have a lot more information/tutorials on C++ on some old CD's, so if you want I can upload it all. Don't know if it's worth the trouble, because I'm not sure how much of that info I can find (my rooms a mess Smile) and how much I actually backed up on those CD's.

If you want you can, don't want to put you through too much trouble Laughing
I'll just see if I can learn this stuff first and if I need it, I'll ask alright?
Btw: how do i change programs to appvariables or progvariables or whatever? (you know, the stuff that doesn't show up in your program list) I saw a ASM prog that did this, but it didn't work...
Also, how do you unarchive progs from within another prog?
Unarchive ProgName doesn't work...


Last edited by Guest on 03 Dec 2003 11:53:29 pm; edited 1 time in total
Back to top
Fr0sty


Member


Joined: 27 Nov 2003
Posts: 202

Posted: 06 Dec 2003 09:38:08 pm    Post subject:

This is what I got so far:
(I made a seperate prog that I delete after I run it through their calc: Note: this isn't entirely "hack-proof" but it'll work with regular students like my school has)
Prog A:

Code:
ClrHome
1->dim(ListA
{1,2,3,4,5,6,7,8,9,0,15,32,-32,7,24}->ListA
3.2689254->[B]N[/B] (Variable from Finance)
2.39->PV (Variable from Finance)
Input "Name: ",Str0
-3.59->I% (Variable from Finance)
ClrHome

Prog B: (PV is pretty much my 'locater' variable)

Code:
If PV(does not equal)2.39
Goto Z3
ListA(11->A
ListA(12->B
ListA(13->C
ListA(14->D
ListA(15->E
If B=(2A)+2 and C=-B and D=(A-1)/2 and E=(A*2)+6 and A=15 and [B]N[/B]=3.2689254 and I%=-3.59
Goto Z1
If B(does not equal)(2A)+2 or C(does not equal)-B or D(does not equal)(A-1)/2 or E(does not equal)(A*2)+6 or A(does not equal)15 or [B]N[/B](does not equal)3.2689254 or I%(does not equal)-3.59
Goto Z3
Lbl Z3
ClrHome
Disp "Unregistered","Program-","Quit trying to","steal and go buy","it!"
DelVar ADelVar BDelVar CDelVar DDelVar E
Stop
Lbl Z1
DelVar ADelVar BDelVar CDelVar DDelVar E
Lbl Z2
ClrHome
Disp "Welcome",Str0
Pause
ClrHome
...rest of prog...

I know I have a ton of code in there that I don't need, but that's basicly what I got.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 16 Dec 2003 03:01:23 pm    Post subject:

Fr0sty wrote:

Code:
If PV(does not equal)2.39
Goto Z3
ListA(11->A
ListA(12->B
ListA(13->C
ListA(14->D
ListA(15->E
If B=(2A)+2 and C=-B and D=(A-1)/2 and E=(A*2)+6 and A=15 and [B]N[/B]=3.2689254 and I%=-3.59
Goto Z1
If B(does not equal)(2A)+2 or C(does not equal)-B or D(does not equal)(A-1)/2 or E(does not equal)(A*2)+6 or A(does not equal)15 or [B]N[/B](does not equal)3.2689254 or I%(does not equal)-3.59
Goto Z3
Lbl Z3
ClrHome
Disp "Unregistered","Program-","Quit trying to","steal and go buy","it!"
DelVar ADelVar BDelVar CDelVar DDelVar E
Stop
Lbl Z1
DelVar ADelVar BDelVar CDelVar DDelVar E
Lbl Z2
ClrHome
Disp "Welcome",Str0
Pause
ClrHome
...rest of prog...

I know I have a ton of code in there that I don't need, but that's basicly what I got.

During program execution, you will never need this:

Code:
If B(does not equal)(2A)+2 or C(does not equal)-B or D(does not equal)(A-1)/2 or E(does not equal)(A*2)+6 or A(does not equal)15 or [B]N[/B](does not equal)3.2689254 or I%(does not equal)-3.59
Goto Z3

because Lbl Z3 follows so you'll get there anyway.
Back to top
Fr0sty


Member


Joined: 27 Nov 2003
Posts: 202

Posted: 16 Dec 2003 07:02:06 pm    Post subject:

Thanks, can someone please explain to me a Factoring Program? Also, I edited my old program and will post it whenever I can.
Back to top
pyxle86


Newbie


Joined: 17 Dec 2003
Posts: 1

Posted: 17 Dec 2003 03:14:40 am    Post subject:

Nope, sorry, I was never good at factoring Cool
Hey i have a good scheme (i think 8])
It actually involves two passwords, one is the seed, and the other can be a string as long as you want.


Code:
:Lbl 1
:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 .,!?(){}[]/+-*=>< ->Str0
:0 -> B
:Clrhome
:Menu("Crypto","Crypt",2,"DCRYPT",3,"EXIT",4
:Lbl 2
:1 -> B
:Lbl 3
:If not(B
:-1 ->B
:Input "TXT:",Str1
:Input "KEY:",Str2
:Input "DATE:",A;the date can be in the format MMDDYYYY or DDMMYYYY
:A -> rand
:For(A,1,length(Str1
:instring(Str0,sub(Str1,A,1),1)+Binstring(Str0,sub(Str2,randInt(1,length(Str2)),1),1) -> C
:;add value plaintext with value keytext to equal ciphertext
:If C>length(Str0):C-length(Str0) -> C; essentially a modulus function
:If C<1:C+length(Str0) -> C; same with this line
:If A=1                                ;this is so you dont have to have a "beginning"
:                                      ;character to establish a string
:Then                                  ;<
:sub(Str0,C,1) ->Str3                  ;<
:Else                                  ;<
:Str3+sub(Str0,C,1) ->Str3              ;<
:End                                    ;<
:End                                    ;end of crypto loop
:Clrhome
:Pause Str3;this allows you to scroll through the string (built in TI function)
:Lbl 4
:0 ->rand    ;to erase "evidence"
:DelVar ADelVar BDelVar CDelVar Str0DelVar Str1DelVar Str2Delvar Str3
:Clrhome
:Output(1,16," ";the double quotes are to show that there is a space inbetween
                         :them, this removes that annoying "done" after a program
                          ;execution.
:If not(b
:stop
:Goto 1


BTW this was done out of my head so if there are any bugs lemme know!
PS i formatted it for the TI-83+
If you have any questions please e-mail me at pyxle@sdf.lonestar.org


Last edited by Guest on 17 Dec 2003 03:15:27 am; edited 1 time in total
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 17 Dec 2003 08:05:26 am    Post subject:

or, i can just write an asm program that checks the calc ID# (cannot be changed by the user)...then again... they could edit the program...
Back to top
Fr0sty


Member


Joined: 27 Nov 2003
Posts: 202

Posted: 17 Dec 2003 10:31:56 am    Post subject:

I'll try that thatnks pyxle86 and Darth, I got a Protect app that can't be unprotected (I mean, I haven't found a way to yet). Too bad it'd require me to send two progs at a time... Although I'm almost willing to do it, but I just thought of how hard it'd be to have to do that for every calc just so they couldn't trade it (This is going public, we just don't want certain people to have it). I was thinking... Since I use finance variables and they have to be defined before I can send the program (I think it does Error: Version if I don't) then couldn't I send a prog that defines one variable and if that variable is defined, i'll be able to send another prog that defines the variable for my security program and have that file untradeable (I delete the first program that defines the variable)? I think the title's been misleading, it's not so much as a password program but one that stops trading from person to person unless it's sent from me or my friend's calc.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 17 Dec 2003 02:46:13 pm    Post subject:

Can't they just edit the programs and delete the protection part?
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 17 Dec 2003 03:29:16 pm    Post subject:

Yes, even if the program is hidden, they can just unhide it.
Back to top
Fr0sty


Member


Joined: 27 Nov 2003
Posts: 202

Posted: 17 Dec 2003 03:43:57 pm    Post subject:

So... if I lock it using the Protect App, how do they edit the prog? I'm confused Confused
Also... oh wait, do u mean that it's not really protected, they just hide the program in the edit list and you can find it if you know how?
I'm so confused Neutral
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 17 Dec 2003 03:44:13 pm    Post subject:

If the program is hidden, they can't run it except in Mirage, which is very buggy with basic programs.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 17 Dec 2003 03:58:30 pm    Post subject:

Jbirk wrote:
Random seeds do not even look at the decemal, so putting in 1, 1.2, 1.383748, or any non integer is still recognized as a seed of 1.
Essentially, you are creating too few possible encryption keys (seed values)

Actually, I think a random seed of 1.23 is the same as 123 or .0000123. At least it worked that way on my 89 and the 83+ gave the same random numbers so I'd guess they do it similarly.

Edit: I repeat my question, because it apparently has gone unnoticed:
Quote:
How does the calculator generate random numbers? On the TI-89, which generates the same random numbers, there are two system variables for it: seed1 and seed2. Does it have a sequence where f(n+1) = f(n) xor f(n-number)?


Last edited by Guest on 17 Dec 2003 04:01:56 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page Previous  1, 2
» View previous topic :: View next topic  
Page 2 of 2 » All times are UTC - 5 Hours

 

Advertisement