1
Fork 0
mirror of https://github.com/Steffo99/appunti-magistrali.git synced 2024-11-22 18:44:17 +00:00
appunti-steffo/8 - Crittografia applicata/2 - Comunicazione simmetrica/7 - Implementazioni particolari/2 - Operation framework/operation framework deterministico per crittografia simmetrica a flusso con nonce.md

11 lines
427 B
Markdown
Raw Normal View History

2023-09-21 00:46:23 +00:00
[[operation framework deterministico]] per [[crittografia simmetrica]] con [[nonce]] (come un [[cifrario a flusso]]).
Prevede i seguenti metodi:
```rust
trait EncryptorStreamBasedWithNonce<const KEY_SIZE> {
fn keygen() -> [u8; KEY_SIZE];
fn encrypt(key: &[u8; KEY_SIZE], nonce: usize, plaintext: Iterator<u8>) -> Iterator<u8>;
fn decrypt(key: &[u8; KEY_SIZE], nonce: usize, ciphertext: Iterator<u8>) -> Iterator<u8>;
}
```