Files
rosenpass/analysis/crypto/key.mpv
Karolin Varner 137cd5e85a add proverif analysis of Rosenpass, the protocol
The analysis was conducted as joint effort between @koraa and @blipp.

Co-authored-by: Benjamin Lipp <blipp@mailbox.org>
2023-02-23 20:46:22 +01:00

21 lines
543 B
Plaintext

#pragma once
@module key
(* The same type is used as key for all symmetric cryptography. *)
(* In practice this is a 256 bit random string. *)
(* The empty key is derived from 0:nat or empty:bits. *)
(* *)
(* A constructors for key are deliberately omitted to ensure *)
(* that keys must *always* be chosen usint `k <-R key`. *)
(* TODO: Capture that key reuse is forbidden. *)
#include "prelude/bits.mpv"
#include "crypto/setup.mpv"
type key.
const key0:key.
fun k2b(key) : bits [typeConverter].
letfun key_new() =
new k:key;
k.