By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,733 Members | 925 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,733 IT Pros & Developers. It's quick & easy.

encrypting images in asp.net

P: n/a
I wonder if it is possible to encrypt images(like .tiff or .gif files) in
asp.net? How? Any exampel code or url will be appreciated. Thanks
Nov 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
It's possible to encrypt any data. However, I can't for the life of me
figure out why you would want to do this. If, for example, you're looking
for a way to prevent images from being copied, forget it. Can't be done. If
it could, we wouldn't need copyright laws!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"viktor9990" <vi********@discussions.microsoft.com> wrote in message
news:3F**********************************@microsof t.com...
I wonder if it is possible to encrypt images(like .tiff or .gif files) in
asp.net? How? Any exampel code or url will be appreciated. Thanks

Nov 19 '05 #2

P: n/a
The .tiff files ( which represent scanned agreement) will be saved in an sql
database 2000 of security reasons. My client demand that these files will be
encrypted also. It would be helpful if you know of any exampel code or url
about that. Thanks
"Kevin Spencer" wrote:
It's possible to encrypt any data. However, I can't for the life of me
figure out why you would want to do this. If, for example, you're looking
for a way to prevent images from being copied, forget it. Can't be done. If
it could, we wouldn't need copyright laws!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"viktor9990" <vi********@discussions.microsoft.com> wrote in message
news:3F**********************************@microsof t.com...
I wonder if it is possible to encrypt images(like .tiff or .gif files) in
asp.net? How? Any exampel code or url will be appreciated. Thanks


Nov 19 '05 #3

P: n/a
> The .tiff files ( which represent scanned agreement) will be saved in
an sql database 2000 of security reasons. My client demand that these
files will be encrypted also. It would be helpful if you know of any
exampel code or url about that. Thanks


Well once you start to do encryption if you ever want the original data you'll
need to do decryption. So this means you need a key. Where does your client
want you to store the key? This is a major problem when people (client typically)
say "oh, just encrypt it" and they don't understand what it all means.

So to help, what's the usage of the images? Meaning they're encrypted in
the DB, when do you pull them out? Who gets to see them and how? Are they
going to be served from an ASP.NET application or do only certain people
get to see them via an intranet application? If we know the scenario a bit
better then you might get some better guidance... This security stuff is
tricky.

-Brock
DevelopMentor
http://staff.develop.com/ballen


Nov 19 '05 #4

P: n/a
These images are going to be served from an ASP.NET application. Certain
people will be able to look at them (depending on their role/persmissions).
What I only need now is how to encrypt these images when uplaoding them to
sql server 2000 database and how to decrypt them when showing them to
entitled users?

"Brock Allen" wrote:
The .tiff files ( which represent scanned agreement) will be saved in
an sql database 2000 of security reasons. My client demand that these
files will be encrypted also. It would be helpful if you know of any
exampel code or url about that. Thanks


Well once you start to do encryption if you ever want the original data you'll
need to do decryption. So this means you need a key. Where does your client
want you to store the key? This is a major problem when people (client typically)
say "oh, just encrypt it" and they don't understand what it all means.

So to help, what's the usage of the images? Meaning they're encrypted in
the DB, when do you pull them out? Who gets to see them and how? Are they
going to be served from an ASP.NET application or do only certain people
get to see them via an intranet application? If we know the scenario a bit
better then you might get some better guidance... This security stuff is
tricky.

-Brock
DevelopMentor
http://staff.develop.com/ballen


Nov 19 '05 #5

P: n/a
Here's the easiest way:

http://msdn.microsoft.com/library/de...SecNetHT07.asp

But be aware that you have a key management problem, meaning the key using
DPAPI is managed for your by the host OS and it will be different for each
machine, meaning this approach won't work on a server farm. I'd suggest you
go spend some time reading about the issues revolving around security. The
book I'd recommend is:

http://www.amazon.com/exec/obidos/tg...books&n=507846

And specifically section 2.6 entitled "Cryptography Is Not the Solution".
Like I said, this security stuff is tricky business; Don't rush into something
without understanding how it works and why you're doing it.

-Brock
DevelopMentor
http://staff.develop.com/ballen
These images are going to be served from an ASP.NET application.
Certain people will be able to look at them (depending on their
role/persmissions). What I only need now is how to encrypt these
images when uplaoding them to sql server 2000 database and how to
decrypt them when showing them to entitled users?

"Brock Allen" wrote:
The .tiff files ( which represent scanned agreement) will be saved
in an sql database 2000 of security reasons. My client demand that
these files will be encrypted also. It would be helpful if you know
of any exampel code or url about that. Thanks

Well once you start to do encryption if you ever want the original
data you'll need to do decryption. So this means you need a key.
Where does your client want you to store the key? This is a major
problem when people (client typically) say "oh, just encrypt it" and
they don't understand what it all means.

So to help, what's the usage of the images? Meaning they're encrypted
in the DB, when do you pull them out? Who gets to see them and how?
Are they going to be served from an ASP.NET application or do only
certain people get to see them via an intranet application? If we
know the scenario a bit better then you might get some better
guidance... This security stuff is tricky.

-Brock
DevelopMentor
http://staff.develop.com/ballen


Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.