473,396 Members | 2,014 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

security, passwords, and DPAPI

In the interests of increasing security, I came upon the DPAPI security
library available from the GotDotNet user samples repository. What I want
to do is create an applications that accesses a database with one single
password embedded in the program, so it may be run by any user on any
machine. I observe that one may specify a UserStore or a MachineStore for
constraining the encryption. That seems to imply that my application would
only work on a single machine. Is this true? Is it possible to use the
DPAPI and allow running on different machines?
Aug 30 '06 #1
3 3774
Hello Michael,

Yes, DPAPI is a good one for security data on a single machine since it use
the machine storage to help persisting the security key rather than our
application's own code logic which can prevent the key from be cracked.
Also, as you've found, the limitation is that the security key is specific
to the macine or user and can not be exported to other machines. Therefore,
when using the DPAPI, the data should be protected(encypted through DPAPI
api) at the application's initializaing time. For exampe, in the
application's installation time, construct the data and encrypted it
through DPAPI method.

BTW, what's the " GotDotNet user samples repository" you mentioned? If
you're using .NET framework 2.0, you can directly use the
"system.security.cryptography.protecteddata" class to encrypt/descript data
through underlying DPAPI api

#ProtectedData Class
http://msdn2.microsoft.com/en-us/lib...ography.protec
teddata.aspx

Also. net framewrok 2.0 support encrypting configurationSection in
application's config file(app.config, web.config) through RSA provider. The
advantage of RSA provider is that we can create custom RSA key in the
machine container and export the key and install on target machine when we
need to deploy applciation onto other machine. So this is not limited to
single machine.

Here is a good msdn tech article describing encrypte configuration sections
through RSA provider:

#How To: Encrypt Configuration Sections in ASP.NET 2.0 Using RSA
http://msdn.microsoft.com/library/en...6.asp?frame=tr
ue

Though this article is dedicated to ASP.NET web.config, this appraoch also
appliable for normal .net application's app.config file. You can refer to
my previous thread discussing how to use it in normal .net application's
config file:

#Encryption of application configuration block
http://groups.google.com/group/micro.../browse_thread
/thread/1bbeeb01ae5ca5c6/70dd27a4598ab060

Hope this helps you.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Aug 31 '06 #2
Thanks for your in-depth commentary; it will take me awhile to digest but
you have provided some good material and links.

To answer your question: GotDotNet (http://www.gotdotnet.com/default.aspx)
is a Microsoft site (:-) for add-ons, libaries, samples, etc.

Sep 5 '06 #3
Thanks for the followup Michael,

Please feel free to let me know if you need any further asssistance on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 6 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: chris | last post by:
im just starting to learn how sessions work and how to use them my question is if im geting a username and password from a visitor is it secure to store that information in a session variable or...
5
by: Nick | last post by:
I am working on an application for a client that will involve using remoting. They do not want to use integrated security so I was going to store usernames and hashed passwords in a SQL Database. ...
15
by: osfwofujro | last post by:
According to a financial website I tried to access without JavaScript: "the site uses JS for security reasons." How would using JS improve security? Thanks.
2
by: John J. Hughes II | last post by:
I am having some major problem with maintaining security for my windows application to the SQL. Currently my application access the SQL using System.Data.SqlClient and all forms use stored...
2
by: David Ingram | last post by:
Greetings all! I am aiming to set up simple permissions for users on a database here at work, to the effect that certain users should be restricted from opening certain forms and reports. I...
2
by: Peter Rilling | last post by:
How does Windows store passwords that it uses? For instance, when you install a service, you can provide it the username and password. This information is stored somehow so that at a later date...
14
by: WebMatrix | last post by:
Hello, I have developed a web application that connects to 2 different database servers. The connection strings with db username + password are stored in web.config file. After a code review,...
8
by: =?Utf-8?B?aWxy?= | last post by:
Hi All Bit of a newbie at this stuff but was wonering if anyone could offer me some advice on a vb application and securing data. I have a fairly basic vb 2005 application that connects to a...
2
by: Emmi | last post by:
Once again on the db I have inherited... I have read numerous posts about how to set up security in access and have printed out the step by step instructions I found a link for from another post...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.