\end{algorithmic}\r
\r
\begin{algorithmic}[1]\r
- \Function{ReinsertLastSlot}{$sl_{s_{last}},max'_s$}\r
- \State $s_s \gets GetLastS(sl_{s_{last}})$\r
- \State $sv_s \gets GetSV(sl_{s_{last}})$\r
- \State $\tuple{stat_s,SL_s} \gets \Call{PutSlot}{s_s,sv_s,max'_s}$\r
- \State $cr_s \gets \Call{HandleCollision}{\tuple{stat_s,SL_s}}$\r
- \State \Return{$cr_s$}\r
++\r
+ \Function{ReinsertLastSlot}{$MS_s,SK_s,sl_{s_{last}},max'_s,hmac_{p_s}$}\r
+ \State $s_s \gets MaxLastSeqN(MS_s)$\r
+ \State $sv_s \gets GetSV(sl_{s_{last}})$\r
+ \State $Dat_s \gets Decrypt(SK,sv_s)$\r
+ \State $DE_s \gets GetDatEnt(Dat_s)$\r
+ \State $hmac_{c_s} \gets Hmac(DE_s,SK_s)$\r
+ \State $Dat_s \gets CreateDat(s_s,id_{self},hmac_{p_s},DE_p,hmac_{c_s})$\r
+ \State $hmac_{p_s} \gets hmac_{c_s}$\r
+ \State $\tuple{stat_s,SL_s} \gets \Call{PutSlot}{s_s,sv_s,max'_s}$ \r
+ \State $cr_s \gets \Call{HandleCollision}{\tuple{stat_s,SL_s}}$\r
+ \State \Return{$\tuple{cr_s,hmac_{p_p}}$}\r
++\r
\EndFunction\r
\end{algorithmic}\r
\note{Shouldn't this function do something pretty sophisticated about seeing what data we actually need to keep from the last slot and not just insert the entire thing?}\r
\r
+ \note{Probably best to just not call this function if $need_s$ is false and not pass in such parameters. It makes it harder to read.}\r
\r
-\r
\begin{algorithmic}[1]\r
\Function{GetDEPairs}{$KV_s,max'_s,need_s,sl_s$}\r
\State $DE_{ret} \gets \emptyset$\r