Hide my data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DGrund
    New Member
    • Jan 2017
    • 23

    #1

    Hide my data

    I am writing a word game, and my word lists are copied from an external text file during development time, and embedded within the program (the .EXE file). How do I hide these word lists from prying eyes who browse the .EXE file?
    Thank you!
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Use a simple encryption algorithm like rot13 or XOR cipher. Or if you want a challenge and to learn something use a more complex encryption algorithm like AES or DES.

    Comment

    • DGrund
      New Member
      • Jan 2017
      • 23

      #3
      Thanks for the response, but it doesn't quite apply.
      I have an external list. I "add file", bringing that into Visual Studio. That makes the list visible in the .EXE file after I build. I need to encrypt it BEFORE I bring it in, and decrypt it AFTER the program starts running. I don't have a problem with challenges, but I would like to jump this hurdle first. :) Thank you.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        That's pretty much what they were suggesting

        Comment

        • DGrund
          New Member
          • Jan 2017
          • 23

          #5
          @Rabbit: Why did you even chime in if you didn't have anything to provide? :) "Use a simple encryption algorithm" is not very specific, and therefore not very helpful. If I knew what I had to do, I wouldn't be asking for ideas.

          Comment

          • Rabbit
            Recognized Expert MVP
            • Jan 2007
            • 12517

            #6
            You said what Banfa was suggesting didn't apply. I was just pointing out what they were suggesting was the exact thing you were asking for.

            And Banfa did provide several specific algorithms that you could use. Rot13, XOR, AES, and DES are all specific encryption algorithms you could use.

            From my perspective, you ignored Banfa's suggestion.

            You asked, "How do I hide my data?"

            Banfa responded, "You can hide your data using encryption such as rot13, xor, aes, or des."

            Your reponse was, "That's not what I'm looking for. I'm looking for encryption."

            Comment

            • Banfa
              Recognized Expert Expert
              • Feb 2006
              • 9067

              #7
              For your situation
              1. Encrypt the file with the words in
              2. Import it into your exe
              3. Include code in your exe to decrypt it when you access the text data.


              ROT13 or XOR cipher should work fine for that (look them up on wikipedia). You may need to write a small utility to encrypt your original text file.

              Comment

              • DGrund
                New Member
                • Jan 2017
                • 23

                #8
                1. Encrypt the file with the words. You may need to write a small utility to encrypt your original text file.
                Understood. But do you have a little more direction? I can do C#, but I am new to encryption, especially one that I can decrypt in step3 below.

                2. Import it into your exe
                Understood

                3. Include code in your exe to decrypt it when you access the text data.
                If I can get step 1 working, I am sure I can reverse the process.
                Thank you!

                Comment

                • dev7060
                  Recognized Expert Contributor
                  • Mar 2017
                  • 656

                  #9
                  If i know the keywords, i'd use a search engine to get to know the specifics.

                  Comment

                  • DGrund
                    New Member
                    • Jan 2017
                    • 23

                    #10
                    No kidding. Another useless "help". Did you chime in to scold me? Please don't "help" if you don't have anything constructive to contribute.

                    Comment

                    • Rabbit
                      Recognized Expert MVP
                      • Jan 2007
                      • 12517

                      #11
                      You keep complaining about how no one's offering any help but it's also clear to us that you refuse to put in any effort into looking at the help already given.

                      If you had taken a minute to type rot13 into google, the very first result contains both a calculator that will apply rot13 for you, in addition to a link to the wiki page that explains how rot13 works.

                      The least you could do is click that first link in google to take a look at the calculator and read the wiki page that explains how rot13 works. If after that, you still have trouble understanding rot13, then we'd be happy to help further. For example, you could have replied with:

                      I read the rot13 article and it says I should do step x, y, z. But I am having trouble implementing step y. Here's what I tried to implement the steps but step y isn't working correctly. Where did I go wrong?

                      Comment

                      • SioSio
                        Contributor
                        • Dec 2019
                        • 272

                        #12
                        [Visual Studio .NET Tools]-[Dotfuscator Community Edition] has "String encryption".

                        Can it meet your request?

                        Comment

                        • DGrund
                          New Member
                          • Jan 2017
                          • 23

                          #13
                          Hmmm... I will research that. Thank you for the tip!

                          Comment

                          • Banfa
                            Recognized Expert Expert
                            • Feb 2006
                            • 9067

                            #14
                            I can do C#, but I am new to encryption, especially one that I can decrypt in step3 below.
                            I understand that is why I am suggesting simple ciphers, like ROT13 because that will give you the idea of basics of encryption without having to get your head round the complex maths of the more complex encryption routines.

                            I was assuming you might look up ROT13 using Google or Wikipedia as I suggested, it is a simple Caesar Cipher. The basics of a Caesar is every letter is replaced by another letter if the alphabet using a fixed shift offset, i.e. for a shift of 4 A is replaced with E, B with F, C with G etc. Decryption is a simple matter of undoing the shift E is replaced with A, F with B etc.

                            Rather than shifting this can be thought of as rotation because if you are at the end of the alphabet you start again at the beginning i.e. X is replaced with B which in computer terms is a rotation rather than a straight shift, hence the name ROT.

                            ROT13 is a special case because you are shifting/rotating by 13 characters. Because this is exactly half the number of characters in the alphabet, 26, the say algorithm can be used for encryption and decryption

                            i.e.
                            DGrund Rotated 13 = EHsvoe
                            EHsvoe Rotated 13 = DGrund

                            These are not strong ciphers and are subject to a number of well known cryptographic attacks
                            • Look a big bunch of text, spaced like words but I don't recognise any of them I wonder if a Caesar Cipher is in use?
                            • Frequency analysis, because an E is always replaced with the same character the frequency of that character in the cipher text (the text after encryption) remains the same, since the frequency that E occurs in written English is known frequency analysis of the symbols in the cipher text can give clues about encryption used.


                            to main 2 there are others, I'm not a security expert. The first point can be addressed by using an extended character set so your text is no longer all letters and also encoding the spaces. This is all explained in the ROT13 Wikipedia article.

                            I didn't think this mattered in your case because you are just trying prevent someone taking a casual glance at the code of the application from being able to immediately see the words.

                            Comment

                            • DGrund
                              New Member
                              • Jan 2017
                              • 23

                              #15
                              I understand that a seasoned hacker can disassemble a .Net program, and get to anything I have written. A seasoned hacker would be bored and unrewarded here. All I want to do is keep the casual hack from seeing and using my word lists. I appreciate your in-depth analysis and reply. I have my work cut out for me now. Thank you so much.

                              Comment

                              Working...