Re: Help encrypt conn string - no ASP, no server, can't protect keys, can't use Windows Authentication



That's a good question that I can't really answer. I'm not an expert on
registry usage and conventions.

It seems somewhat wrong to me to stick application data in the COM
registration info, but I don't really know. Based on what I've observed, it
would seem like the more conventional thing would be to stick the data in
HKLM\Software\<Your Company/Product>. I think the ultimate decision is up
to you. You could stick it in an ini file just as well and have the same
affect.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"David Lee Conley" <conley3500@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:arqvg.293$gF6.190@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Is there any reason I couldn't bury the string in HKEY_CLASSES_ROOT\CLSID
and under the GUID generated for my app? Would it violate a best practice
or convention?

Dave

"Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx> wrote
in message news:OdGW3NfqGHA.4492@xxxxxxxxxxxxxxxxxxxxxxx
I don't think it has to be that bad. If your CA creates the protected
data with the optional entropy, then the CA can update a Windows Installer
property with the result and your installer can then just write the data
to a known registry key.

Then, your app can read the known registry key, unprotect the data with
the .NET ProtectedData class and use it.

You'd probably want to round trip the encrypted binary data as Base64 to
make it easier to integrate with Windows installer and store in the
registry as a string. You could also write the data to a file with a
different CA.

The CA would need to have knowledge of the plain text data, but you might
as well include that in the compiled binary. If you run the CA from a
binary in the binaries table, it would never be installed on the file
system. Someone who knew what they were doing could pull that binary out
of your MSI and reverse engineer it, but they'd probably just use a
simple DPAPI call to hack you instead. But remember, we are just raising
the bar. :)

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services
Programming"
http://www.directoryprogramming.net
--
"David Lee Conley" <conley3500@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:neTug.783$bP5.72@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks for the info Dominick and Joe.

So it sounds like I'll need a custom action application that processes
the connection string using multiple encryption schemes in succession
during installation and then hard code the decryption process in my app.
What a pain.

Dave







.



Relevant Pages

  • Re: office update is unable to check for updates
    ... Windows Installer version 1.0 to Windows Installer version 1.1. ... Here is another post I saw on the forums that seems to have work for other users, but it requires advanced knowledge of the OS, basically registry editing, so please be careful if you try it. ... we need to manually delete all the registry keys for Office. ...
    (microsoft.public.officeupdate)
  • Re: Office unable to update
    ... You installed Office updates in the past and then upgraded from Windows Installer version 1.0 to Windows Installer version 1.1. ... basically registry editing, so please be careful if you try it. ... Delete the following registry keys if they exist: ...
    (microsoft.public.officeupdate)
  • Re: Windows Installer patch files (.MSP files) from previously app
    ... The installer patch never opens for me. ... understand why Microsoft are not addressing this issue. ... delete registry entries is not an acceptable solution. ... If you use Registry Editor ...
    (microsoft.public.officeupdate)
  • RE: Fix for Office repair and Office Updates install fail
    ... This resolves the install problem with the last Office updates. ... Tried the often suggested method of using the Windows Installer Cleanup ... aware that it involves a lot of registry editing, but it did fix ALL of my ... Delete the following registry keys if they exist: ...
    (microsoft.public.windowsupdate)
  • RE: Office Update is unable to check for updates
    ... > basically registry editing, so please be careful if you try it. ... > registry keys for Office. ... If you use Registry Editor ... >> I used the Windows Installer Cleanup Utility as recommended here in the ...
    (microsoft.public.officeupdate)