Wednesday, March 30, 2011

Sunday, March 27, 2011

RSA Keygen GUI

So I have been developing over the past few days a console version of a RSA keygen. I completed it (but have not had it validated by others - but I assume it works properly, as a demo - and possible actual keygen given long enough values).
But now I have started using the NetBeans IDE (which by the way, sucks compared to Eclipse). I have started using the Swing library to create it with the Netbeans GUI builder, which is nice, and pretty simple to use. It took me only a few minutes to design my interface.

 However, a console is useful because it is very easy to program. Menu's are very straightforward - they ask you for something, and then you compare what they give you.
In a GUI though, they make it so much different. In this picture to the left, there is many things going on. take the 'p' line for instance.

When you click on P, it gives you a cursor. You can type anything you want, like '2354jqw;elkrj234;5klj'. When focus is lost on the p line, it performs an event called FocusLost. There are many events like FocusLost, FocusGained, mouseover, etc. This makes it easy to create it without having to compare the mouse to the actual object on the screen. It also makes it a pain to do.
Whenever the focus is lost on p, it runs a method that strips everything out except for digits. If there isn't anything left, it just holds "", or nothing (but not null - just an empty string).
This is the easy part. However, when all 3 values are filled, and you click 'validate', it updates the values to RSA spec (actually, only 'probably' - method for finding long prime numbers may or may not work entirely. We assume that it is.)
It works mostly. It does in fact create public and private key files, so it does work. However, writing files doesn't work (yet - it should be a pretty easy upgrade to port from the console version)
It also has some issues with event handling.
I have a variable called privatekey - a string, which holds the private key (a big integer). It only needs to be held as a string since we won't be doing anything with the biginteger form.The problem is that there is no event that is executed (I think) as you type. So I need to now update the fields which no longer makes the current private key up-to-date, so you lose the private key and have to revalidate, and recreate.
Yes, it is a pain sort of. I have devised a new structure of how to handle events and will be testing it soon.
All this programming is... meh... i have been programming for about 3 days straight now. It has been so... taxing.

Thursday, March 24, 2011

Console Version of Cryptographer almost finished

