Hi all,
the following problem occured to me and I hope somebody can
help me :
I need to implement an encrypted File download with
a PHP script on the server side and a c# client application.
I know there is a way to symmetrically encrypt files
with the php mcrypt routines and already did implement a
protocol based on xml for querying files from the
server.
So the problem is, I need to generate and exchange a
random key for each transfer. This is possible,
for example, with the Diffie-Hellman Key Exchange
Procedure. Because I found nothing about this
procedure in the php function list, I began
to implement it myself.
The problem in this case is that I need arithmetic
support for Big Numbers (>=1024 Bits). The bc* functions
are too slow and do not work in this case. An alternative
would be the GMP Library, which is not supported by the
ISP where the script will be running.
Setting up my own Server with GMP support is no alternative either in
this case.
So perhaps anybody knows how I could achieve an encrypted
file download with different keys for every "Download Session" in
php. Is it possible over an ssl / https connection ? Or what am I
missing here ?
I would be very grateful for any hints, tips, sugesstions, points
to existing code...
Many thanks in advance,
Philipp
the following problem occured to me and I hope somebody can
help me :
I need to implement an encrypted File download with
a PHP script on the server side and a c# client application.
I know there is a way to symmetrically encrypt files
with the php mcrypt routines and already did implement a
protocol based on xml for querying files from the
server.
So the problem is, I need to generate and exchange a
random key for each transfer. This is possible,
for example, with the Diffie-Hellman Key Exchange
Procedure. Because I found nothing about this
procedure in the php function list, I began
to implement it myself.
The problem in this case is that I need arithmetic
support for Big Numbers (>=1024 Bits). The bc* functions
are too slow and do not work in this case. An alternative
would be the GMP Library, which is not supported by the
ISP where the script will be running.
Setting up my own Server with GMP support is no alternative either in
this case.
So perhaps anybody knows how I could achieve an encrypted
file download with different keys for every "Download Session" in
php. Is it possible over an ssl / https connection ? Or what am I
missing here ?
I would be very grateful for any hints, tips, sugesstions, points
to existing code...
Many thanks in advance,
Philipp
Comment