mirror of
https://github.com/Steffo99/appunti-magistrali.git
synced 2024-11-25 11:34:18 +00:00
15 lines
474 B
Markdown
15 lines
474 B
Markdown
|
---
|
||
|
aliases: ["DAEAD"]
|
||
|
---
|
||
|
|
||
|
[[authenticated encryption with associated data]] in un [[operation framework deterministico]].
|
||
|
|
||
|
Prevede i seguenti metodi:
|
||
|
```rust
|
||
|
trait AuthenticatedEncryptorWithAssociatedData<const KEY_SIZE, Data> {
|
||
|
fn keygen() -> [u8; KEY_SIZE];
|
||
|
fn encrypt(key: &[u8; KEY_SIZE], nonce: usize, plaintext: Iterator<u8>, data: Data) -> Iterator<u8>;
|
||
|
fn decrypt(key: &[u8; KEY_SIZE], nonce: usize, ciphertext: Iterator<u8>, data: Data) -> Iterator<u8>;
|
||
|
}
|
||
|
```
|