Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Encrypt - Decrypt

Encrypt - Decrypt

Scheduled Pinned Locked Moved C#
databasesecurityhelpquestionlearning
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Midnight Ahri
    wrote on last edited by
    #1

    i have to give my connection string to the other so they can connect to my database. i understand that this is not secure. so i'm working on a new application that encrypt my connection string, give it to the other, and decrypt it before connecting to my database. of course i didn't show the result of decryption. i need a suggestion, what encryption is best for this problem? thank you, Ahri

    L 1 Reply Last reply
    0
    • M Midnight Ahri

      i have to give my connection string to the other so they can connect to my database. i understand that this is not secure. so i'm working on a new application that encrypt my connection string, give it to the other, and decrypt it before connecting to my database. of course i didn't show the result of decryption. i need a suggestion, what encryption is best for this problem? thank you, Ahri

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Midnight Ahri wrote:

      i need a suggestion, what encryption is best for this problem?

      The problem with encryption is that you have to provide a mechanic for your app to decrypt it. That means that there's a key to the vault, hanging next to the vault. If the database is running on their system, and is filled with their data, who would be the legal owner of the database? Your best option for security would be to provide only access to some webservices, and not have the client interact with the database directly.

      Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

      M B 2 Replies Last reply
      0
      • L Lost User

        Midnight Ahri wrote:

        i need a suggestion, what encryption is best for this problem?

        The problem with encryption is that you have to provide a mechanic for your app to decrypt it. That means that there's a key to the vault, hanging next to the vault. If the database is running on their system, and is filled with their data, who would be the legal owner of the database? Your best option for security would be to provide only access to some webservices, and not have the client interact with the database directly.

        Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

        M Offline
        M Offline
        Midnight Ahri
        wrote on last edited by
        #3

        thank you for the reply, let me explain my application in easier example, i'm working on address book application, i save telephone, name, address in my own database, i give this application to my friend, and he can save the data in his own database, my application can connect to his database (using his connection string & wifi) and i can access his address book, also save it to my database.

        Eddy Vluggen wrote:

        and not have the client interact with the database directly.

        usually i was given a corporate project (all client connects to server) but this time, i don't even understand why i'm given a project like this. and the worst one, user should be able to read the encryption. i've try googling, i found some encryption thats impossible to read. X|

        L 1 Reply Last reply
        0
        • M Midnight Ahri

          thank you for the reply, let me explain my application in easier example, i'm working on address book application, i save telephone, name, address in my own database, i give this application to my friend, and he can save the data in his own database, my application can connect to his database (using his connection string & wifi) and i can access his address book, also save it to my database.

          Eddy Vluggen wrote:

          and not have the client interact with the database directly.

          usually i was given a corporate project (all client connects to server) but this time, i don't even understand why i'm given a project like this. and the worst one, user should be able to read the encryption. i've try googling, i found some encryption thats impossible to read. X|

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Midnight Ahri wrote:

          i give this application to my friend, and he can save the data in his own database,
          my application can connect to his database (using his connection string & wifi) and i can access his address book, also save it to my database.

          Aah, I misunderstood; you want to prevent users (like you) from reading other users' database (like your friends), correct? The database usually has a password, passed in the connectionstring. If the user could set his own password, you'd be out of trouble. Ask for the password on startup, and offer an option to "keep logged in", just like a webpage - that should do the trick.

          Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

          M 1 Reply Last reply
          0
          • L Lost User

            Midnight Ahri wrote:

            i give this application to my friend, and he can save the data in his own database,
            my application can connect to his database (using his connection string & wifi) and i can access his address book, also save it to my database.

            Aah, I misunderstood; you want to prevent users (like you) from reading other users' database (like your friends), correct? The database usually has a password, passed in the connectionstring. If the user could set his own password, you'd be out of trouble. Ask for the password on startup, and offer an option to "keep logged in", just like a webpage - that should do the trick.

            Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

            M Offline
            M Offline
            Midnight Ahri
            wrote on last edited by
            #5

            thank you very much ! :thumbsup:

            1 Reply Last reply
            0
            • L Lost User

              Midnight Ahri wrote:

              i need a suggestion, what encryption is best for this problem?

              The problem with encryption is that you have to provide a mechanic for your app to decrypt it. That means that there's a key to the vault, hanging next to the vault. If the database is running on their system, and is filled with their data, who would be the legal owner of the database? Your best option for security would be to provide only access to some webservices, and not have the client interact with the database directly.

              Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

              B Offline
              B Offline
              BobJanova
              wrote on last edited by
              #6

              Public key encryption solves the 'key in the vault' problem. Any situation where a key can't be exchanged securely offline first (which is most internet apps) means that you need a public key encrypted key exchange process to create an encrypted channel.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups