Skip to content

Commit

Permalink
crypto: replace aranya-buggy with buggy (#28)
Browse files Browse the repository at this point in the history
Fixes #27

Signed-off-by: Eric Lagergren <[email protected]>
  • Loading branch information
elagergren-spideroak authored Jan 24, 2025
1 parent a7c8ac1 commit 739a245
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 33 deletions.
22 changes: 11 additions & 11 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions crates/crypto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "spideroak-crypto"
description = "SpiderOak's cryptography library"
version = "0.1.0"
version = "0.2.0"
authors.workspace = true
edition.workspace = true
license = "BSD-3-Clause"
Expand All @@ -23,7 +23,7 @@ default = [
# Enable allocations.
alloc = [
"aes-gcm/alloc",
"aranya-buggy/alloc",
"buggy/alloc",
"der/alloc",
"ecdsa/alloc",
"postcard/alloc",
Expand Down Expand Up @@ -98,7 +98,7 @@ std = [
"dep:rand",

"aes-gcm/std",
"aranya-buggy/std",
"buggy/std",
"crypto-common/std",
"der/std",
"der/std",
Expand Down Expand Up @@ -141,10 +141,10 @@ trng = [
]

[dependencies]
aranya-buggy = { version = "0.1.0", default-features = false }
spideroak-crypto-derive = { version = "0.1.0", path = "../crypto-derive" }

aranya-bearssl-sys = { version = "0.1.0", optional = true }
buggy = { version = "0.1.0", default-features = false }

aes = { version = "0.8", default-features = false, features = ["zeroize"], optional = true }
aes-gcm = { version = "0.10", default-features = false, features = ["aes"] }
Expand Down
12 changes: 6 additions & 6 deletions crates/crypto/src/aead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use core::{
result::Result,
};

use aranya_buggy::{Bug, BugExt};
use buggy::{Bug, BugExt};
use generic_array::{ArrayLength, GenericArray, IntoArrayLength};
use serde::{Deserialize, Serialize};
use subtle::{Choice, ConstantTimeEq};
Expand Down Expand Up @@ -834,7 +834,7 @@ pub trait Cmt4Aead: Cmt3Aead {}
mod committing {
use core::{fmt, marker::PhantomData, num::NonZeroU64, result::Result};

use aranya_buggy::{Bug, BugExt};
use buggy::{Bug, BugExt};
use generic_array::{ArrayLength, GenericArray};
use typenum::{
type_operators::{IsGreaterOrEqual, IsLess},
Expand Down Expand Up @@ -1109,7 +1109,7 @@ mod committing {
additional_data,
)?;

let (dst, cx) = $crate::aranya_buggy::BugExt::assume(
let (dst, cx) = $crate::buggy::BugExt::assume(
dst.split_last_chunk_mut::<{Self::COMMITMENT_SIZE}>(),
"`COMMITMENT_SIZE` fits in `out`",
)?;
Expand Down Expand Up @@ -1142,7 +1142,7 @@ mod committing {
additional_data,
)?;

let (tag, cx) = $crate::aranya_buggy::BugExt::assume(
let (tag, cx) = $crate::buggy::BugExt::assume(
overhead.split_last_chunk_mut::<{Self::COMMITMENT_SIZE}>(),
"`COMMITMENT_SIZE` fits in `overhead`",
)?;
Expand Down Expand Up @@ -1175,7 +1175,7 @@ mod committing {
additional_data,
)?;

let (ciphertext, got_cx) = $crate::aranya_buggy::BugExt::assume(
let (ciphertext, got_cx) = $crate::buggy::BugExt::assume(
ciphertext.split_last_chunk::<{Self::COMMITMENT_SIZE}>(),
"`COMMITMENT_SIZE` fits in `ciphertext`",
)?;
Expand Down Expand Up @@ -1214,7 +1214,7 @@ mod committing {
additional_data,
)?;

let (overhead, got_cx) = $crate::aranya_buggy::BugExt::assume(
let (overhead, got_cx) = $crate::buggy::BugExt::assume(
overhead.split_last_chunk::<{Self::COMMITMENT_SIZE}>(),
"`COMMITMENT_SIZE` fits in `overhead`",
)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/crypto/src/asn1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use core::{
result::Result,
};

use aranya_buggy::{Bug, BugExt};
use buggy::{Bug, BugExt};
use der::{asn1::UintRef, Decode, Encode, Header, Reader, SliceReader, SliceWriter, Tag};

use crate::{
Expand Down
2 changes: 1 addition & 1 deletion crates/crypto/src/hex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use core::{
str,
};

use aranya_buggy::Bug;
use buggy::Bug;
use generic_array::{functional::FunctionalSequence, ArrayLength, GenericArray};
use subtle::{Choice, ConditionallySelectable};
use typenum::{
Expand Down
2 changes: 1 addition & 1 deletion crates/crypto/src/hkdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use core::marker::PhantomData;

use aranya_buggy::BugExt;
use buggy::BugExt;
use generic_array::GenericArray;
use typenum::{Prod, U255};

Expand Down
2 changes: 1 addition & 1 deletion crates/crypto/src/hpke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use core::{
result::Result,
};

use aranya_buggy::{bug, Bug, BugExt};
use buggy::{bug, Bug, BugExt};
use generic_array::ArrayLength;
use subtle::{Choice, ConstantTimeEq};

Expand Down
2 changes: 1 addition & 1 deletion crates/crypto/src/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use core::{
result::Result,
};

use aranya_buggy::Bug;
use buggy::Bug;
use generic_array::{ArrayLength, GenericArray};

use crate::signer::PkError;
Expand Down
2 changes: 1 addition & 1 deletion crates/crypto/src/kdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use core::{fmt, iter::IntoIterator, mem, result::Result};

use aranya_buggy::Bug;
use buggy::Bug;
use generic_array::{ArrayLength, ConstArrayLength, GenericArray, IntoArrayLength};
use subtle::{Choice, ConstantTimeEq};
use typenum::{
Expand Down
2 changes: 1 addition & 1 deletion crates/crypto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub mod test_util;
mod util;
pub mod zeroize;

pub use aranya_buggy;
pub use buggy;
pub use generic_array;
pub use subtle;
pub use typenum;
2 changes: 1 addition & 1 deletion crates/crypto/src/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use core::{
result::Result,
};

use aranya_buggy::Bug;
use buggy::Bug;

use crate::{
asn1::EncodingError,
Expand Down
1 change: 0 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ confidence-threshold = 0.8
# Allow 1 or more licenses on a per-crate basis, so that particular licenses
# aren't accepted for every possible crate as with the normal allow list
exceptions = [
{ allow = ["AGPL-3.0"], crate = "aranya-buggy" },
]

# Some crates don't have (easily) machine readable licensing information,
Expand Down
2 changes: 1 addition & 1 deletion supply-chain/audits.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ user-id = 293722 # aranya-project-bot
start = "2024-10-15"
end = "2026-01-23"

[[trusted.aranya-buggy]]
[[trusted.buggy]]
criteria = ["safe-to-deploy", "does-not-implement-crypto"]
user-id = 293722 # aranya-project-bot
start = "2024-10-16"
Expand Down
4 changes: 2 additions & 2 deletions supply-chain/imports.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ when = "2024-10-15"
user-id = 293722
user-login = "aranya-project-bot"

[[publisher.aranya-buggy]]
[[publisher.buggy]]
version = "0.1.0"
when = "2024-10-16"
when = "2025-01-24"
user-id = 293722
user-login = "aranya-project-bot"

Expand Down

0 comments on commit 739a245

Please sign in to comment.