TMAC uses KECCAK permutation function with
$initstr = (N||byte_size(K)||K||0x00||0x00)$ $msgstr = (X||"00")$ $i = -bitlen(X)-2 \pmod{18}$ $pad = (10^{i}1)$ $fstring = (msgstr||pad)$ - return
$KECCAK(initstr||fstring)$
Padding
Length of
-
$TMAC_INIT(K, N)$ : initiates KECCAK core, compose$initstr$ and process it -
$TMAC_UPDATE(msg_chunk)$ : process one 18 bytes chunk of$fstring$
It is responsibility of a user to compose
$K = \text{EdDSA pkey prefix}$ $N = 0x0C$ $X = (SCh||SCn||M)$
Secure Channel Hash
Secure Channel Nonce
Let
Message
In ECDSA Key Setup, TMAC is used to generate second private key
$K = d = k \pmod{q}$ $N = 0x0A$ $X = ""$
Empty message
$TMAC_INIT(d, 0x0A)$ $w = TMAC_UPDATE(pad)$
$K = w$ $N = 0x0B$ $X = (SCh||SCn||z)$
Size of
$TMAC_INIT(w, 0x0B)$ - $TMAC_UPDATE(z[])