Skip to content

Commit

Permalink
Merge pull request #225 from str4d/release-0.6.0
Browse files Browse the repository at this point in the history
Release 0.6.0
  • Loading branch information
str4d authored May 2, 2021
2 parents 083284e + e2a8cc2 commit 3e3e6a8
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 37 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 10 additions & 8 deletions age-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to Rust's notion of
to 1.0.0 are beta releases.

## [Unreleased]

## [0.6.0] - 2021-05-02
### Security
- `age_core::primitives::aead_decrypt` now takes a `size` argument, checked
against the plaintext length. This is to mitigate multi-key attacks, where a
ciphertext can be crafted that decrypts successfully under multiple keys.
Short ciphertexts can only target two keys, which has limited impact. See
[this commit message](https://github.com/FiloSottile/age/commit/2194f6962c8bb3bca8a55f313d5b9302596b593b)
for more details.

### Added
- `age_core::format::FILE_KEY_BYTES` constant.
- `age_core::plugin` module, which contains common backend logic used by both
Expand All @@ -23,14 +33,6 @@ to 1.0.0 are beta releases.
API `age_core::format::read::legacy_age_stanza` accepts either kind of stanza
body encoding (the legacy minimal encoding, and the new explicit encoding).

### Security
- `age_core::primitives::aead_decrypt` now takes a `size` argument, checked
against the plaintext length. This is to mitigate multi-key attacks, where a
ciphertext can be crafted that decrypts successfully under multiple keys.
Short ciphertexts can only target two keys, which has limited impact. See
[this commit message](https://github.com/FiloSottile/age/commit/2194f6962c8bb3bca8a55f313d5b9302596b593b)
for more details.

## [0.5.0] - 2020-11-22
### Added
- Several structs used when implementing the `age::Identity` and
Expand Down
2 changes: 1 addition & 1 deletion age-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "age-core"
description = "[BETA] Common functions used across the age crates"
version = "0.5.0"
version = "0.6.0"
authors = ["Jack Grigg <thestr4d@gmail.com>"]
repository = "https://github.com/str4d/rage"
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions age-plugin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "age-plugin"
description = "[BETA] API for writing age plugins."
version = "0.0.0"
version = "0.1.0"
authors = ["Jack Grigg <thestr4d@gmail.com>"]
repository = "https://github.com/str4d/rage"
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2018"

[dependencies]
age-core = { version = "0.5.0", path = "../age-core", features = ["plugin"] }
age-core = { version = "0.6.0", path = "../age-core", features = ["plugin"] }
bech32 = "0.8"
chrono = "0.4"
secrecy = "0.7"
Expand Down
38 changes: 26 additions & 12 deletions age-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ logic will work as long as it can detect the `--age-plugin=STATE_MACHINE` flag.
```rust
use age_core::format::{FileKey, Stanza};
use age_plugin::{
identity::{self, Callbacks, IdentityPluginV1},
identity::{self, IdentityPluginV1},
print_new_identity,
recipient::{self, RecipientPluginV1},
run_state_machine,
Callbacks, run_state_machine,
};
use gumdrop::Options;
use std::collections::HashMap;
Expand All @@ -85,35 +85,49 @@ use std::io;
struct RecipientPlugin;

impl RecipientPluginV1 for RecipientPlugin {
fn add_recipients<'a, I: Iterator<Item = &'a str>>(
fn add_recipient(
&mut self,
recipients: I,
) -> Result<(), Vec<recipient::Error>> {
index: usize,
plugin_name: &str,
bytes: &[u8],
) -> Result<(), recipient::Error> {
todo!()
}

fn wrap_file_key(
fn add_identity(
&mut self,
file_key: &FileKey,
) -> Result<Vec<Stanza>, Vec<recipient::Error>> {
index: usize,
plugin_name: &str,
bytes: &[u8]
) -> Result<(), recipient::Error> {
todo!()
}

fn wrap_file_keys(
&mut self,
file_keys: Vec<FileKey>,
mut callbacks: impl Callbacks<recipient::Error>,
) -> io::Result<Result<Vec<Vec<Stanza>>, Vec<recipient::Error>>> {
todo!()
}
}

struct IdentityPlugin;

impl IdentityPluginV1 for IdentityPlugin {
fn add_identities<'a, I: Iterator<Item = &'a str>>(
fn add_identity(
&mut self,
identities: I,
) -> Result<(), Vec<identity::Error>> {
index: usize,
plugin_name: &str,
bytes: &[u8]
) -> Result<(), identityw::Error> {
todo!()
}

fn unwrap_file_keys(
&mut self,
files: Vec<Vec<Stanza>>,
mut callbacks: impl Callbacks,
mut callbacks: impl Callbacks<identity::Error>,
) -> io::Result<HashMap<usize, Result<FileKey, Vec<identity::Error>>>> {
todo!()
}
Expand Down
5 changes: 5 additions & 0 deletions age/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to Rust's notion of
to 1.0.0 are beta releases.

## [Unreleased]

## [0.6.0] - 2021-05-02
### Security
- `StreamReader::seek(SeekFrom::End(offset))` did not previously authenticate
the ciphertext length; if the ciphertext had been truncated or extended by
Expand Down Expand Up @@ -41,6 +43,9 @@ to 1.0.0 are beta releases.

### Changed
- MSRV is now 1.47.0.
- `age::cli_common::file_io::OutputWriter::File` will now *overwrite* the file
if it exists, instead of returning an error. This makes it consistent with
`age::cli_common::file_io::OutputWriter::Stdout`, as well as most UNIX tools.
- Files encrypted with this version of `age` might not decrypt with previous
beta versions, due to changes in how stanza bodies are canonically encoded.
This should only affect a small fraction of files (if grease that triggers the
Expand Down
4 changes: 2 additions & 2 deletions age/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "age"
description = "[BETA] A simple, secure, and modern encryption library."
version = "0.5.1"
version = "0.6.0"
authors = ["Jack Grigg <thestr4d@gmail.com>"]
repository = "https://github.com/str4d/rage"
readme = "README.md"
Expand All @@ -14,7 +14,7 @@ edition = "2018"
maintenance = { status = "experimental" }

[dependencies]
age-core = { version = "0.5.0", path = "../age-core" }
age-core = { version = "0.6.0", path = "../age-core" }

# Dependencies required by the age specification:
# - Base64 from RFC 4648
Expand Down
2 changes: 1 addition & 1 deletion age/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The reference interoperable Golang implementation is available at
Add this line to your `Cargo.toml`:

```
age = "0.5"
age = "0.6"
```

See the [documentation](https://docs.rs/age) for examples.
Expand Down
5 changes: 4 additions & 1 deletion age/src/cli_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ where
/// Requests a secret from the user.
///
/// If a `pinentry` binary is available on the system, it is used to request the secret.
/// If not, we fall back to requesting directly in the CLI via stdin.
/// If not, we fall back to requesting directly in the CLI via a TTY.
///
/// This API does not take the secret directly from stdin, because it is specifically
/// intended to take the secret from a human.
///
/// # Parameters
///
Expand Down
4 changes: 2 additions & 2 deletions fuzz-afl/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions rage/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to Rust's notion of
to 1.0.0 are beta releases.

## [Unreleased]

## [0.6.0] - 2021-05-02
### Added
- Plugin support!
- The new [`age-plugin`](https://crates.io/crates/age-plugin) crate provides
Expand All @@ -21,6 +23,9 @@ to 1.0.0 are beta releases.

### Changed
- MSRV is now 1.47.0.
- `-o/--output` will now *overwrite* existing files instead of returning an
error. This makes the behaviour consistent with most UNIX tools, as well as
when using pipes.
- Files encrypted with this version of `rage` might not decrypt with previous
beta versions, due to changes in how stanza bodies are canonically encoded.
This should only affect a small fraction of files (if grease that triggers the
Expand Down
4 changes: 2 additions & 2 deletions rage/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rage"
description = "[BETA] A simple, secure, and modern encryption tool."
version = "0.5.1"
version = "0.6.0"
authors = ["Jack Grigg <thestr4d@gmail.com>"]
repository = "https://github.com/str4d/rage"
readme = "../README.md"
Expand Down Expand Up @@ -43,7 +43,7 @@ maintenance = { status = "experimental" }

[dependencies]
# rage and rage-keygen dependencies
age = { version = "0.5.0", path = "../age", features = ["armor", "cli-common", "plugin"] }
age = { version = "0.6.0", path = "../age", features = ["armor", "cli-common", "plugin"] }
chrono = "0.4"
console = "0.14"
env_logger = "0.8"
Expand Down

0 comments on commit 3e3e6a8

Please sign in to comment.