[Cryptography-dev] PyCA cryptography 43.0.3 released

2024-10-18 Thread Alex Gaynor via Cryptography-dev
PyCA cryptography 43.0.3 has been released to PyPI. cryptography includes both high level recipes and low level interfaces to common cryptographic algorithms such as symmetric ciphers, asymmetric algorithms, message digests, X.509, key derivation functions, and much more. We support Python 3.7+, an

Re: [Cryptography-dev] [python-crypto] Is this list still active?

2024-11-02 Thread Alex Gaynor via Cryptography-dev
I don't know what the python-crypto list is for, but I'd guess it's either for PyCrypto or a general interest python crypto list. cryptography-dev is specifically for the PyCA family or libraries. Alex On Sat, Nov 2, 2024, 1:34 PM Matěj Cepl wrote: > On Wed Apr 3, 2024 at 2:41 PM CEST, Ralf Hi

[Cryptography-dev] PyCA cryptography 44.0.1 released

2025-02-11 Thread Alex Gaynor via Cryptography-dev
PyCA cryptography 44.0.1 has been released to PyPI. cryptography includes both high level recipes and low level interfaces to common cryptographic algorithms such as symmetric ciphers, asymmetric algorithms, message digests, X.509, key derivation functions, and much more. We support Python 3.7+, an

Re: [Cryptography-dev] KDF Question

2025-01-11 Thread Alex Gaynor via Cryptography-dev
In general, using the output of a KDF as the key for symmetric encryption is fine. Alex On Fri, Jan 10, 2025 at 5:01 PM Sriram R via Cryptography-dev wrote: > > Hello, > > I'm generating a key using Scrypt from a password supplied by the user. I > then use this key as follows. This works but my

Re: [Cryptography-dev] KDF Question

2025-01-11 Thread Alex Gaynor via Cryptography-dev
Scrypt salts can safely be stored with derived hashes in plaintext. Alex On Sat, Jan 11, 2025 at 10:02 AM Sriram R wrote: > > Last question, does the salt data need to be encrypted when storing or is it > not sensitive information? > > > On Sat, Jan 11, 2025, 6:22 AM Alex Gaynor wrote: >> >> I

Re: [Cryptography-dev] KDF Question

2025-01-12 Thread Alex Gaynor via Cryptography-dev
There's a request for KMAC, https://github.com/pyca/cryptography/issues/12141. Thus far no work has happened on it. If you're interested in contributing, we're happy to review a PR. Alex On Sun, Jan 12, 2025 at 12:02 PM Sriram R via Cryptography-dev wrote: > > Robert, > > Appreciate the links to

Re: [Cryptography-dev] AESGCMSIV

2025-01-04 Thread Alex Gaynor via Cryptography-dev
It's impossible to say without seeing your code. If encrypt()/decrypt() isn't working, then some of your parameters don't match between them. Alex On Sat, Jan 4, 2025 at 4:11 PM Sriram R wrote: > > Also, I'm saving and reading the ct and the nonce values in binary mode > during encryption and d

Re: [Cryptography-dev] AESGCMSIV

2025-01-04 Thread Alex Gaynor via Cryptography-dev
Based on "it creates a new key from the password and is used for decryption" it sounds like you're using different keys for encryption and decryption. You need to use the same key to decrypt a value as you used to encrypt it -- this is the point of symmetric encryption! It wouldn't make much sense

Re: [Cryptography-dev] AESGCMSIV

2025-01-04 Thread Alex Gaynor via Cryptography-dev
It's correct that nonces do not need to be secret. Alex On Sat, Jan 4, 2025 at 5:56 PM Sriram R wrote: > > Alex, > > Found the flaw in the code logic, it had to do with the location of the nonce > file. I was storing the nonce file in the same directory that was getting > encrypted/decrypted.

[Cryptography-dev] PyCA cryptography 44.0.3 released

