]> Cryptography - Streams and Broadcasts

Suppose we wish to broadcast a stream to a set of users securely. How can we achieve integrity? We cannot use MAC's, otherwise the users could forge packets to each other. We cannot sign the entire stream: this solution is vulnerable to packet loss, and also the whole stream would have to be buffered for verification. We cannot sign each packet individually, as this is too inefficient.

## Method 1 (Combinatorial)

We describe a simple scheme based on families of coverfree subsets. It is a too inefficient for practical purposes.

There are $n$ users and a single source. The source has several MAC keys ${K}_{1},...,{K}_{m}$, where $m$ will be determined later.

The $i$th receiver has a set of keys ${S}_{i}\subseteq \left\{{K}_{1},...,{K}_{m}\right\}$.

To send a message $M$, the source transmits $M,{\mathrm{MAC}}_{{K}_{1}}\left(M\right),...,{\mathrm{MAC}}_{{K}_{m}}\left(M\right)$.

Recipient $i$ accepts a packet $P$ if all the MAC's corresponding to their set ${S}_{i}$ verify.

At the bare minimum, we want 1-security, that is, any user $j$ should not be able to forge a packet for any other user $i$, so we must have ${S}_{i}⊈{S}_{j}$. The best way to do this is to use all subsets of size $m/2$ from the set of keys, so we need $n=\left(\begin{array}{c}m\\ m/2\end{array}\right)$, so $m=O\left(\mathrm{log}n\right)$.

More generally, for $t$-security (i.e. so that no group of $t$ users can forge a packet), we require a family of $t$-coverfree subsets, which can be done with $m=O\left({t}^{2}\mathrm{log}n\right)$. Thus the packet size is quadratic in $t$. It can be shown that a smaller packet size implies nonrepudiation, that is, a MAC that short would in fact be a signature.

## Method 2 (TESLA)

This solution uses time for security. Assume the total clock skew is $\Delta$, and that the total routing time is less than or equal to some time $T$.

We use hash chains, i.e:

${K}_{0}\to {K}_{1}=H\left({K}_{0}\right)\to \cdots \to {K}_{m}=H\left({K}_{m-1}\right)$

For setup, give ${K}_{m}$ to all recipients, for some sufficiently large $m$. The source has ${K}_{0}$. Then:

Time $1$: send ${M}_{1},{\mathrm{MAC}}_{{K}_{m-1}}\left({M}_{1}\right)$

Time $2$: send ${M}_{2},{\mathrm{MAC}}_{{K}_{m-2}}\left({M}_{2}\right)$

..

Time $T$: send ${M}_{T},{\mathrm{MAC}}_{{K}_{m-T}}\left({M}_{T}\right)$. By this stage, all users should have received ${M}_{1},\mathrm{MAC}\left({M}_{1}\right)$.

..

Time $T+\Delta$: send ${M}_{T+\Delta },{\mathrm{MAC}}_{{K}_{m-T-\Delta }}\left({M}_{T+\Delta }\right)$, and also send ${K}_{m-1}$

..

Time $2T+\Delta$: all users can validate ${M}_{1}$

To validate the first packet:

1. Check that ${K}_{m}$ is in the hash chain

2. Verify ${\mathrm{MAC}}_{{K}_{m-1}}\left({M}_{1}\right)$

3. Reject ${M}_{1}$ if received after time $T+\Delta ={T}_{\mathrm{local}}$

Note that this scheme requires the users to buffer packets for $T$ time steps.

It has been shown [Jacobson-Coppersmith] that one can construct a hash chain where computing any element of it takes time $O\left(\mathrm{log}n\right)$ in $O\left(\mathrm{log}n\right)$ space.

## Method 3 (Signing) [Wong and Lam]

Signing every packet is too expensive, but signing many packets is vulnerable to packet loss. The solution is to sign many packets at once but verify them individually.

