Help with simple XOR cipher

  • ivel236
    2nd Nov 2015 Member 0 Permalink
    I wanted to use the output from Technomancer's pseudorandom generator to build a simple XOR cipher but I'm not very skilled with FILT computation systems. Could anyone help me?

    The main thing is I need a compact way to print out a stick of FILT containing various bit patterns from an output.
    Any good examples or saves showing how to store info on FILT would be appreciated.

    Edited once by ivel236. Last: 2nd Nov 2015
  • LBPHacker
    2nd Nov 2015 Developer 0 Permalink

     

    This generates a stick of FILT for you. It's 60hz and subframe, so be sure to save and reopen the simulation every time you change something in this component. Although it's 60hz, you don't actually have to take the data every frame, you can just shoot BRAYs through the stick of FILT whenever you wish.

     

    Storing data on FILT, by the way, is just shooting colored BRAY near a DTEC touching a straight (including diagonal) line of FILT.

  • ivel236
    2nd Nov 2015 Member 0 Permalink
    Thank you! just what I needed! I tried to do it myself but it was like 6x this size lol.

    Mind explaining how it works though? Are the perpetual spark particles actually creating bray every frame?!??!
    Edited once by ivel236. Last: 2nd Nov 2015
  • LBPHacker
    2nd Nov 2015 Developer 0 Permalink

    The "perpetual spark" at (310; 173) powers an ARAY, which shoots BRAY through a FILT(.ctype=0x20000000), and any other FILT copied there by the DRAYs from above (those FILTs perform a binary OR on the BRAY and range from 0x01 to 0x80 in .ctype). This way you end up with a BRAY at (299; 173) that has its MSB and some of its eight LSB set. Right after that (in the same frame; remember, we're going from left to right and from top to bottom) the DRAY (powered by the "perpetual spark" at (321; 173)) copies air over (300; 173) through (307; 173). The DTEC at (298; 174) detects the BRAY at (299; 173) and sets the .ctype of the line of FILT below to the BRAY's. Then the CRAY (powered by the "perpetual spark" at (301; 175)) deletes the remaining BRAY as well. This way the entire (299; 173)-(307; 173) region is empty again and ready for the next frame. Meanwhile (still in the same frame) the PSTN below all this pushes a FILT out to the right. At last the DRAY at (298; 180) replaces the PSTN's arm with a FILT. The dray-gun to the far right just deletes the FILT above it.

     

    EDIT: And, yeah, actually answering your question, there *is* a perpetual spark that's creating BRAY every frame.

    Edited 3 times by LBPHacker. Last: 2nd Nov 2015
  • ivel236
    2nd Nov 2015 Member 0 Permalink
    Fantastic, thanks for the very detailed explanation! I fully understand how it functions now and learned loads about CRAY and DRAY in the process. What nifty little perpetual spark mechanisms to get max speed, never really got how those worked in other saves till now...
  • LBPHacker
    3rd Nov 2015 Developer 0 Permalink

    That's what I like about subframe. Once you get the hang of hacking with particle order and cray/dray-guns, it all gets gradually easier. It only gets complicated when you add air-copying DRAYs to the mix; something might copy some other thing somewhere, something else might detect it, and a sneaky DRAY might delete it afterwards, and at the end of the frame you might end up with pockets of air where you'd expect FILT or BRAY or whatever to be. It's especially confusing when you're trying to make sense of someone else's build, that's when you ask for explanation.

     

    The only drawback of subframe tech is that after a while you develop a habit of doing ridiculously simple tasks with it.

  • ivel236
    3rd Nov 2015 Member 0 Permalink
    I got the basic setup going. Now I need to make the module that can find the plaintext string you made and XOR it with the random output. One small problem though is that the output from the number generator isn't quite outputting enough information to adequately scramble the plaintext.... (usually only produces like half a bit per frame) Going to have to condense it somehow or add more of it to "enrich" the output.



    Here's what I'm talking about with the pseudorandom generator...
    Run the save if you are interested, what happens is it produces a number of these "gaps" of null data. (The red FILT set to 0x30000000) some of them 3-6 pixels long. If this data is used in a XOR cipher it would merely invert the character it is being XORed with to its compliment. Essentially leaving entire words unencrypted. I tried adding more opportunities for it to write to the FILT and that helped a bit but it's still not good enough. Oh well I suppose it probably wouldn't be very secure anyway....
    Gunna roll with it unless anyone has an idea to make it a bit more pseudorandom.




    Edited 3 times by ivel236. Last: 4th Nov 2015
  • ivel236
    8th Nov 2015 Member 0 Permalink
    Alright it's done, just gotta work out some minor bugs and polish it up a bit for the noobs.



    ***Updated so there are no null messups.
    Edited once by ivel236. Last: 8th Nov 2015
  • LBPHacker
    8th Nov 2015 Developer 0 Permalink

    Yep, that's awesome. The shifting is a bit slow though, could you try to use subframe pistons?

  • ivel236
    8th Nov 2015 Member 0 Permalink


    Alright it's even more done.
    Gonna upload soon. However I still have 9 addresses left for characters. Any 3x5 symbols you guys want?
    Edited 4 times by ivel236. Last: 11th Nov 2015