473,698 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3803
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(encyp ted 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.securit y.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 configurationSe ction 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/1bbeeb01ae5ca5c 6/70dd27a4598ab06 0

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
1888
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 is it better to store that information in a database and retrieve it when needed or wouldnt it make any difference?? thanks chris
5
2037
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. I have a table in the database that will also contain their session information which it will encrypt and store as a class on the client end. Each time they connect to the server I will pass the session class back and it will decrypt, then...
15
1858
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
1569
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 procedures. It seems the preferred method is to restrict access to all table and then to set the execute option based on each stored procedure and handle the error in some intelligent way. Now this is causing several problems the first being setting...
2
1426
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 tried setting up groups and permissions, but found that users were still able to open forms I had thought would have been restricted. I then tried the security wizard, and found that TOO restrictive, especially if I find another job and am not...
2
12574
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 the service can start without interaction from the user. Also for COM+ components. This is what I want to be able to do. I want the ability to store passwords in a protected manor so that my .NET application can start a secure process at a...
14
3498
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, one developer suggested that it's a security flaw; therefore connection strings should be kept somewhere else or encrypted. My argument is that web.config file is protected by IIS and Windows security which is the case. And another argument is that...
8
1076
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 sql 2005 database (Think of it as a journal). Some of the entries in this application contain sensitive data that needs to be kept secure. What I am wondering is the best method of doing this?
2
2822
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 and will try it. My question is, I have inherited a MS 2003 db that had user groups and users set up, I have found the .mdw file and can get the user names but not the passwords. They are not written down anywhere that I can find. This db...
0
8680
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9169
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2335
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.