ters of data), Deflate compresses data by 25%. De-
pending on the number of characters, the output can
actually have a size increase between 6.3% (30 char-
acters) and 28.6% (5 characters). This can be ex-
plained by that general-purpose compression algo-
rithms build a dictionary of data to compress based
on earlier compressed data. Therefore, small pieces
of data do not compress really well (or in some cases,
at all) with such algorithms.
An algorithm that specializes more on the com-
pression of very short pieces of text could be used in-
stead, and can be created by using a static dictionary
of commonly used text parts.
3
However, the amount
of compression it provides can be unreliable, depend-
ing on how well the message ‘fits’ the pre-established
dictionary.
A completely custom algorithm can be designed
instead, tailored to removing and reconstructing re-
dundant information from messages that comply to
a pre-established structure. For the algorithm to be
durable, the messages’ structure should not change.
2.2 Securing and Verifying Authenticity
And Integrity
The recipient of an MC needs to be able to establish
the authenticity of the message’s source, and to verify
that the message was not changed after it was sent.
The sender has to prepare the data in such a way that
the recipient will be able to perform the necessary
checks. There are several ways in which the sender
can make these preparations, and for the receiver to
verify the message.
Digital signatures are an option. Using public key
cryptography, the integrity and authenticity of a mes-
sage can be established by adding a signature to the
message. In addition, digital signatures provide non-
repudiation: the sender cannot claim that he or she did
not send a message that the recipient has received and
validated. However, a drawback of digital signatures
is that key management is quite complex.
Message authentication codes (MAC) are another
option. A MAC is data added to a message with which
inferences can be made about its integrity and authen-
ticity, similar to a digital signature. Creating a MAC
requires the data of which the integrity and authentic-
ity should be protected (the message), and some secret
data which provides the authenticity (a secret key).
Verifying a MAC requires the message to be verified
and a secret key knownto the sender and the recipient.
A difference with digital signatures is that a single key
3
An example is SMAZ, compression for very small
strings:
https://github.com/antirez/smaz
Table 1: Output sizes of the Deflate compression algorithm,
based on 10,000,000 randomly generated text values with a
character range of [A-Za-z0-9], encoded in 8 bit ASCII.
Number of Size Compressed Number of Size Compressed
characters (bits) size (bits) characters (bits) size (bits)
5 40 40-56 18 144 128-160
6 48 40-64 19 152 136-168
7 56 48-72 20 160 136-176
8 64 48-80 21 168 144-184
9 72 64-88 22 176 160-192
10 80 72-96 23 184 160-200
11 88 72-104 24 192 176-208
12 96 80-112 25 200 184-216
13 104 96-120 26 208 192-224
14 112 104-128 27 216 200-232
15 120 104-136 28 224 200-240
16 128 112-144 29 232 216-248
17 136 112-152 30 240 224-256
is used. This simplifies key management somewhat
since all involved parties (sender and recipient(s)) use
the same key, but it sacrifices non-repudiation since it
cannot be proven which party signed a message.
With MACs, it is initially required that the trusted
environment that generates the key sends it to the
other trusted environment, without an intermediate
untrusted environment. Otherwise a man-in-the-
middle could intercept the key. A public key in-
frastructure with trusted third-parties that issue cer-
tificates to create digital signatures might be a better
choice if it is not viable to securely transfer a secret
key from one trusted environment to the other at the
beginning of the authentication device’s lifespan.
Note that confidentiality is not a security princi-
ple used in this analysis, nor in the case study in Sec-
tion 3. If it would be, authenticated encryption would
be one approach which combines confidentiality, in-
tegrity and authenticity.
Whether a digital signature or MAC is used, it is
important to provide protection against replay attacks.
A cryptographic nonce (number used once) can pro-
vide protectionagainst such attacks if it is used to gen-
erate the digital signature or MAC. Note that a nonce
does not have to add data to the message itself as long
as the remote trusted environment is able to recon-
struct the nonce when verifying the message. Exam-
ples of such nonces include time stamps and counters.
2.3 Encoding/Decoding Methods
Compressed data, digital signatures and MACs often
do not consist exclusively of human readable data.
An encoding can convert data to human readable and
writable text. There are several approaches. Wise-
man et al. performed a comparison of three distinct
encoding schemes for one-time passwords used in de-
vice pairing (Wiseman et al., 2016). These will be re-
ferred to as Wiseman’s word encoding, Wiseman’s al-
phanumerical encoding and Wiseman’s numerical en-