Skip to content

Commit 5aff1e3

Browse files
committed
bring ocb3 and deoxys
2 parents e0456c2 + cda28b4 commit 5aff1e3

26 files changed

Lines changed: 219 additions & 384 deletions

File tree

Cargo.lock

Lines changed: 13 additions & 118 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ members = [
44
"aes-gcm",
55
"aes-gcm-siv",
66
"aes-siv",
7-
"ascon-aead128",
8-
"belt-dwp",
7+
#"ascon-aead128",
8+
#"belt-dwp",
99
"ccm",
1010
"chacha20poly1305",
1111
"deoxys",

aead-stream/src/lib.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
extern crate alloc;
77

88
use aead::{
9-
AeadCore, AeadInPlace, Buffer, Error, Result,
9+
AeadCore, AeadInOut, Buffer, Error, Result,
1010
array::{
1111
Array, ArraySize,
1212
typenum::{U4, U5, Unsigned},
@@ -32,7 +32,7 @@ pub type NonceSize<A, S> =
3232
/// Create a new STREAM from the provided AEAD.
3333
pub trait NewStream<A>: StreamPrimitive<A>
3434
where
35-
A: AeadInPlace,
35+
A: AeadInOut,
3636
A::NonceSize: Sub<Self::NonceOverhead>,
3737
NonceSize<A, Self>: ArraySize,
3838
{
@@ -57,7 +57,7 @@ where
5757
/// Deliberately immutable and stateless to permit parallel operation.
5858
pub trait StreamPrimitive<A>
5959
where
60-
A: AeadInPlace,
60+
A: AeadInOut,
6161
A::NonceSize: Sub<Self::NonceOverhead>,
6262
NonceSize<A, Self>: ArraySize,
6363
{
@@ -165,7 +165,7 @@ macro_rules! impl_stream_object {
165165
#[derive(Debug)]
166166
pub struct $name<A, S>
167167
where
168-
A: AeadInPlace,
168+
A: AeadInOut,
169169
S: StreamPrimitive<A>,
170170
A::NonceSize: Sub<<S as StreamPrimitive<A>>::NonceOverhead>,
171171
NonceSize<A, S>: ArraySize,
@@ -179,7 +179,7 @@ macro_rules! impl_stream_object {
179179

180180
impl<A, S> $name<A, S>
181181
where
182-
A: AeadInPlace,
182+
A: AeadInOut,
183183
S: StreamPrimitive<A>,
184184
A::NonceSize: Sub<<S as StreamPrimitive<A>>::NonceOverhead>,
185185
NonceSize<A, S>: ArraySize,
@@ -344,7 +344,7 @@ pub type DecryptorLE31<A> = Decryptor<A, StreamLE31<A>>;
344344
#[derive(Debug)]
345345
pub struct StreamBE32<A>
346346
where
347-
A: AeadInPlace,
347+
A: AeadInOut,
348348
A::NonceSize: Sub<U5>,
349349
<<A as AeadCore>::NonceSize as Sub<U5>>::Output: ArraySize,
350350
{
@@ -357,7 +357,7 @@ where
357357

358358
impl<A> NewStream<A> for StreamBE32<A>
359359
where
360-
A: AeadInPlace,
360+
A: AeadInOut,
361361
A::NonceSize: Sub<U5>,
362362
<<A as AeadCore>::NonceSize as Sub<U5>>::Output: ArraySize,
363363
{
@@ -371,7 +371,7 @@ where
371371

372372
impl<A> StreamPrimitive<A> for StreamBE32<A>
373373
where
374-
A: AeadInPlace,
374+
A: AeadInOut,
375375
A::NonceSize: Sub<U5>,
376376
<<A as AeadCore>::NonceSize as Sub<U5>>::Output: ArraySize,
377377
{
@@ -405,7 +405,7 @@ where
405405

406406
impl<A> StreamBE32<A>
407407
where
408-
A: AeadInPlace,
408+
A: AeadInOut,
409409
A::NonceSize: Sub<U5>,
410410
<<A as AeadCore>::NonceSize as Sub<U5>>::Output: ArraySize,
411411
{
@@ -434,7 +434,7 @@ where
434434
#[derive(Debug)]
435435
pub struct StreamLE31<A>
436436
where
437-
A: AeadInPlace,
437+
A: AeadInOut,
438438
A::NonceSize: Sub<U4>,
439439
<<A as AeadCore>::NonceSize as Sub<U4>>::Output: ArraySize,
440440
{
@@ -447,7 +447,7 @@ where
447447

448448
impl<A> NewStream<A> for StreamLE31<A>
449449
where
450-
A: AeadInPlace,
450+
A: AeadInOut,
451451
A::NonceSize: Sub<U4>,
452452
<<A as AeadCore>::NonceSize as Sub<U4>>::Output: ArraySize,
453453
{
@@ -461,7 +461,7 @@ where
461461

462462
impl<A> StreamPrimitive<A> for StreamLE31<A>
463463
where
464-
A: AeadInPlace,
464+
A: AeadInOut,
465465
A::NonceSize: Sub<U4>,
466466
<<A as AeadCore>::NonceSize as Sub<U4>>::Output: ArraySize,
467467
{
@@ -495,7 +495,7 @@ where
495495

496496
impl<A> StreamLE31<A>
497497
where
498-
A: AeadInPlace,
498+
A: AeadInOut,
499499
A::NonceSize: Sub<U4>,
500500
<<A as AeadCore>::NonceSize as Sub<U4>>::Output: ArraySize,
501501
{

0 commit comments

Comments
 (0)