On 2014-02-07 08:37 , Dmitry Shachnev wrote: > Hi Clint, > > See http://docs.python.org/3/library/ctypes.html for description of > how ctypes works. As Python programs are interpreted, the only way to > access external shared libraries from Python code is by dlopen()ing > them. By looking at attic code, it only accesses libc (in xattr.py) > and libcrypto (in attic/crypto.py). > > Of course, this is not the best practice, a simplier solution will be > to use existing modules like python-xattr and python-crypto, or > writing a Python extension where you can use C code.
The original reasons why Attic doesn't use python-crypto and python-xattr is that they did not have any working python3 support at the time. Attic also uses PBKDF2 to passphrase-protect key files and that functionality has only recently been added to python-crypto. And even now it is 11 times slower than the libcrypto version which translates into Attic having to use 11 times fewer iterations which will make the passphrase 11 times easier to brute force. So I rather not use python-crypto until this improves. python-xattr seems to have improved a lot since I last looked at it so we might be able to switch to that if their Darwin and FreeBSD support works as intended. So if this indeed is a showstopper I'll look into replacing the ctypes-bits with python extensions or cffi. / Jonas
signature.asc
Description: OpenPGP digital signature