2025-05-02 Thread Alex Gaynor via Cryptography-dev
PyCA cryptography 44.0.3 has been released to PyPI. cryptography includes both high level recipes and low level interfaces to common cryptographic algorithms such as symmetric ciphers, asymmetric algorithms, message digests, X.509, key derivation functions, and much more. We support Python 3.7+, an

[Cryptography-dev] PyCA cryptography 44.0.2 released

2025-03-01 Thread Alex Gaynor via Cryptography-dev
PyCA cryptography 44.0.2 has been released to PyPI. cryptography includes both high level recipes and low level interfaces to common cryptographic algorithms such as symmetric ciphers, asymmetric algorithms, message digests, X.509, key derivation functions, and much more. We support Python 3.7+, an

Re: [Cryptography-dev] compatibility between python cryptography and openssl for DSA signature

2025-03-11 Thread Alex Gaynor via Cryptography-dev
Unfortunately I'm unable to reproduce. The signature you provided verifies fine with that private key. /tmp ❯❯❯ openssl dgst -verify dsa.key -signature test.sig test.txt Verified OK /tmp ❯❯❯ cat dsa.key -BEGIN PUBLIC KEY- MIIBtjCCASsGByqGSM44BAEwggEeAoGBAJeeE6sU5RBpDfNHj9J9abda8TYkBZNB tnW

Re: [Cryptography-dev] setting value of x509.SubjectKeyIdentifier other than digest

2025-03-13 Thread Alex Gaynor via Cryptography-dev
You can pass any bytes value to the constructor: https://cryptography.io/en/latest/x509/reference/#cryptography.x509.SubjectKeyIdentifier (Sphinx doesn't highlight it, but you can see the constructor's signature `SubjectKeyIdentifier(digest)`). Alex On Thu, Mar 13, 2025 at 5:32 PM Robert Moskowit

Re: [Cryptography-dev] setting value of x509.SubjectKeyIdentifier other than digest

2025-03-13 Thread Alex Gaynor via Cryptography-dev
I just want its value in > SubjectKeyIdentifier > > I tried, after rereading that web page doc: > > ski = x509.SubjectKeyIdentifier(key_identifier=detb) > > But that threw an error > > > On 3/13/25 5:34 PM, Alex Gaynor via Cryptography-dev wrote: > > You

Re: [Cryptography-dev] setting value of x509.SubjectKeyIdentifier other than digest

2025-03-13 Thread Alex Gaynor via Cryptography-dev
> >> > >> print(type(detb), detb) > >> ski = x509.SubjectKeyIdentifier(detb) > >> print(type(ski), ski) > >> > >> b'2001003ffe3ff805f64b0a656aaee568' > >> > >> > >> > >> I don't WANT detb to be digested

Re: [Cryptography-dev] setting value of x509.SubjectKeyIdentifier other than digest

2025-03-13 Thread Alex Gaynor via Cryptography-dev
>>> > >>> Alex > >>> > >>> On Thu, Mar 13, 2025 at 5:53 PM Robert Moskowitz > >>> wrote: > >>>> I can't see to defeat it digesting the argument: > >>>> > >>>> print(type(detb), detb) >

[Cryptography-dev] PyCA cryptography 45.0.2 released

2025-05-17 Thread Alex Gaynor via Cryptography-dev
PyCA cryptography 45.0.2 has been released to PyPI. cryptography includes both high level recipes and low level interfaces to common cryptographic algorithms such as symmetric ciphers, asymmetric algorithms, message digests, X.509, key derivation functions, and much more. We support Python 3.7+, an

[Cryptography-dev] PyCA cryptography 45.0.3 released

2025-05-25 Thread Alex Gaynor via Cryptography-dev
PyCA cryptography 45.0.3 has been released to PyPI. cryptography includes both high level recipes and low level interfaces to common cryptographic algorithms such as symmetric ciphers, asymmetric algorithms, message digests, X.509, key derivation functions, and much more. We support Python 3.7+, an