So I have been working on my program, and the console version is almost finished!!!
I was in my computer science class yesterday, and he was talking about how much more simple breaking the code down into small methods was. Using that, I can create local variables inside of the methods that get destroyed when the method closes, and only return what I need. I have been able to cut down on my code quite a bit. With only 1 method (excluding the method it is in), performGeffe() used to be 48 lines long. Now with 6 methods, it is only 8 lines long!!!
Not this kind of console.
I also have been able to use the StringTokenizer method to make parsing seed values (as strings) much easier. I am just about ready to use the RSA portion to encrypt the keys, which will nearly finalize the core of the program (I might make menu's using switch statements).

Wednesday, March 16, 2011

Masterfully crafted numbers

So I have been working in java, and made a semi-complex (by my standards) little program that can take user input and do a simple Fibonocci (I hope that is spelled right) LFSR and then perform a vernam cipher. It can also do the same with 3 LFSRs and merge them using the geffe algorithm, and perform the vernam. I also have a method that can automate decryption, however I do not know yet how I am going to store the xval variable since it pulls time from the epoch, which is milliseconds seconds from jan 1 1970 00:00:00:00. The way it is causing problems is that I have auto generating seeds based on the clock, which performs an algorthm that pulls a preset value, multiplies it by this clock time, and... it does something else, but it is late, and I forgot that part... and then mod modlistval's it to give you the seed value for that bit. But I have to do this for 3 of them, so unless the value somehow makes a*xval mod modlistval equals the exact same for all three (very unlikely), I won't be getting very far with decryption. I need a masterfully crafted number...
It is going pretty well though. I am making some good progress. I have no idea what to put on my poster though. Tools used? Um... Eclipse? Java? I don't know any way to put that into pictures, and definitely not a way to scare people away from my poster.

I really hope that I can get accepted to any of the four schools I just applied too: University of Houston, Dakota State University, Penn State, or Cornell. It would be amazing to research there! I have found research even more exciting since I started applying too. It is weird. I feel lucky that I got chosen to be the researcher.

Saturday, March 12, 2011

Origins of Mgamerz Productions

Just thinking about it now, some people most likely wonder where the name Mgamerz comes from, or what it means. It obviously now just stands for my alias, which today is pretty much the same as a pen name.
It was actually the name of my first email address in 2003, when we upgraded from the horrible Dial Up. I used to have a few other ones, like the ones for Sim City and GameSpot, but now I primarily stick to Mgamerz. It was based off my name and my favorite game (still). Well, not my real favorite game... the second to favorite game. The M does not stand for Mega Man, although I do like /some/ of the series.
So back then, I did not start with much. It was just a name. My work began with Extreme Wall Ball Express, which was the name of a game I programmed when I was 14 or 15. It was terrible. It was not that much fun and caused carpultunnel in those who played it. I did learn how to make some pretty good animations though. The source eventually corrupted itself and died, and then I started on my flagship game, StarBord: The First Front.
This was also the same time that I created my YouTube channel, with a video that I actually had not even made yet. This was about 2006, someone made a video for my game. They screwed up in making it, but I still think it's pretty cool, although pretty much nothing in the trailer is in the game anymore. I finally ditched the voices because of some terrible quality work.
It was originally just going to be a straight  vertical space shooter, and it was for a while. And man, did it suck. The first stages have improved significantly, but they still suck. I did not know how to program (much) so I was still using the drag and drop interface of game maker. Most of the code now is rewritten into code.

The video to the right shows what the first demo looks like. It was released 27 days after the teaser above, on August 27, 2006.
I programmed the heck out of the game for about six months. Then I found The Rockman EXE Zone, a site that at the time had less than 328 members (about 30 were active), and was dedicated to hex hacking the game Megaman Battle Network 6 (mainly falzar) for the Game Boy Advance. I liked it, I mean, I LOVED Megaman Battle Network 3. (4 was terrible).
So I joined on Feb 19 2007, at 03:55 AM (apparently). I followed the guide, which at the time was about 27 pages long on the forum (the guide was pretty short).
My first guide I ever posted was on page 46 of the thread, which was mainly just the interesting values you could find when hacking the enemy sprites. It was also my first post. It was a pretty badly written post, and was hard to follow. I later edited it and cleaned it up. This was around the time when Exceeding Light was a hacker, but he is gone now.
I left StarBord behind for a while while I focused on hacking. I did it for about 8 months straight. I wrote multiple sub guides (guides that classify their own thread), including the Folder Hacking Guide (easy), Chip Hacking Guide (difficult) and Attack Sequence Hacking (Tear your hair out).
Some other guides I wrote (Some aren't listed because they were wiped in a hack attack =[ )
  • One vs Seven Guide
  • Quad Core Battle Guide
  • Chip Code Hacking Guide (now in Chip Hacking guide)
  • AI Hacking Guide (wiped) 
I used my YouTube channel to publish hundreds of exploits and tests that I did. Hacking was fun. You have to figure out patterns in walls of hex and figure out what they do, which is time consuming, but bending the rules is fun. Seeing how the game reacts is quite interesting in certain scenarios.
Hacking complex things like contest edits was a pain however (before patches), because you had to edit everything, and if you made a mistake, the game would crash and you'd have to reset the rom, which wiped all changes. So it took quite a while to create the setup for my multiple hacking contest videos. My original one was this, but now it is more like what happens when the GBA can't get its life together. The video is so full of errors. I have no idea what I was thinking when I wrote the text. But as you can see, this is just a mash up of just about everthing I knew at the time. Quad Core, Scrolling Background, non-time freeze, darkinvis, its all there.


    In these videos is the first time you'll see my Mgamerz Productions logo. It was ugly, and I didn't make it. But hey, it was cool.
    I eventually developed a patch that incorporated hundreds of hacks to the game. Something happened and screwed some of the edits up, but for about 95% of the patch, it is totally usable. It's so much more fun to battle online with too. 
    I also won the first TREZ hacking contest. I then won the third one as well, and they are now on the... like 10th or so. I went from Magnetic Member (was not yet to legendary at 500 posts) to the new rank, apprentice hacker, and then finally to Master Hacker at moderator level.
    I eventually trained another hacker, Buster858, to hack. He was good. He became just about as good as me, and wrote some guides as well. He eventually left, however. A few years later I trained another person, Akiyo, but it didn't last too long. I hope she is okay, she lives in Japan next to Tokyo and that huge earthquake is ruining everything over there. I hope she is okay.

    I lost my moderator privledges because of that stupid hack attack someone did on the site, and ever since then, nobody trusts the mods. I don't visit TREZ that much. There is not much to hack anymore.
    I eventually moved back to StarBord and continued it. I expanded it into a 360 degree shooter, which took quite a bit of work. One of the earliest development builds was horrendously ugly.
    But that was quite a few years ago.
    The video above shows an unreleased test-bed build (separate from the main game) of the StarBord ARM feature. It is in horrendous quality because the video recorder cannot pick up sharp fonts and the background, so it is uglier. But it still shows you how ugly the original was. This test bed eventually turned into a spin off arcade game test bed. It was pretty bad, but it was actually good enough that some people called it a game. I did not like it, but it did create many good concepts. The way I created the water stage eventually became the training ground in the Core (ARM is the test bed (All Range Mode), and Core is the main game. ARM is also the 360 degree mode). If you have no picked up on it already, this game was heavily influenced by Star Fox (64), because right before I started working on it, I was so good on an emulator that I could take out Star Wolf at Fortuna in about 2.8 seconds.
    I have to take time to say this. Yes, you do shoot flying green S's. Why everyone always complains about this, I don't know. It's a game! Use your imagination!!! And no, in ARM mode, there are NOT vehicle collisions! I wanted to be different. So I made more enemy ships and less collisions. I thought it was boring to do things on collisions, although I have considered doing asteroids. You can see this in Stage 4 Vertical, but the collisions just aren't there... yet.
    Stage Order:
    0: Opening
    1: Stage 1 (Spawner)
    2: Stage 2 (Has moon)
    3: ARM Stage 3 - Televiv
    4: Stage 4 Vertical
    4.1: ARM Stage 4 - BOSS: Regional Commander Gigadon
    5: Stage 5 ARM - Vs Team StarFire (lolz at the creativity in these names)

    I'll write up another blog post and link to it in the future for more information on StarBord.
    But for some fun, here is a playlist of videos that does a run through of version 10. FYI, the storyline does not make sense. I have not worked out how I want it to work yet.


    So here I am today with StarBord. I don't have a current video, but the release is currently StarBord: Version 11a. a, because the save system doesn't work. I made it so complex that it doesn't work. And I have no idea why, nobody does. I probably will have to tear it down and rebuild one that works, but it is so complex that I don't understand it.
    So I stopped working on it for some time.
    That's where the first video in this blog post comes in. I did some serious video editing (... amateur is a better word here) using Cinelerra for Ubuntu.

    So I plugged in an older hard drive that hasn't been in use for a while into my new rig, and I found quite a few projects I used to be working on.
    The obvious one was my Senior Video about the Iliad. I spent SOOOO many hours editing that. Mostly waiting, because my computer was so bad that doing anything took forever. But I made a pretty awesome, yet somewhat simple intro to a DVD, and another better intro to a video. The video sucked. Most of the actors lacked stellar talent :) .

    Note: You don't need to watch after the intro here (please don't)

    Recently I have been working quite a bit on things related to WikiLeaks. I helped create a translation of the WikiRebels Documentary into a few other languages with the help of some other people. It sucked to make, because watching collateral murder over and over again to hear what people were saying was so sad, but it had to be done.

    Now I am a undergraduate researcher at Boise State University and I study cryptology, so things I have been developing for that are branded by Mgamerz Productions. The new, and more... simple/epic branding (for videos/games) is now:

     There has been much debate if I should A or An.

    I actually use a slightly updated version of this intro, that has less lag and is a bit faster ~15 seconds.
    It also is pretty easy to edit.
    I am currently trying to find other schools to research at over the summer. I enjoy researching and wish to continue.
    And that folks, is a brief history of Mgamerz Productions. I might update it as I remember more later, but I wanted to tell you all about it. If you read this all, cookies for you! (and watched too)

    Friday, March 11, 2011

    Geffe Generator in Java

    So I've been putting together my java program, and it's coming along decently. I have no real idea though how far I will be in a month. I'm making some good progress, but a GUI is going to be difficult since we haven't covered them in my java class yet. (school class, not a java class) It will be interesting to see how this turns out.
    Picture: Not a photo class
    I have also been working non-stop all week on my Photo project for aformentioned class. It has been annoying since I program on Windows and he wants it to work on linux. I like using linux but I find it to be a serious battery killer in a virutal box. With the lack of syncing capabilites as well, it is not very useful besides barebones coding.
    The way we are making it is... well, stupid. I think we will be using it later, but it feels somewaht stupid to create photo objects that just return the values you put into the main. You should just be able to use the main to put out the data. It seems way too complex for what it is (but I'm also iterating in my game programs save, so much that I don't even know what is happening anymore... so...)

    Wednesday, March 2, 2011

    MP Cryptographer - Java Version .4a

    ****Mgamerz Productions Cryptographer****
    ***************Java Version**************

    LFSR: 11011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011011
    Debug: 500

    I finally have a working generator in Java. Porting the code is not very difficult for me though, since they are nearly identical.
    Just have to port the vernam parts and I'll pretty much be done.