Secure File Transfer

G

Glauco

hi to all,
i'm planning to make a way to transfer file with python.
I would like to make the transfer using some crypto api,
to make the channel secure.
i don't want to write a wrapper to ftp or to scp i just
want to make a new protocol, for a little application.

i took a quick look to some cryptographic modules available
in python (expecially pycrypto, gnupginterface, m2crypto)
and i'm now stuck on which one of these to choose.

Here's what i have in my mind: Alice wants to upload/download
some files from Bob.
Both of them have the public key (made with gpg), so in the
handshaking for the shared key is done using gpg.

After that the shared key is know to both the end of the channel
and they can use it to send the data.

i don't know what protocol (AES 3DES Blowfish? ) to use for the
transfer and i don't know if it could be better to implement
it directly with DSA/RSA rather than using GPG + somesymmetricprotocol

any suggestion hints example ?
Someone tried something like that ?

i'm using SocketServer for the network stuff so i would like to find
something wich can better suit with it


Many thanks for all the suggestion you can give me .


Samuele
 
L

Lucas Raab

Glauco said:
hi to all,
i'm planning to make a way to transfer file with python.
I would like to make the transfer using some crypto api,
to make the channel secure.
i don't want to write a wrapper to ftp or to scp i just
want to make a new protocol, for a little application.

i took a quick look to some cryptographic modules available
in python (expecially pycrypto, gnupginterface, m2crypto)
and i'm now stuck on which one of these to choose.

Here's what i have in my mind: Alice wants to upload/download
some files from Bob.
Both of them have the public key (made with gpg), so in the
handshaking for the shared key is done using gpg.

After that the shared key is know to both the end of the channel
and they can use it to send the data.

i don't know what protocol (AES 3DES Blowfish? ) to use for the
transfer and i don't know if it could be better to implement
it directly with DSA/RSA rather than using GPG + somesymmetricprotocol

any suggestion hints example ?
Someone tried something like that ?

i'm using SocketServer for the network stuff so i would like to find
something wich can better suit with it


Many thanks for all the suggestion you can give me .


Samuele

You could try PyOpenSSL for encryption over networks or the internet. See
http://pyopenssl.sourceforge.net/.
 
L

Lonnie Princehouse

Check out twisted.conch (www.twistedmatrix.com)

Even if you're determined to reinvent a wheel (I understand, it's fun
sometimes), you might find twisted more useful than SocketServer.
 
N

Ng Pheng Siong

According to Lonnie Princehouse said:
Check out twisted.conch (www.twistedmatrix.com)

Even if you're determined to reinvent a wheel (I understand, it's fun
sometimes), you might find twisted more useful than SocketServer.

I suggest OP to write an FTP/TLS client and server for Twisted. Afterwards
we can compare that with my asyncore-based ones that is bundled with
M2Crypto.

I've been meaning to do this myself in my copious spare time.
 
S

Samuele Giovanni Tonon

hi,
glauco forwarded the message to the newsgroup due to some problem
to my network access, but now it seems i'm able, so i'm replying by
myself :).

Check out twisted.conch (www.twistedmatrix.com)
ops i almost forgot it, thanks !
Even if you're determined to reinvent a wheel (I understand, it's fun
sometimes), you might find twisted more useful than SocketServer.
Well i'd like to reinvent the wheel for these reasons:

- i'd like to better understand all the cryptographic protocol
and which one best fit on python and for my application

- i have some kind of fear and loathing againts SSL (mostly because
of openssl command line) and i think it has too much feature for
me ( i only need some cryptography based on "ring of trust" rather
than CA )


Basycally the program i'd like to make is a secure file transfer, but it
implements also the server, i'd like to make something easy to use , secure,
to make available for people on different O.S. on untrusted network to
exchange data (with resume support).
In this way i'd like to think to something which best fit my requirements
(fast handshaking, without user authentication, based on the trust
that someone has of the public key of the connecting host) .
I have some knowledge of cryptographic protocol, however i'd like to know
which one you would suggest me to use (and from what modules) .

Regards
Samuele
 
M

Matteo Dell'Amico

Samuele said:
Well i'd like to reinvent the wheel for these reasons:

- i'd like to better understand all the cryptographic protocol
and which one best fit on python and for my application

If you reinvent the wheel for didactical reasons, that's ok. But I
wouldn't trust that application for real use: a well-known application
is so much more tested...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top