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. Design and Architecture
  4. Store an encryption key

Store an encryption key

Scheduled Pinned Locked Moved Design and Architecture
questiondockeralgorithmssecuritytutorial
5 Posts 2 Posters 12 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.
  • N Offline
    N Offline
    Nyarlatotep
    wrote on last edited by
    #1

    I need a user/password pair to connect to a RDBMS through my application. Now I want to store those informations in a secure manner and I have thought to store them inside an encrypted archive using a strong encryption algorithm (may be AES, for example). Now, what is the smartest way to store the encyption key needed to access the user/password pair ? Inside the application binary ? In which secure way ? Into another kind of container ? Thanks

    M 1 Reply Last reply
    0
    • N Nyarlatotep

      I need a user/password pair to connect to a RDBMS through my application. Now I want to store those informations in a secure manner and I have thought to store them inside an encrypted archive using a strong encryption algorithm (may be AES, for example). Now, what is the smartest way to store the encyption key needed to access the user/password pair ? Inside the application binary ? In which secure way ? Into another kind of container ? Thanks

      M Offline
      M Offline
      Marcus J Smith
      wrote on last edited by
      #2

      One solution from a question I posted last year[^]


      CleaKO

      "I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that." - Tommy Boy
      "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)

      N 1 Reply Last reply
      0
      • M Marcus J Smith

        One solution from a question I posted last year[^]


        CleaKO

        "I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that." - Tommy Boy
        "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)

        N Offline
        N Offline
        Nyarlatotep
        wrote on last edited by
        #3

        It's the same solution I have thought, in some way. And now I'm reading some articles about DPAPI to see if it can help me for this kind of problems. Thanks a lot

        M 1 Reply Last reply
        0
        • N Nyarlatotep

          It's the same solution I have thought, in some way. And now I'm reading some articles about DPAPI to see if it can help me for this kind of problems. Thanks a lot

          M Offline
          M Offline
          Marcus J Smith
          wrote on last edited by
          #4

          If you have .NET 2.0 it can do the encryption/decryption for you as well as store it in the registry I believe.


          CleaKO

          "I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that." - Tommy Boy
          "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)

          N 1 Reply Last reply
          0
          • M Marcus J Smith

            If you have .NET 2.0 it can do the encryption/decryption for you as well as store it in the registry I believe.


            CleaKO

            "I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that." - Tommy Boy
            "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)

            N Offline
            N Offline
            Nyarlatotep
            wrote on last edited by
            #5

            I'm using VC++ without managed code. However it seems that DPAPI could solve this problem, either using a machine-store or a user store. For the latter, a point is not clear for me: for user-store it seems DPAPI use the windows user logon credentials to generate the master and session keys. The CryptProtectData and CryptUnprotectData functions have the chance to show a dialog to allow the user to insert a password. Is this only necessary if the windows user has no password set (may be a standalone machine) ?

            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