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

README changes for 2.0 #275

Merged
merged 14 commits into from
Feb 2, 2023
Merged

Conversation

rozbb
Copy link
Contributor

@rozbb rozbb commented Jan 27, 2023

Rendered

Other changes:

  • Feature-gated Context and with_context behind digest. No reason to have those if you can't use them.
  • Bumped the version number to 2.0.0-pre.0
  • Added a CONTRIBUTING.md and updated authors list in Cargo.toml

@rozbb rozbb changed the base branch from main to release/2.0 January 27, 2023 09:02
README.md Outdated
| `digest` | | Enables `Context`, `SigningKey::{with_context, sign_prehashed}` and `VerifyingKey::{with_context, verify_prehashed, verify_prehashed_strict}` for Ed25519ph prehashed signatures |
| `asm` | | Enables assembly optimizations in the SHA-512 compression functions |
| `pkcs8` | | Enables [PKCS#8](https://en.wikipedia.org/wiki/PKCS_8) serialization/deserialization for `SigningKey` and `VerifyingKey` |
| `pem` | | TODO |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tarcieri can you fill this and pkcs8 out? I'm pretty confused actually. How is pem different from PKCS#8? Isn't PEM a container format within the PKCS#8 spec? What does it contain? What are the other things in PKCS#8?

Copy link
Contributor

@pinkforest pinkforest Jan 27, 2023

Choose a reason for hiding this comment

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

TL;DR PEM is additive "text formatting" feature over PKCS#8 because 7bit US-ASCII "convenience" 🤷‍♀️

PEM = "Enable text PEM formatting over PKCS#8" and
PKCS8 = "Enable PKCS#8 DER Binary encoding"

Long version:

PEM "Privacy Enchanced Email" (yes confusing) is a text file format .. like Base64 wrapping/formatting of binary X.509 certificates e.g. PEM is the --BEGIN ASCII blocks that simply contain the Base64 formatting of the PKCS#8 but it also carries things like X.509 certificates and other binary data thus PEM is it's own thing.
The origin was from the early internet as e-mail in it's 7bit form wasn't really designed to carry binary data and it was encoded and wrapped (the --BEGIN block) in as Base64 text formatting that allowed itself to be carried in 7bit SMTP - https://en.wikipedia.org/wiki/Base64 - which still ends up in text files.
PEM is optional but often used thus included esp when writing files that contain data such as PKCS#8
PKCS#8 in turn is the binary encoded container under it which may contain passphrase etc - it's just ASN.1/DER
PKCS#8 ASN.1 schema is here - https://datatracker.ietf.org/doc/html/rfc5208#page-5
Today we can still think - why are we still using Base64 given the large overhead it causes like in e-mail attachments a'la MIME Multipart is anyone's guess ? 🤷‍♀️

README.md Outdated

Since `verify_batch()` is intended to be high-throughput, we think it's best not to put weak key checks in it. If you want to prevent weird behavior due to weak public keys in your batches,
TODO
you should call `VerifyingKey::is_weak` on the inputs in advance.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tarcieri I think this would be a good mitigation to have. Shall we merge something like #188? I don't think we need the torsion check though

@rozbb rozbb requested a review from tarcieri January 27, 2023 09:06
@rozbb
Copy link
Contributor Author

rozbb commented Jan 27, 2023

These are most of the changes I wanted to make to the README. I might add some tweaks here and there tho

README.md Outdated
@@ -71,9 +75,11 @@ Below are the specific policies:
| :--- | :--- | :--- |
| 2.x | Dependencies `digest`, `pkcs8` and `rand_core` | Minor SemVer bump |

TODO @tarcieri what about PEM?
Copy link
Contributor

Choose a reason for hiding this comment

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

We only lists the crates / dependencies but not features as such here -

pem as a feature comes via pkcs8 (unstable) crate via optional feature of ed25519 which itself is stable on all-default-on -

Since it's not a crate or dependency itself unlike pkcs8 - theoretically we don't need to mention pem here, just pkcs8 given it's optional dependency of ed25519 thus exempted.

Given anyone who is using pem will inherently use pkcs8 I don't see much problem not mentioning pem here ?

README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@rozbb rozbb marked this pull request as ready for review January 28, 2023 23:58
@rozbb rozbb mentioned this pull request Jan 28, 2023
README.md Outdated Show resolved Hide resolved
rozbb and others added 2 commits January 28, 2023 19:07
Co-authored-by: pinkforest(she/her) <[email protected]>
@rozbb rozbb mentioned this pull request Jan 29, 2023
README.md Outdated Show resolved Hide resolved
@rozbb rozbb merged commit 783b6e8 into dalek-cryptography:release/2.0 Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants