Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial commit. Migrates over basic project files, and the OpenSSL bindings #1

Merged
merged 15 commits into from Aug 7, 2013

Conversation

alex
Copy link
Member

@alex alex commented Aug 7, 2013

No description provided.

@dstufft
Copy link
Member

dstufft commented Aug 7, 2013

I've been meaning to bring this up on the mailing list, but I'd really like for the fact that we are using OpenSSL as the backing library to be an implementation detail (and thus the c bindings be private api) with a low level wrapper around them.

What that means, if that is agreed upon, is that it probably makes sense for the C API to be called cryptography._c or something like that?

@alex
Copy link
Member Author

alex commented Aug 7, 2013

I hate naming modules with an underscore prefix. I think not documenting c should be enough. I agree that OpenSSL is an implementationd etail.

@dstufft
Copy link
Member

dstufft commented Aug 7, 2013

Sounds reasonable enough, we should probably at least include the fact it's a private API in the docstring for c so that if someone is introspecting around they see that.

@alex
Copy link
Member Author

alex commented Aug 7, 2013

Sounds good, maybe include a note in teh docs as well. Seems orthagonal to this PR though?

@hynek
Copy link
Contributor

hynek commented Aug 7, 2013

I have two naive questions:

  1. What’s the deal with commented out entries like +# 'BIO_METHOD *BIO_f_zlib(void);', or +# 'const EVP_CIPHER *EVP_rc5_32_12_16_ecb(void);', and following?
  2. What is the code in this initial state supposed to be able to do and how can we ensure it does? At least some smoke test maybe (in the very least, that the docs compile successfully and all modules are importable) and put it into Travis?

Additionally, cryptography lacks an __init__.py.

@lvh
Copy link
Member

lvh commented Aug 7, 2013

@alex @dstufft Agreed, orthogonal. I'll propose a CONTRIBUTING file, which is a standard Github accepts.

@exarkun
Copy link
Member

exarkun commented Aug 7, 2013

I've been meaning to bring this up on the mailing list, but I'd really like for the fact that we are using OpenSSL as the backing library to be an implementation detail (and thus the c bindings be private api) with a low level wrapper around them.

What that means, if that is agreed upon, is that it probably makes sense for the C API to be called cryptography._c or something like that?

As I mentioned on the mailing list, my interest in this project is as a replacement for the C code in pyOpenSSL. If this project isn't going to give me bindings to the OpenSSL C API, then I'll probably excuse myself from contributing. I am far too overcommitted already, and this project was supposed to save me work, not create a whole new world of it.

@alex
Copy link
Member Author

alex commented Aug 7, 2013

@hynek Addressed the commented out code. I apparently failed to add the .travis.yml, I'll add a new PR for it.

@alex alex mentioned this pull request Aug 7, 2013
@alex
Copy link
Member Author

alex commented Aug 7, 2013

I've significantly streamlined this patch, it's now only some scaffolding, I removed all the C headers, we should add those back as needed.


