Python Forum
Python cryptography or pycrypto
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python cryptography or pycrypto
#1
I am torn between the two.
Which one should i use?

I will be creating an application that uses encryption.
It will encrypt any file... Mp3, videos, text, docs, etc...

I really don't know what to use since i am new to cryptography.
Reply
#2
You can start by going here and searching: https://pypi.python.org/pypi
There are over 97 thousand packages to choose from,
just search on encryption. That alone will bring up over 100 possibilities
Reply
#3
It depends on what do you attempt to do with the encrypted files. If you distribute them you'll need private/public key encryption. Called also asymmetric. If you want them just encrypted, "simple" password encryption will do the job. You have to chose the level of security you want. Most of the algorithms are compromised. Some of them deliberately. If want security, stay away from any RSA encryption regardless it is a standard now. Stay away from any DES, DSA algorithms. Almost deprecated recently. 

The obvious choice is ECC ( elliptic curve cryptography) 192, 256, 384, 521. ECC with 256 bits key is considered secure as DH, DSA, RSA with 3072 bits length key.
If you want a real encryption yet unbreakable, pay attention to One-time-pad. You are saying that the app will encrypt videos. If you use this encryption, you have to keep somewhere a big file random ( not all random generators are truly random ) data as a key. I think it is not practical for such a task.

See PyNacl module for encryption/decryption and bcrypt, passlib for hashing the passwords. You may see and GPG. There are several modules for this. GPG is useful because you can interact with other applications that are using PGP.

Don't forget to check what level of security you can use in legal. As I know there are restrictions in the USA, if you live there, for the encryption level used in the software.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#4
thank you very much for the reply.

what i am currently trying now is AES.

but since you said that ECC is the best choice, i will get on to that.
Reply
#5
Hm! There is a catch, though. NIST curves have a weakness. curve25519/ed25519 seems transparent and considered uncompromised yet. Perhaps Breinpool curves too
http://www.nytimes.com/2013/09/06/us/nsa...wanted=all

Do your research. I am not a crypto guy. I have an interest in it. My expertise has nothing with IT technologies. Cryptography involves a complex mathematic and I can't get it for now. This is why I prefer an OpenSource software. Other guys, actually experts, can look at it and see if there is something disturbing.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Difficulty installing Pycrypto KipCarter 4 12,009 Feb-10-2020, 07:54 PM
Last Post: snippsat
  [cryptography.io] How to convert DER signature to ECDSA fstefanov 1 3,029 Jul-04-2019, 08:59 AM
Last Post: fstefanov
  Cryptography in Python NLittle17 6 4,270 Jan-13-2019, 07:11 PM
Last Post: NLittle17
  cryptography help jorrdn 3 3,125 Mar-10-2018, 02:29 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020