For example, suppose we have four packets ${p}_{1},...,{p}_{4}$. We construct a hash tree (diagram will be here when Mozilla supports SVG :-) (e.g. if we label the tree nodes ${n}_{1},...,{n}_{7}$, we have

${n}_{1}=H\left({p}_{1}\right),{n}_{2}=H\left({p}_{2}\right),{n}_{3}=H\left({p}_{3}\right),{n}_{4}=H\left({p}_{4}\right),{n}_{5}=H\left({n}_{1}\mid \mid {n}_{2}\right),{n}_{6}=H\left({n}_{3}\mid \mid {n}_{4}\right),{n}_{7}=H\left({n}_{5}\mid \mid {n}_{6}\right)$

and transmit the packet plus enough nodes of the tree to derive the root node:

1. send ${p}_{1},{n}_{2},{n}_{6},\mathrm{sign}\left({n}_{7}\right)$

2. send ${p}_{2},{n}_{1},{n}_{6},\mathrm{sign}\left({n}_{7}\right)$

3. send ${p}_{3},{n}_{4},{n}_{5},\mathrm{sign}\left({n}_{7}\right)$

4. send ${p}_{4},{n}_{3},{n}_{5},\mathrm{sign}\left({n}_{7}\right)$

The overhead is $O\left(\mathrm{log}n\right)$ hashes plus a signature per packet.

However, this method requires buffering at the source. We can use one-time signatures to alleviate this.

One-Time Signatures are signatures that can be constructed and verified very quickly, but can only be used once (or a few times).

For example [Lamport], consider the following scheme:

• Private key: ${x}_{1}^{0},...,{x}_{160}^{0},{x}_{1}^{1},...,{x}_{160}^{1}$.

• Public key: $H\left({x}_{1}^{0}\right),...,H\left({x}_{160}^{0}\right),H\left({x}_{1}^{1}\right),...,H\left({x}_{160}{\right)}^{1}\right)$

• Sign($M$): compute $\mathrm{SHA}1\left(M\right)=h\in \left\{0,1{\right\}}^{160}$. The signature is ${x}_{1}^{{h}_{1}},...,{x}_{160}^{{h}_{160}}$ where ${h}_{i}$ is the $i$ bit of $h$.

Another example. BiBa OTS (Bins and balls):

• Let $n$ be the security parameter. Let $H$ be a hash function $H:\left\{0,1{\right\}}^{*}\to \left\{0,1{\right\}}^{m}$ where $m\ll n$.

• Private key: ${x}_{1},...,{x}_{n}\in \left\{0,1{\right\}}^{k}$

• Public key: $\mathrm{SHA}1\left({x}_{1}\right),...,\mathrm{SHA}1\left({x}_{n}\right)$

• Sign($M$): find $1\le i such that $H\left(M\mid \mid {x}_{i}\right)=H\left(M\mid \mid {x}_{j}\right)$. The signature is $\left({x}_{i},{x}_{j}\right)$ ("Find two balls that hit the same bin.")

We can now remove the buffering problem as follows. Build a hash tree from the public keys ${\mathrm{PK}}_{1},...,{\mathrm{PK}}_{n}$ of some one-time signature scheme. Sign the tree and transmit the public keys with signatures (so we commit to public keys instead of packets), and simply sign each packet.

## Method 4: Expanders

Build a directed acyclic graph (DAG) using the packets as nodes. Then proceed as in the previous scheme, except this time we use a hash DAG, instead of a hash tree.

To resist up to $t$ packets being lost, we need a graph that remains connected even if $t$ nodes are removed.

An $\epsilon$-expander graph $\left(V,E\right)$ is a graph such that for all $S\subseteq V$, we have $\mid \mathrm{neighbour}\left(S\right)\mid \ge \left(1+\epsilon \right)\mid S\mid$ if (?) $\mid S\mid \le \mid V\mid /\left(1+\epsilon \right)$.

There exist methods of constructing constant degree $d$ expanders on $n$ nodes such that removing ${n}^{\epsilon }$ nodes for some constant $\epsilon$ does not disconnect the graph.