Skip to content

Commit 6472426

Browse files
committed
v0.9.0
1 parent ec49956 commit 6472426

File tree

5 files changed

+75
-18
lines changed

5 files changed

+75
-18
lines changed

CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,60 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## 0.9.0 (2023-04-27)
8+
### Added
9+
- Function to get salt length from RSA PSS keys ([#277])
10+
- `AssociatedAlgorithmIdentifier` implementation ([#278])
11+
- Random key generation for `pss::BlindedSigningKey` ([#295])
12+
- Impl `Signer` for `pss::SigningKey` ([#297])
13+
- Impl `core::hash::Hash` for `RsaPrivateKey` ([#308])
14+
- Impl `ZeroizeOnDrop` for `RsaPrivateKey`, `SigningKey`, `DecryptingKey` ([#311])
15+
- `u64_digit` feature; on-by-default ([#313])
16+
- `AsRef<RsaPublicKey>` impl on `RsaPrivateKey` ([#317])
17+
18+
### Changed
19+
- Use namespaced features for `serde` ([#268])
20+
- Bump `pkcs1` to v0.7, `pkcs8` to v0.10; MSRV 1.65 ([#270])
21+
- Rename PKCS#1v1.5 `*_with_prefix` methods ([#290])
22+
- `SigningKey::new` => `SigningKey::new_unprefixed`
23+
- `SigningKey::new_with_prefix` => `SigningKey::new`
24+
- `VerifyingKey::new` => `VerifyingKey::new_unprefixed`
25+
- `VerifyingKey::new_with_prefix` => `VerifyingKey::new`
26+
- Rename `Pkcs1v15Sign::new_raw` to `Pkcs1v15Sign::new_unprefixed` ([#293])
27+
- Use digest output size as default PSS salt length ([#294])
28+
- Specify `salt_len` when verifying PSS signatures ([#294])
29+
- Ensure signatures have the expected length and don't overflow the modulus ([#306])
30+
- Improved public key checks ([#307])
31+
- Rename `CRTValue` => `CrtValue` ([#314])
32+
- Traits under `padding` module now located under `traits` module ([#315])
33+
- `PublicKeyParts`/`PrivateKeyParts` now located under `traits` module ([#315])
34+
35+
### Removed
36+
- "Unsalted" PSS support ([#294])
37+
- `EncryptionPrimitive`/`DecriptionPrimitive` traits ([#300])
38+
- `PublicKey`/`PrivateKey` traits ([#300])
39+
- `Zeroize` impl on `RsaPrivateKey`; automatically zeroized on drop ([#311])
40+
- `Deref<Target=RsaPublicKey>` impl on `RsaPrivateKey`; use `AsRef` instead ([#317])
41+
42+
[#268]: https://github.com/RustCrypto/RSA/pull/268
43+
[#270]: https://github.com/RustCrypto/RSA/pull/270
44+
[#277]: https://github.com/RustCrypto/RSA/pull/277
45+
[#278]: https://github.com/RustCrypto/RSA/pull/278
46+
[#290]: https://github.com/RustCrypto/RSA/pull/290
47+
[#293]: https://github.com/RustCrypto/RSA/pull/293
48+
[#294]: https://github.com/RustCrypto/RSA/pull/294
49+
[#295]: https://github.com/RustCrypto/RSA/pull/295
50+
[#297]: https://github.com/RustCrypto/RSA/pull/297
51+
[#300]: https://github.com/RustCrypto/RSA/pull/300
52+
[#306]: https://github.com/RustCrypto/RSA/pull/306
53+
[#307]: https://github.com/RustCrypto/RSA/pull/307
54+
[#308]: https://github.com/RustCrypto/RSA/pull/308
55+
[#311]: https://github.com/RustCrypto/RSA/pull/311
56+
[#313]: https://github.com/RustCrypto/RSA/pull/313
57+
[#314]: https://github.com/RustCrypto/RSA/pull/314
58+
[#315]: https://github.com/RustCrypto/RSA/pull/315
59+
[#317]: https://github.com/RustCrypto/RSA/pull/317
60+
761
## 0.8.2 (2023-03-01)
862
### Added
963
- Encryption-related traits ([#259])

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rsa"
3-
version = "0.9.0-rc.0"
3+
version = "0.9.0"
44
authors = ["RustCrypto Developers", "dignifiedquire <[email protected]>"]
55
edition = "2021"
66
description = "Pure Rust RSA implementation"

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ There will be three phases before `1.0` 🚢 can be released.
7070
This crate has received one [security audit by Include Security][audit], with
7171
only one minor finding which has since been addressed.
7272
73+
See the [open security issues] on our issue tracker for other known problems.
74+
7375
## Minimum Supported Rust Version (MSRV)
7476
7577
All crates in this repository support Rust 1.65 or higher.
@@ -109,3 +111,4 @@ dual licensed as above, without any additional terms or conditions.
109111
110112
[RustCrypto]: https://github.com/RustCrypto/
111113
[audit]: https://www.opentech.fund/results/security-safety-audits/deltachat/
114+
[open security issues]: https://github.com/RustCrypto/RSA/issues?q=is%3Aissue+is%3Aopen+label%3Asecurity

src/lib.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo_small.png")]
55
#![warn(missing_docs)]
66

7-
//! RSA Implementation in pure Rust.
7+
//! # Supported algorithms
88
//!
9-
//! It supports several schemes described in [RFC8017]:
9+
//! This crate supports several schemes described in [RFC8017]:
1010
//!
11-
//! - OAEP encryption scheme
12-
//! - PKCS#1 v1.5 encryption scheme
13-
//! - PKCS#1 v1.5 signature scheme
14-
//! - PSS signature scheme
11+
//! - [OAEP encryption scheme](#oaep-encryption)
12+
//! - [PKCS#1 v1.5 encryption scheme](#pkcs1-v15-encryption)
13+
//! - [PKCS#1 v1.5 signature scheme](#pkcs1-v15-signatures)
14+
//! - [PSS signature scheme](#pss-signatures)
1515
//!
1616
//! These schemes are described below.
1717
//!
1818
//! # Usage
1919
//!
20-
//! ## PKCS#1 v1.5 encryption
20+
//! ## OAEP encryption
2121
//! ```
22-
//! use rsa::{RsaPrivateKey, RsaPublicKey, Pkcs1v15Encrypt};
22+
//! use rsa::{RsaPrivateKey, RsaPublicKey, Oaep};
2323
//!
2424
//! let mut rng = rand::thread_rng();
2525
//!
@@ -29,17 +29,19 @@
2929
//!
3030
//! // Encrypt
3131
//! let data = b"hello world";
32-
//! let enc_data = public_key.encrypt(&mut rng, Pkcs1v15Encrypt, &data[..]).expect("failed to encrypt");
32+
//! let padding = Oaep::new::<sha2::Sha256>();
33+
//! let enc_data = public_key.encrypt(&mut rng, padding, &data[..]).expect("failed to encrypt");
3334
//! assert_ne!(&data[..], &enc_data[..]);
3435
//!
3536
//! // Decrypt
36-
//! let dec_data = private_key.decrypt(Pkcs1v15Encrypt, &enc_data).expect("failed to decrypt");
37+
//! let padding = Oaep::new::<sha2::Sha256>();
38+
//! let dec_data = private_key.decrypt(padding, &enc_data).expect("failed to decrypt");
3739
//! assert_eq!(&data[..], &dec_data[..]);
3840
//! ```
3941
//!
40-
//! ## OAEP encryption
42+
//! ## PKCS#1 v1.5 encryption
4143
//! ```
42-
//! use rsa::{RsaPrivateKey, RsaPublicKey, Oaep};
44+
//! use rsa::{RsaPrivateKey, RsaPublicKey, Pkcs1v15Encrypt};
4345
//!
4446
//! let mut rng = rand::thread_rng();
4547
//!
@@ -49,13 +51,11 @@
4951
//!
5052
//! // Encrypt
5153
//! let data = b"hello world";
52-
//! let padding = Oaep::new::<sha2::Sha256>();
53-
//! let enc_data = public_key.encrypt(&mut rng, padding, &data[..]).expect("failed to encrypt");
54+
//! let enc_data = public_key.encrypt(&mut rng, Pkcs1v15Encrypt, &data[..]).expect("failed to encrypt");
5455
//! assert_ne!(&data[..], &enc_data[..]);
5556
//!
5657
//! // Decrypt
57-
//! let padding = Oaep::new::<sha2::Sha256>();
58-
//! let dec_data = private_key.decrypt(padding, &enc_data).expect("failed to decrypt");
58+
//! let dec_data = private_key.decrypt(Pkcs1v15Encrypt, &enc_data).expect("failed to decrypt");
5959
//! assert_eq!(&data[..], &dec_data[..]);
6060
//! ```
6161
//!

0 commit comments

Comments
 (0)