Comments (10)
First hard API design question:
RSAPrivateKey
objects have a public_key
method which returns an RSAPublicKey
. Presumably we'd like to have the same on DSAPrivateKey
. Unfortunately DSA keys contain a member (y
) which is also typically known by public_key
.
It seems we have three choices:
- Be inconsistent with typical naming conventions around DSA
- Be inconsistent with the RSA API
- Change the RSA API as well
Opinions?
from cryptography.
What APIs call only the bare y
a public key?
Seems like public_key
should return a DSAPublicKey
and that y
parameter should just be y
to me.
from cryptography.
It'd be nice to store the DSA params as an object, which then makes DSAPublicKey
a more useful object.
private_key = dsa.DSAPrivateKey.generate(2048, backend)
params = private_key.params()
public_key = private_key.public_key()
same_params = public_key.params()
print(params.p)
print(same_params.p)
from cryptography.
@reaperhulk agreed.
from cryptography.
@public We've typically tried to offer the more verbose name whenever possible here, PyCrypto's docs describe y
as Public key (y)
, I haven't seen any other reference on this.
from cryptography.
@alex I think the to-do list needs to be updated?
from cryptography.
I've updated the list.
from cryptography.
@reaperhulk Awesome, thanks :)
from cryptography.
I guess we're done here.
from cryptography.
High fives all round.
from cryptography.
Related Issues (20)
- KBKDFCMAC produces unexpected results when `llen=0` HOT 3
- Please enhance the error message when loading the wrong kind of PEM file
- FreeBSD bug exposes potential logic issue with fips support check HOT 6
- RFC5280 Extension `PrivateKeyUsagePeriod` detected as `UnrecognizedExtension` HOT 8
- Wheel for Windows on arm64 HOT 3
- tag-mismatch (HWAsan) on build from source HOT 7
- UnexpectedTag Error while loading pem certificate using cryptography HOT 6
- Question: where are the `load_pem_private_key` error messages defined? HOT 2
- `tests/hazmat/primitives/test_pkcs7.py::TestPKCS7SignatureBuilder::test_sign_byteslike` crashes: unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX` HOT 4
- Add rust debug build to CI
- ImportError: DLL load failed while importing _rust: The specified procedure could not be found. HOT 8
- Is there a Wheel for Python 3.11 ? I could not find it in the website ! HOT 1
- -DOPENSSL_NO_ENGINE=1 still fails with #include <openssl/engine.h> HOT 2
- "is" test of exceptions._Reasons value not working in Fedora Rawhide HOT 6
- Probably found an error in docs HOT 2
- Support for UUID OIDs in X509v3 extensions HOT 8
- AWS lambda deployment Errors while importing cryptography. HOT 3
- Docker Build on ARMv7 python 3.13: _cffi_backend.cpython-313-arm-linux-musleabihf.so: _PyErr_WriteUnraisableMsg: symbol not found; Cryptography-Cffi/build.rs:39:9 ; Error: Failed to Run Custom Build Command for Cryptography-Cffi v0.1.0 (/Tmp/Pip-Install[...]/Cryptography[...]/Src/Rust/Cryptography-Cffi) and Build-Script-Build Exit Status 101 HOT 4
- Certificate chain validation always fails with "required EKU not found" error HOT 3
- Unable to build cryptography 43.0.0 on alpine due to toml parse error HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cryptography.