473,657 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Encrypt/decrypt automatically with PHP PDF document via Client CA

Hi Everybody,

Does anybody know whether it is possible to encrypt AUTOMATICALLY in PHP
(at the server side) an Adobe PDF document (also stored at the server side)
by using a public key coming from a certificat of the client that want to
retreive, decrypt (with his private key) and read the PDF document ?

I would like to distribute PDF document to certified clients for which they
could only read the document on their PC that owns the certificat
(public/private keys) that has been used to encrypt the document at the
server side and allow to decrypt it at the client side.

Many thanks in advance for you help

Steph
Apr 16 '07 #1
4 3003
Steph wrote:
Hi Everybody,

Does anybody know whether it is possible to encrypt AUTOMATICALLY in PHP
(at the server side) an Adobe PDF document (also stored at the server side)
by using a public key coming from a certificat of the client that want to
retreive, decrypt (with his private key) and read the PDF document ?

I would like to distribute PDF document to certified clients for which they
could only read the document on their PC that owns the certificat
(public/private keys) that has been used to encrypt the document at the
server side and allow to decrypt it at the client side.

Many thanks in advance for you help

Steph

Forget it. Most clients don't have certificates, and even if they did,
they could copy the certificate to another machine.

If it were that easy we wouldn't have the problem with piracy (both
software and entertainment) that exists in the world today.

The fact is - once I download your PDF, I can pretty much do as I please
with it. If you don't want others to have it, don't distribute it.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Apr 17 '07 #2
NC
On Apr 16, 3:49 pm, "Steph" <mcv...@hotmail .comwrote:
>
I would like to distribute PDF document to certified clients
for which they could only read the document on their PC
that owns the certificat (public/private keys) that has been
used to encrypt the document at the server side and allow
to decrypt it at the client side.
You are going about it in a wrong way. Instead of encrypting PDF, you
should produce an e-book. Although e-books are not exactly hacker-
proof, either...

Cheers,
NC

Apr 17 '07 #3

"NC" <nc@iname.com a écrit dans le message de news:
11************* *********@p77g2 00...legr oups.com...
On Apr 16, 3:49 pm, "Steph" <mcv...@hotmail .comwrote:
>>
I would like to distribute PDF document to certified clients
for which they could only read the document on their PC
that owns the certificat (public/private keys) that has been
used to encrypt the document at the server side and allow
to decrypt it at the client side.

You are going about it in a wrong way. Instead of encrypting PDF, you
should produce an e-book. Although e-books are not exactly hacker-
proof, either...

Cheers,
NC
Do you have a recommandation about what e-book to use ?
I'm not very familiar about it
Apr 17 '07 #4

"Jerry Stuckle" <js*******@attg lobal.neta écrit dans le message de news:
Zp************* *************** **@comcast.com...
Steph wrote:
>Hi Everybody,

Does anybody know whether it is possible to encrypt AUTOMATICALLY in PHP
(at the server side) an Adobe PDF document (also stored at the server
side) by using a public key coming from a certificat of the client that
want to retreive, decrypt (with his private key) and read the PDF
document ?

I would like to distribute PDF document to certified clients for which
they could only read the document on their PC that owns the certificat
(public/private keys) that has been used to encrypt the document at the
server side and allow to decrypt it at the client side.

Many thanks in advance for you help

Steph

Forget it. Most clients don't have certificates, and even if they did,
they could copy the certificate to another machine.

If it were that easy we wouldn't have the problem with piracy (both
software and entertainment) that exists in the world today.

The fact is - once I download your PDF, I can pretty much do as I please
with it. If you don't want others to have it, don't distribute it.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Thanks for your advice !
Apr 17 '07 #5

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

Similar topics

1
7948
by: wqhdebian | last post by:
As far as I know,when encrypt or decrypt ,a key must first be got,and the key is first generate by a tool or from SecurityRandom,that means I can not generate the same key with the same input.Does there is a method which can generate a same with the same input string? There is a need to transfer file between to site,and the customer wish to encrypt these files during transfering,and they want to store a string into each database at...
4
28285
by: Spikinsson | last post by:
I'm looking for a good decrypt/encrypt function, all I want is a function in this form: char* encrypt(char* normal) { ... return encrypted; } and
11
4870
by: underwmd | last post by:
Hello, My problem is two fold. 1) I must support a deployed legacy application written in VB6 SP5. I need to export data from a database, compress it and the encrypt the data using 3DES (to prevent tampering) data gets transmitted at night to the home office of my company. Rewriting this application in .NET is not an option as the application was 5 years in development.
1
3960
by: Benoît | last post by:
Hi, I have generated two keys : "C:>openssl req -nodes -new -x509 -keyout ben.key -out ben.crt -days 3650" I try to encrypt/decrypt a string like "JOHN" with these asymetrics keys. With the following code, it works. I encrypt with the public key which is in the certificate. I decrypt with the private key. But why, the crypted message is different every time I start the programm...?
8
8168
by: Gidi | last post by:
Hi, Is there Buid-In fuction in C# that Encrypt and Decrypt strings? i have a textbox which i'm writing into file, and i want to encrypt it before writing, i'm not looking for something fancy, just for a simple Encryption and Decryption function. thanks, Gidi.
8
4269
by: toupeira23 | last post by:
Hello, I'm trying to encrypt passwords in my app. After discovering that there's no simple function to do this, I wrote a wrapper class which decodes a string using UTF8, encrypts it with TripleDES and returns a Base64-encoded string. The decryption function does the reverse, i.e. Base64-decodes the string, decrypts it with the same Key and IV, and encodes it again with UTF8. The problem is that after decrypting, the 8th character is...
4
4203
by: Islamegy® | last post by:
I give up.. I tried everything to encrypt querystring and decrypt it back but this never success.. i use RSA encryption. I always get excption when Convert fromBase64String so i tried HttpUtitlity.UrlEncode() but i got bad data Exception.. Is there anyway to work around this??
2
1934
by: Mr. Richardson | last post by:
Well i've been trying by converting the datatable with the WriteXml() encrypted and save it to a file, and at the moment it has been from one error to another. Maybe someone has allready done this before and can help me.
3
8271
by: JDeats | last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting and decrypting a file. http://support.microsoft.com/kb/307010 In .NET 2.0 this approach is not fully supported (a .NET 2.0 build with these methods, will appear to encrypt and decrypt, but the resulting decrypted file will be corrupted. I tried encrypting a .bmp file and then decrypting, the resulting decrypted file under .NET 2.0 is garbage, the .NET 1.1 build works...
0
8842
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
8740
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
8513
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,...
0
7352
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
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
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2742
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
1970
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.