secret key string visible in dll

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default secret key string visible in dll

    hi,
    i am using 3des encryption with a secret key to send information between 2 aspnet applications. they both know the key, which is a hard-coded string. i have read about using aspnet-setreg to securely store such a value in the registry, but i have a different query.
    if i open the dll in notepad, i can read the secret key, which obviously is no good. i tried changing the code to use a number as the secret key, calling .ToString() on the number. I then recompile and open up the dll in notepad and i can't find the number, which seems better. i don't know a thing about disassembling .net executables, so i'd like to know if the key is safe, hard-coded in the dll, in numeric form?

    granted a numeric key has less combinations than a string version, but adding more digits will go some of the way to help that.

    thanks for any help
    tim mackey.
    Tim Mackey Guest

  2. Similar Questions and Discussions

    1. ssl secret key available to asp.net page?
      Hi, To make a solution avoiding session ID hijacking work for cookie-less mode, I would like to record some unique property of the ssl session...
    2. What's the secret to runaround type in PS7?
      Hi guys. I'm trying to use Return and Space to run type around some pix (see ascii sample below) but In In the text tool marquis work area,...
    3. Discover the secret!
      It took months to build this system, created from the mind and financed from the pockets of a self-made internet millionaire, so it is perfect. IT...
    4. Any way to get a look a the Secret Life of Gradients?
      Is there any way to get the x,y coordinates of the start and end points of a gradient line respective of the bounding box of its parent object? ...
    5. Where to store secret information
      Search microsoft.com for the tool aspnet_setreg - it allows you to store secret information encrypted in a tightly ACLed registry key. -- Chris...
  3. #2

    Default Re: secret key string visible in dll

    With a tool like Reflector or Anakrino, it would be trivially easy to
    decompile your assembly to discover how you are getting the key if it is
    hard coded in the assembly. However, if you can protect access to the
    assembly, then this may still be safe. It really depends on who will have
    access to it.

    Storing secrets is a very hard problem

    Joe K.

    "Tim Mackey" <anonymous@discussions.microsoft.com> wrote in message
    news:7A875CEA-DD4E-4DB8-8397-3D6FC41F06AC@microsoft.com...
    > hi,
    > i am using 3des encryption with a secret key to send information between 2
    aspnet applications. they both know the key, which is a hard-coded string.
    i have read about using aspnet-setreg to securely store such a value in the
    registry, but i have a different query.
    > if i open the dll in notepad, i can read the secret key, which obviously
    is no good. i tried changing the code to use a number as the secret key,
    calling .ToString() on the number. I then recompile and open up the dll in
    notepad and i can't find the number, which seems better. i don't know a
    thing about disassembling .net executables, so i'd like to know if the key
    is safe, hard-coded in the dll, in numeric form?
    >
    > granted a numeric key has less combinations than a string version, but
    adding more digits will go some of the way to help that.
    >
    > thanks for any help
    > tim mackey.

    Joe Kaplan \(MVP - ADSI\) Guest

  4. #3

    Default Re: secret key string visible in dll

    Hi Joe,
    many thanks for the clarification. i thought i might have stumbled on a good way of storing secret keys, as numbers, but it's re-assuring to hear from an expert that it still wouldn't be secure if access to the assembly file was compromised.

    cheer
    ti

    Tim Mackey Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139