[Cryptography-dev] Fernet newbie question: suppling existing key for decoding
David Evans
djve60 at gmail.com
Sat Jan 3 00:13:13 CET 2015
I'm playing with the Fernet and AES encryption from cryptography. I've only
started with Python a few weeks ago and I'm not up on cryptography.
I'm trying to decrypt data that has been encoded with OpenSSL. I can decode
it with python 2.7 using Crypto.Cipher but I'm having problems getting
cryptography to do the same thing.
Q:
While
key *=* Fernet*.*generate_key()
will generate a new key is there a way to generate a valid key from an
existing passphrase?
openssl enc -base64
produces a key that is too small. Does this need to be padded with NULLs or
is there a command I'm missing?
I'd prefer documentation that will bring me up to speed on this area rather
than example code. The November thread on signatures and keys didn't
address my simplistic issue.
FYI:
I have tried using the lower level "Cipher(algorithms.AES(key),
modes.CBC(iv), backend=backend)" but my decryptor generates and error but
this due to my sending a str and not bytes.
Many thanks,
David
--
=========================
Your reason is treason. Kasabian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cryptography-dev/attachments/20150102/cf2826cd/attachment.html>
More information about the Cryptography-dev
mailing list