setup(
name="cryptography",
license="Apache License, Verison 2.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still saying “Verison” instead of “Version”

@hynek
Copy link
Contributor

hynek commented Aug 7, 2013

Could you still please add some kind of test that shows that the code does what it should? Working imports on all Python versions would be a start. That would have also caught the missing __init__.py.

@alex
Copy link
Member Author

alex commented Aug 7, 2013

Ok, even less now, we can add back pieces with tests.

@hynek
Copy link
Contributor

hynek commented Aug 7, 2013

:shipit:

Time to write some code.

public added a commit to public/cryptography that referenced this pull request Feb 5, 2014
public added a commit to public/cryptography that referenced this pull request Feb 5, 2014
These are implemented such that they don't depend on the backend. This
means we don't have to worry about passing an RSA key created with one
backend to a different one so much at the expense of having to create a
backend specific context on demand.

This is slightly non-trivial in (at least) OpenSSL as there are 3
additional derived parameters kept in its RSA struct. They aren't
difficult to generate but it requires adding 30-40 lines of BN_* stuff
to the backend so I'm leaving that out for now. We'll need to implement
that before we can actually do any useful operations with the keys.

This also adds a loader for some of the PKCS pyca#1 test vectors. It only
extracts the 10 key pairs from pss_vect.txt currently be should be
extenable to include the example signatures and other files later.
public added a commit to public/cryptography that referenced this pull request Feb 5, 2014
reaperhulk added a commit that referenced this pull request Feb 5, 2014
public added a commit to public/cryptography that referenced this pull request Feb 5, 2014
These are implemented such that they don't depend on the backend. This
means we don't have to worry about passing an RSA key created with one
backend to a different one so much at the expense of having to create a
backend specific context on demand.

This is slightly non-trivial in (at least) OpenSSL as there are 3
additional derived parameters kept in its RSA struct. They aren't
difficult to generate but it requires adding 30-40 lines of BN_* stuff
to the backend so I'm leaving that out for now. We'll need to implement
that before we can actually do any useful operations with the keys.

This also adds a loader for some of the PKCS pyca#1 test vectors. It only
extracts the 10 key pairs from pss_vect.txt currently be should be
extenable to include the example signatures and other files later.
reaperhulk added a commit that referenced this pull request Feb 6, 2014
* master:
  PKCS #1 RSA test vector loader
  Removed pointless anchor
  Docs need virtualenv as well
  Everything about bash is the worst
  Some reST markup nonsense
  Fix for OS X
  More clearly describe the behavior of constant_time.bytes_eq
  Run the doc tests under OS X
  Made OpenSSL's derive_pbkdf2_hmac raise the right exception
  Document which backends implement which itnerfaces. Fixes #538
  pep8
  Fixed a typo in the docs
  Make the default backend be a multi-backend

Conflicts:
	tests/hazmat/backends/test_openssl.py
This was referenced Feb 7, 2014
@public public mentioned this pull request Apr 28, 2014
reaperhulk added a commit that referenced this pull request Sep 17, 2014
Bug #1: Call to AAD but no call to update. Get null tag bytes.
Bug #2: Call to update without call to AAD. Get null ciphertext bytes.

Fixes #1329
reaperhulk pushed a commit that referenced this pull request Aug 28, 2015
Adds SSL_renegotiate binding
reaperhulk pushed a commit that referenced this pull request Dec 20, 2015
joerichter-stash pushed a commit to kiwigrid/cryptography that referenced this pull request Nov 15, 2017
intgr added a commit to intgr/cryptography that referenced this pull request Jun 21, 2018
In 2005, IETF devised a more secure padding scheme to replace PKCS pyca#1
v1.5. To make sure that nobody can properly support or use it, they
mandated lots of complicated parameters in the certificate, unlike any
other X.509 signature scheme.

https://tools.ietf.org/html/rfc4056

`_SIG_OIDS_TO_HASH` and `Certificate.signature_hash_algorithm` cannot be
supported as-is, because the hash algorithm is defined in the signature
algorithm parameters, not by the OID itself.
intgr added a commit to intgr/cryptography that referenced this pull request Jun 21, 2018
In 2005, IETF devised a more secure padding scheme to replace PKCS pyca#1
v1.5. To make sure that nobody can easily support or use it, they
mandated lots of complicated parameters in the certificate, unlike any
other X.509 signature scheme.

https://tools.ietf.org/html/rfc4056

`_SIG_OIDS_TO_HASH` and `Certificate.signature_hash_algorithm` cannot be
supported as-is, because the hash algorithm is defined in the signature
algorithm parameters, not by the OID itself.
intgr added a commit to intgr/cryptography that referenced this pull request Jun 26, 2018
In 2005, IETF devised a more secure padding scheme to replace PKCS pyca#1
v1.5. To make sure that nobody can easily support or use it, they
mandated lots of complicated parameters in the certificate, unlike any
other X.509 signature scheme.

https://tools.ietf.org/html/rfc4055

`_SIG_OIDS_TO_HASH` and `Certificate.signature_hash_algorithm` cannot be
supported as-is, because the hash algorithm is defined in the signature
algorithm parameters, not by the OID itself.
reaperhulk pushed a commit that referenced this pull request Jun 29, 2018
In 2005, IETF devised a more secure padding scheme to replace PKCS #1
v1.5. To make sure that nobody can easily support or use it, they
mandated lots of complicated parameters in the certificate, unlike any
other X.509 signature scheme.

https://tools.ietf.org/html/rfc4055

`_SIG_OIDS_TO_HASH` and `Certificate.signature_hash_algorithm` cannot be
supported as-is, because the hash algorithm is defined in the signature
algorithm parameters, not by the OID itself.
amauryfa pushed a commit to amauryfa/cryptography that referenced this pull request Jul 22, 2018
In 2005, IETF devised a more secure padding scheme to replace PKCS pyca#1
v1.5. To make sure that nobody can easily support or use it, they
mandated lots of complicated parameters in the certificate, unlike any
other X.509 signature scheme.

https://tools.ietf.org/html/rfc4055

`_SIG_OIDS_TO_HASH` and `Certificate.signature_hash_algorithm` cannot be
supported as-is, because the hash algorithm is defined in the signature
algorithm parameters, not by the OID itself.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants