Cryptographic protocols for small devices

35
H2020-ICT-2014 – Project 645421 ECRYPT – CSA ECRYPT – Coordination & Support Action D2.3 Cryptographic protocols for small devices — New Challenges and Directions Due date of deliverable: 31 May 2016 Actual submission date: 26 September 2016 Start date of project: 1 March 2015 Duration: 3 years Lead contractor: Ruhr Universit¨ at Bochum (RUB) Revision 2.1 Change log Version Contents 0.1 workshop details 0.2 systematization of open research directions 1.0 fully detailed version with problem description 1.1 minor revision 2.0 Added open problems 2.1 Added chapter on fundamental research Project co-funded by the European Commission within the H2020 Programme Dissemination Level PU Public X PP Restricted to other programme participants (including the Commission services) RE Restricted to a group specified by the consortium (including the Commission services) CO Confidential, only for members of the consortium (including the Commission services)

Transcript of Cryptographic protocols for small devices

Page 1: Cryptographic protocols for small devices

H2020-ICT-2014 – Project 645421

ECRYPT – CSA

ECRYPT – Coordination & Support Action

D2.3

Cryptographic protocols for small devices — New Challengesand Directions

Due date of deliverable: 31 May 2016Actual submission date: 26 September 2016

Start date of project: 1 March 2015 Duration: 3 years

Lead contractor: Ruhr Universitat Bochum (RUB) Revision 2.1

Change log

Version Contents

0.1 workshop details0.2 systematization of open research directions1.0 fully detailed version with problem description1.1 minor revision2.0 Added open problems2.1 Added chapter on fundamental research

Project co-funded by the European Commission within the H2020 Programme

Dissemination Level

PU Public X

PP Restricted to other programme participants (including the Commission services)

RE Restricted to a group specified by the consortium (including the Commission services)

CO Confidential, only for members of the consortium (including the Commission services)

Page 2: Cryptographic protocols for small devices
Page 3: Cryptographic protocols for small devices

Cryptographic protocols for small devices — New

Challenges and Directions

EditorTim Guneysu, Eike Kiltz (RUB)

ContributorsLeo Ducas (CWI)

Oscar Garcia Morchon (Philips)Andreas Hulsing (TU Eindhoven)

Michael Hutter (CRI)Patrick Longa (Microsoft Research)

Julian Loss (RUB)Vadim Lyubashevsky (IBM Zurich)

Nele Mentens (KU Leuven)Tobias Oder (RUB)Thomas Plos (NXP)

Pascal Sasdrich (RUB)Peter Schwabe (RU Nijmegen)

Ingrid Verbauwhede (KU Leuven)

26 September 2016

Revision 2.1

The work described in this report has in part been supported by the Commission of the European Commu-nities through the H2020-ICT program under contract H2020-ICT-2014 no. 645421. The information in thisdocument is provided as is, and no warranty is given or implied that the information is fit for any particularpurpose. The user thereof uses the information at its sole risk and liability.

Page 4: Cryptographic protocols for small devices
Page 5: Cryptographic protocols for small devices

Contents

Executive Summary 1

1 Implementation Level 51.1 State of the Art . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.1.1 Elliptic Curve Cryptography: Curve25519 and Ed25519 . . . . . . . . 61.1.2 Elliptic Curve Cryptography: FourQ . . . . . . . . . . . . . . . . . . . 81.1.3 Lattice-based Encryption based on Ring-LWE . . . . . . . . . . . . . . 111.1.4 Hash-based Signatures: SPHINCS . . . . . . . . . . . . . . . . . . . . 13

1.2 Implementation Challenges for Small Devices . . . . . . . . . . . . . . . . . . 151.3 Research Directions for Small Devices . . . . . . . . . . . . . . . . . . . . . . 16

2 Protocol and Primitive Level 192.1 Protocols based on Elliptic Curves . . . . . . . . . . . . . . . . . . . . . . . . 192.2 Protocols based on new Assumptions . . . . . . . . . . . . . . . . . . . . . . . 192.3 Security Models for Small Devices . . . . . . . . . . . . . . . . . . . . . . . . 20

3 Fundamental Research 23

i

Page 6: Cryptographic protocols for small devices

ii

Page 7: Cryptographic protocols for small devices

Executive Summary

With the internet of things and ubiquitous computing, our computing devices get smaller andsmaller, and so do their resources. Whereas devices such as high end smart cards are alreadyequipped with a relatively powerful processors and have non-volatile memory, low-end smalldevices such as passive RFID chips have almost no computational power.

This document focuses on major research challenges in the area of public-key cryptographyon small devices that need to be addressed in the future. It is the outcome of the Workshop onCryptographic Protocols on Small Devices that was held on May 13, 2016 in Vienna (Austria).Prior to the workshop, key researchers from industry and academia in the field have submittedtheir challenges to the organizers in form of short position papers. These papers have beenused to put together the program of the workshop and to draft this report.

The report groups the outcome of the workshop in two different topics. The first topicdeals with aspects related to implementation. The second topic deals with the protocol andprimitive level of the cryptographic protocols.

Workshop Details

The Workshop on Cryptographic protocols for small devices was held on May 13, 2016, inVienna, Austria, one day after the IACR Eurocrypt conference in Vienna. Further informationand slides are available on the webpage http://smalldevices.hgi.rub.de/.

The workshop attracted more than 50 participants from academia, industry, governmentinstitutions, and non-government institutions. There were three sessions, each containing twoinvited overview talks. The first session was the industry session with talk by Phillips andNXP. The second session was on implementation with talks by KU Leuven. The last sessionwas on cryptographic protocols with talks by IBM and CWI. The workshop concluded withopen discussions on future topics for public-key cryptography on small devices. The list ofspeakers was as follows.

• Leo Ducas (CWI)

• Oscar Garcia Morchon (Philips)

• Vadim Lyubashevsky (IBM Zurich)

• Nele Mentens (KU Leuven)

• Thomas Plos (NXP)

• Ingrid Verbauwhede (KU Leuven)

1

Page 8: Cryptographic protocols for small devices

2 ECRYPT-CSA

High Level Challenges and Research Directions

• Lightweight security. Small devices typically come with a constrained amount ofcomputational, volatile memory and permanent storage. While these limitations havealready been significantly relaxed during the last years due to technological progress,the growing demand for advanced security services of modern applications remains tobe a significant challenge for small devices. In particular, public-key cryptosystemsusually involve either complex arithmetic computations using large parameters and/orneed to handle large chunks of data (e.g., secret or public keys, ciphtertexts, plaintexts,or signatures).

• Long-term Security. New applications and trends (e.g., the Internet-of-Things) putadditional burden on the durability and expected lifetime of the security systems ofsmall devices. In particular, many small devices will become part of future smart in-frastructures and thus will be active for several decades before they are replaced. Hence,this requires designers to include facilities in the devices that can guarantee long-termsecurity, either by suitable cryptosystems with high security margin or correspondingupgrade and migration paths for the security subsystem.

• Physical Accessibility. Attackers can often easily gain physical access to small devicesas they usually are part of our infrastructure which is not always guarded and observedat all times. In this context, the cryptographic security subsystems of such deviceswhich are exposed in this way needs to resist physical attacks. This particularly includesreverse engineering attacks to extract the security function or the secret key, side-channelanalysis, or fault-injection attacks.

• Limited Randomness. The deployment of modern probabilistic cryptosystems andits protection against physical attacks requires the use of randomness to avoid semanticand physical leakage of information. For small devices, this requires the utilization ofa (true) random number generator that is costly and often slow in performance. It istherefore important to reduce the required amount of randomness to a minimum foreach invocation of a cryptographic operation.

Concrete Research Questions

1. Implementation (see Section 1.3)

(a) What cryptographic construction is an optimal fit considering the computationaland storage constraints of embedded systems? Lattice-based cryptography seems apromising direction, is there anything beyond?

(b) Considering the use of classic cryptography, what can be considered as optimalefficiency with respect to Elliptic Curve Cryptography over prime fields? Is optimalperformance the best criterion to formulate evidence of rigidity of the construction?

(c) Given the early stage of cryptanalysis of lattice-based cryptography, what is a safechoice for security parameters that offers sufficient (mid-term/long-term) security,still respecting the constraints of small devices? What are the implications of suffi-ciently large quantum computers on such parameters?

Page 9: Cryptographic protocols for small devices

D2.3 — Cryptographic protocols for small devices — New Challenges and Directions 3

(d) What countermeasures are efficient for lattice-based constructions to thwart side-channel and fault-injection attacks? Are there possibilities to combine both? Howcan side-channel leakage during discrete Gaussian sampling be avoided?

(e) How can we reduce the amount of costly (uniform/Gaussian) randomness involvedin cryptographic operations to ensure its semantic and physical security?

2. Protocols based on Elliptic Curves (see Section 2.1)

(a) Extend the functionality of such public-key schemes while keeping in mind thelimited resources of (high-end) small devices such as smart cards.

(b) Revisit existing and employed protocols and their security reductions in terms oftightness, in particular in more realistic multi-user environments.

3. Protocols based on new Assumptions (see Section 2.2)

(a) Lower the parameter sizes of digital signature schemes, while preserving its effi-ciency.

(b) Multivariate polynomials have already proved to be useful for use on small devices[14] but almost all practical schemes are ad-hoc and not provably secure. Can webuild a practical signature scheme from hard problems over multivariate polynomi-als?

(c) Most of the basic lattice-based encryption schemes are only semantically secure. Forsome of them it remains to find a chosen-ciphertext secure variant with minimaloverhead and a tight security reduction. For small devices the use of the randomoracle heuristic is recommended.

(d) Can hash-based signatures such as SPHINCS [11] be made more efficient?

(e) An important research direction is to extend the Blundo et al. [13] non-interactiveidentity-based key-exchange protocol to the computational setting in a way thatits efficiency is preserved while its security can be provably based on standardassumptions.

4. Security Models for Small Devices (see Section 2.3)

(a) Can we find reasonable security models that depicts the specific requirements forsmall devices? Possible parameters include partial access to communication, limitedaccess to the device, detection models, and physical security.

5. Fundamental Research (see Section 3)

(a) For some lattice-based protocols, the error sampling algorithm is the bottlenecksince the Gaussian error distribution has to be approximated. Can we find alterna-tive, more efficient, sampling algorithms with the same provable security guaranteesas Gaussian sampling?

(b) The security of practical Ring-LWE instances seems not fully understood yet.

Page 10: Cryptographic protocols for small devices

4 ECRYPT-CSA

Page 11: Cryptographic protocols for small devices

Chapter 1

Implementation Level

The implementation of public-key cryptosystems on small devices is a challenge due to theinvolved complex computational operations, demands on large amounts of (intermediate)storage memory, or both. This affects all typical target platforms such as (a) 8-bit or 32-bitmicrocontrollers, (b) Field-Programmable Gate Arrays (FPGA) and (c) Application-SpecificIntegrated Circuits (ASIC). In this chapter, we discuss which primitives seem a best fit withrespect to the constraints of those small target devices and which research directions seem tobe promising to date.

1.1 State of the Art

Public-key cryptography for small devices is currently predominantly relying on RSA andECC. For example, current generations of secure Smart Card devices employ specific multi-precision arithmetic accelerator components that support the dual use for basic level RSA andprime field ECC operations, yet limited to a fixed upper bound of multi-precision. However,in many applications with tight bounds on computational costs and storage, ECC-basedcryptosystems have already replaced previous solutions based on RSA.

In particular for the hardware context, a significant number of proposals and implemen-tations for ECC over binary extension fields have been presented (which are even suitablefor extremely constrained RFID devices [16]). Still, a recent shift towards ECC over primefields can be observed for several reasons. In light of recent revelations on back doors in stan-dardized cryptographic primitives (e.g., NIST’s Dual-EC-DRBG), a general reconsiderationof available ECC constructions has recently started, that should now take special consider-ations of the rigidity and rationales of the fundamental parameters and ECC constructions.In this context, several interesting proposals have been presented that have been designed tomaximize software performance and thus can be a good fit for small devices as well. We willhighlight the key features and suitability of the two promising candidates Curve25519 [5] andFourQ [18] in the remainder of this document.

However, while ECC-based systems are perceived today as being small and fast and thussuitable for small devices, it is well known that they can be broken in polynomial time usingShor’s algorithm. However, the polynomial is so small that scaling up to secure parametersseems impossible. Hence, in particular for devices with long-term security requirements,alternative public-key cryptosystems beyond RSA and ECC need to be investigated. Whileseveral classes of directions have emerged in response to this, lattice-based cryptography seems

5

Page 12: Cryptographic protocols for small devices

6 ECRYPT-CSA

to provide a promising mix of computational efficiency and versatility in terms of encryptionand digital signature schemes but also advanced constructions including IBE, ABE and FHE.However, extensive cryptanalysis is still required for most lattice-based constructions to enablestandards adopting this class of cryptography. In this context, hash-based signatures havereceived significant attention and already reached maturity. As a recent proposal in thisdirection, SPHINCS [11] as a stateless hash-based signature scheme seems to be a suitablesolution even for small devices.

We will briefly summarize the recent findings in the following subsections in order toextract particular research challenges and directions at the end of this chapter.

1.1.1 Elliptic Curve Cryptography: Curve25519 and Ed25519

In this section, we report on the efficient implementation of a special Elliptic Curve cryp-tosystem using Curve25519 and Ed25519 [5, 48] for small devices. For Curve25519, the targetapplication is the Diffie-Hellman key agreement suitable for high-performance applications,while Ed25519 is designed for a digital signature scheme. Although Curve25519 (and thusEd25519) was initially proposed to accelerate the Diffie-Hellman key agreement primarily insoftware, it was shown that its characteristics can be similarly exploited for small softwareand hardware devices to achieve a compact but still efficient ECC processor.

Background

In 2006, Bernstein introduced the Curve25519 elliptic-curve Diffie-Hellman key-exchangeprimitive and the corresponding high-speed software for various x86 CPUs [5]. Curve25519uses the elliptic curve defined by the equation E : y2 = x3 + 486662x2 + x over the fieldF2255−19. The scalar multiplication performed in Curve25519 uses the x-coordinate-baseddifferential addition introduced by Montgomery in [42, Section 10]. The main computationaleffort for the scalar multiplication are 255 so called ladder steps, 255 conditional swaps, eachbased on one bit of the scalar, and one inversion in 22

255−19.In 2011, Bernstein et al. introduced the Ed25519 elliptic-curve digital-signature scheme

and presented a corresponding high-speed software for Intel Nehalem/Westmere processors [9,10]. The signatures are based on arithmetic on the twisted Edwards curve [6] defined by theequation E : x2+y2 = 1− 121665

121666x2y2 over F2255−19. This curve is birationally equivalent to the

Montgomery curve used in the Curve25519 key-exchange software. The main computationaleffort for Ed25519 key-pair generation and signing is one fixed-base-point scalar multiplicationwith a secret scalar whereas the main computational effort for signature verification is onepoint decompression (Ed25519 stores only the y coordinate and one bit of the x coordinate ofpublic keys) and one double-point scalar multiplication with public scalars. One of the twopoints involved in this double-point scalar multiplication is the fixed-base-point also used inkey-pair generation and signing.

We briefly introduce the mathematical background relevant to Curve25519 and Ed25519;for further information please refer to the original publications [5, 9, 10]. Based on a groupof points defined over this curve, ECC arithmetic defines the addition P3 = P1 + P2 oftwo points P1,P2 using the tangent-and-chord rule as the primary group operation. Thisgroup operation distinguishes the case for P1 = P2 (point doubling) and P1 6= P2 (pointaddition). Furthermore, formulas for these operations vary for affine and projective coordinaterepresentations, i.e., the curve equation for projective coordinates relaxes the one for affine

Page 13: Cryptographic protocols for small devices

D2.3 — Cryptographic protocols for small devices — New Challenges and Directions 7

Component Unprotected Protected Available Utilization

Number of Slice Registers 3592 3784 106400 3% / 3%Number of Slice LUTs 2783 2862 53200 5% / 5%Number of Occupied Slices 1029 1180 13300 7% / 8%Number of DSP48E1 20 22 220 9% / 10%Number of RAMB36E1 2 2 140 1% / 1%

Cycles per Step Function 64770 68880 at 200MHzCycles per Inversion 14630 14372 at 200MHzTotal Cycles 79400 83252 at 200MHz

Table 1.1: Curve25519 Performance on a Xilinx Zynq-7020 device.

coordinates by introducing an additional variable Z. In particular, the use of projectivecoordinates avoids the costly modular inversion for a point operation at the cost of additionalmodular multiplications.

Curve25519 can be considered as a function designed to accelerate the Diffie-Hellmann keyagreement over elliptic curves; its basic arithmetic can be easily extended into the Ed25519signature scheme. It defines a point multiplication that provides inherent timing-attack re-sistance and a conjectured security level comparable to NIST P-256 or AES-128.

For both cryptosystems assume a base point P with P = (Xi, Yi, Zi). Tracking twointermediate points Q,Q′ and their difference Q − Q′ based on P , Curve25519 defines acombined point doubling and point addition function as a single step of the Montgomeryladder [42, Section 10] with 5 multiplications, 4 squarings, 1 multiplication by (A − 2)/4 =121666, 4 additions, and 4 subtractions in F2255−19. An additional benefit of the Curve25519function is, that only the x-coordinate of each point is required during the computation sothat y can be completely omitted in the formulas. Therefore, the point multiplication solelyrelies on the x and z coordinates of the two points Q and Q′. Eventually, a combined step iscomputed by

x2Q = (x2 − z2)2 = (x− z)2(x+ z)2

z2Q = 4xz(x2 +Axz + z2)

xQ+Q′ = 4(xx′ − zz′)zQ+Q′ = 4(xz′ − zx′)x1

Implementation Results

In several works it has been shown that Curve25519 – although being designed for high-performance software implementation – is likewise suitable for small devices, in particularhardware devices. In Table 1.1 we first summarize the resource consumption for a single coreimplementation of Curve25519 on a reconfigurable device (Xilinx Zynq-7020).

We further report benchmarks of Curve25519 for the AVR family microcontroller as shownin Table 1.2. The benchmarks are by measuring cycles on an actual ATmega2560 microcon-troller clocked at 16 MHz (on an Arduino Mega 2560 development board).

Page 14: Cryptographic protocols for small devices

8 ECRYPT-CSA

Primitive Operation Cycles Stack bytes

Curve25519 high-speed crypto scalarmult base 22 791 580 677crypto scalarmult 22 791 579 677

low-area crypto scalarmult base 27 926 288 917crypto scalarmult 27 926 278 920

Ed25519 high-speed crypto sign keypair 21 928 751 1 566crypto sign 23 216 241 1 642

crypto sign open 32 634 713 1 315low-area crypto sign keypair 32 870 759 1 282

crypto sign 34 303 972 1 289crypto sign open 40 083 281 1 346

Table 1.2: Benchmark results of Curve25519 on the AVR ATmega2560 microcontroller

1.1.2 Elliptic Curve Cryptography: FourQ

Recently, another efficient elliptic curve has been proposed. In this section we report on theefficient implementation of the FourQ curve in light of its application on small devices.

Background

In 2015, Costello and Longa [18] introduced FourQ, a high-performance elliptic curve thatprovides around 128 bits of security and that has been shown to achieve the fastest curve-based scalar multiplications on a wide range of x64 and ARM platforms, from low-end tohigh-end architectures. FourQ is defined by a twisted Edwards curve that supports the fastesttwisted Edwards formulas [30], uses the efficient yet compact Mersenne prime p = 2127 − 1,and comes equipped with two efficiently computable endomorphisms, which enables four-dimensional decompositions. This optimal combination of features does not only providehigh-performance and flexibility, but also uniquely defines FourQ. This “uniqueness” allaysconcerns in the curve selection, which has been recent focus of preoccupation in the case ofother elliptic curves.

Specifically, FourQ is defined by the complete twisted Edwards [7] equation given byE/Fp2 : −x2 + y2 = 1 + dx2y2, where the quadratic extension field is Fp2 = Fp(i) fori2 = −1 and p = 2127 − 1, and d = 125317048443780598345676279555970305165 · i +4205857648805777768770. The Fp2-rational points lying on the curve equation form an abeliangroup with cardinality #E(Fp2) = 392 ·N , where N is a 246-bit prime. The prime-order sub-group E(Fp2)[N ] can be used to build cryptographic systems. FourQ is equipped with twoefficiently computable endomorphisms, ψ and φ, which give rise to a four-dimensional decom-position m 7→ (a1, a2, a3, a4) ∈ Z4 for any integer m ∈ [1, 2256) such that 0 ≤ ai < 264 fori = 1, ..., 4 and such that a1 is odd. This decomposition enables a four-dimensional variable-base scalar multiplication with the form [m]P = [a1]P + [a2]φ(P ) + [a3]ψ(P ) + [a4]φ(ψ(P )),for any point P ∈ E(Fp2)[N ].

FourQ was designed as to facilitate protection against side-channel attacks. It supportsregular, exception-free scalar multiplication algorithms that enable constant-time implemen-tations. The case of FourQ’s variable-base scalar multiplication based on four-dimensional

Page 15: Cryptographic protocols for small devices

D2.3 — Cryptographic protocols for small devices — New Challenges and Directions 9

Algorithm 1 FourQ’s scalar multiplication on E(Fp2)[N ] (from [18]).

Require: Point P ∈ E(Fp2)[N ] and integer scalar m ∈ [0, 2256).Ensure: [m]P.

Compute endomorphisms:1: Compute φ(P ), ψ(P ) and ψ(φ(P )).Precompute lookup table:2: Compute T [u] = P+[u0]φ(P )+[u1]ψ(P )+[u2]ψ(φ(P )) for u = (u2, u1, u0)2 in 0 ≤ u ≤ 7.

Write T [u] in coordinates (X + Y, Y −X, 2Z, 2dT ).Scalar decomposition and recoding:3: Decompose m into the multiscalar (a1, a2, a3, a4) as in [18, Prop. 5].4: Recode (a1, a2, a3, a4) into (d64, . . . , d0) and (m64, . . . ,m0) using [18, Alg. 1].

Write si = 1 if mi = −1 and si = −1 if mi = 0.Main loop:5: Q = s64 · T [d64]6: for i = 63 to 0 do7: Q = [2]Q8: Q = Q+ si · T [di]9: return Q

decompositions is shown in Algorithm 1. The curve arithmetic is based on Hisil et al.’sexplicit formulas that use extended twisted Edwards coordinates [30]: any projective tuple(X : Y : Z : T ) with Z 6= 0 and T = XY/Z corresponds to an affine point (x, y) = (X/Z, Y/Z).Note that these formulas are also complete on E , which means that they work without excep-tions for all points in E(Fp2).

The execution of Algorithm 1 begins with the computation of the endomorphisms ψ andφ, and the computation of the 8-point precomputed table (Steps 1−2). These precomputedpoints are stored in coordinates (X + Y, Y −X, 2Z, 2dT ) for efficiency. Scalar decompositionand multi-scalar recoding are then applied to the input scalar m at Steps 3 and 4 as describedin [18, Prop. 5] and [18, Alg. 1], respectively. Finally, the main loop consists of 64 itera-tions each computing a point doubling (Step 7) and a point addition with a point from theprecomputed table (Step 8).

Further, FourQ is highly flexible. It can be used for performing co-factor Diffie-Hellmankey exchanges (the co-factor 392 must be cleared by computing [392]P over the sender’spublic key P ) or in different digital signature schemes (for instance, Costello and Longa [19]recently proposed SchnorrQ, a high-performance Schnorr-like signature scheme using FourQ).Moreover, even though FourQ was designed to achieve high performance through the useof endomorphisms, it can also be adapted to settings that demand very reduced use ofmemory. FourQ can be converted to its Montgomery form to perform scalar multiplica-tions using the Montgomery ladder (similar to the case of Curve25519). In FourQ’s casea ladder step uses the value (A + 2)/4 = 33057424020291516681836294572752558598 · i +170141183460469227525829654910106337602. The computation of the Montgomery laddercan be sped up further by reducing the input scalar m ∈ [1, 2256) modulo N before execution(i.e., in this case, scalar multiplication consists of 246 ladder steps).

Page 16: Cryptographic protocols for small devices

10 ECRYPT-CSA

Operation Curve Cortex-A7 Cortex-A8 Cortex-A9 Cortex-A15

[k]P , variable base FourQ 373 235 256 132[k]P , fixed base FourQ 204 144 145 84[k]P + [l]Q, double scalar FourQ 431 269 290 155

[k]P , variable base Curve25519 926 497 568 315

Table 1.3: Performance results (in terms of thousands of cycles) of core scalar multiplica-tion operations on FourQ with protection against timing and cache attacks on various ARMCortex-A processors with NEON support. Results were rounded to the nearest 103 clockcycles. For this benchmark, fixed-base scalar multiplication (which uses the comb methodfrom [24]) used a precomputed table of 80 points (7.5KB of storage) and double-scalar mul-tiplication used a precomputed table of 256 points (24KB of storage).

Implementations Results

FourQ has already been implemented on a large variety of popular platforms and set speedrecords in the computation of the three most popular scalar multiplication variants: variable-base, fixed-base and double scalar multiplication. In the original FourQ paper, Costello andLonga presented an implementation in portable C with optional x64 assembly, and demon-strated the curve performance on different 64-bit AMD and Intel processors, including low-endand high-end class processors. More recently, Longa [37] presented an efficient implementationtargeting 32-bit ARM-based processors with NEON support and showcased the performanceof FourQ on different Cortex-A microarchitectures1. Finally, Jarvinen et al. [33] presentedthe first implementations of this curve on reconfigurable hardware (FPGA). In general, theexperimental results from all these works show that, when computing a single variable-basescalar multiplication, FourQ is more than 5 times faster than the widely used NIST curveP-256 and more than 2 times faster than Curve25519.

Table 1.3 summarizes benchmark results for FourQ’s ARM NEON implementation whencomputing different variants of scalar multiplication on a large variety of ARM Cortex-A basedplatforms: a 0.9GHz Raspberry Pi 2 (Cortex-A7), a 1.0GHz BeagleBone board (Cortex-A8),a 1.7GHz Odroid X2 (Cortex-A9) and a 2.0GHz Odroid XU3 (Cortex-A15). All of theseARM-based devices come equipped with a NEON vector unit.

The results in Table 1.3 highlight the efficiency gain that can be obtained through theuse of fixed-base scalar multiplications (e.g., useful during signature generation or ephemeralDiffie-Hellman key generation) using a relatively small amount of precomputation. Notably,these results also show the potential of using FourQ for signature verification: one double-scalar multiplication is, in most cases, less than 15% more expensive than single variable-base scalar multiplication. Compared to the Curve25519 implementation results from [12],variable-base scalar multiplication using FourQ is between 2.1 and 2.5 times faster. However,Bernstein et al. [12] do not report results for other scalar multiplication variants.

Table 1.4 summarizes the results of the FPGA implementations presented by Jarvinenet al. [33] on a Xilinx Zynq-7020. Jarvinen et al. implemented three different architectures:a single-core architecture using the Montgomery ladder that is intended for constrained ap-

1The different x86/x64/ARM implementations reported in [18] and [37] are part of FourQlib [18], an efficientand secure open source software library supporting FourQ.

Page 17: Cryptographic protocols for small devices

D2.3 — Cryptographic protocols for small devices — New Challenges and Directions 11

Curve Form # cores ResourcesTime T-put(µs) (ops)

FourQ Montgomery 1 565 LS, 16 DSP, 7 BRAM 310 3222FourQ twisted Edwards 1 1691 LS, 27 DSP, 10 BRAM 157 6389FourQ twisted Edwards 11 5697 LS, 187 DSP, 110 BRAM 170 64730

Curve25519 Montgomery 1 1029 LS, 20 DSP, 2 BRAM 397 2519Curve25519 Montgomery 11 11277 LS, 220 DSP, 22 BRAM 397 32304

Table 1.4: Performance results of variable-base scalar multiplication on FourQ with protectionagainst timing and simple side-channel attacks on a Xilinx Zynq-7020 FPGA.

plications, a single-core architecture using endomorphisms that is intended for low-latencyapplications, and a multi-core architecture using endomorphisms that is intended for high-throughput applications.

The results from [33] are compared against the Curve25519 implementation by [49] (caseswithout DPA countermeasures). In summary, the FourQ single-core architecture is 2.7 timesfaster in latency and 2.5 times faster in computation time and throughput. In terms ofDSP blocks (the critical resource), the FourQ architecture requires 27 while [49] requires 20.Therefore, the former one has an about 1.88 times better speed-area ratio than [49]. In thecase of the multi-core architecture, Jrvinen et al. obtain a throughput that is 2 times largerthan that from [49]. The Montgomery variant without endomorphisms is also faster than thedesign from [49]. This is partially explained by FourQ’s simpler arithmetic in Fp2 over theMersenne prime p = 2127 − 1. These results showcase FourQ’s great performance even whenendomorphisms are not used (e.g., in some applications with very strict memory constraints).

1.1.3 Lattice-based Encryption based on Ring-LWE

All currently deployed asymmetric cryptography (including RSA and ECC) is broken withthe advent of powerful quantum computers. Hence, as mentioned before, we have to consideralternative solutions in particular for systems with long-term security requirements. Amongall options, ideal lattice-based cryptography is one possible candidate that combines efficiencywith small key sizes as it involves polynomial multiplication as core function that can becomputed and scaled efficiently using FFT-like arithmetic. In this section we discuss an ideallattice-based encryption scheme based on the ring variant of the learning with errors problem.

Background

The semantically secure Ring-LWE public key encryption scheme was proposed in [35, 40]providing three different algorithms. The key generation procedure is given in Algorithm 2,the encryption procedure in Algorithm 3, and the decryption procedure in Algorithm 4.

The scheme is parameterized by the dimension n, the modulus q, and the standard devi-ation σ. The main idea of the scheme is that during encryption the n-bit encoded messagem = encode(m) is added to pe1 + e3 which is uniformly random and thus hides the mes-sage. Decryption is only possible with knowledge of r2 since otherwise the large term ae1r2cannot be eliminated when computing c1r2 + c2. The encoding of the message of length n isnecessary as the noise term e1r1 + e2r2 + e3 is still present after calculating c1r2 + c2 and

Page 18: Cryptographic protocols for small devices

12 ECRYPT-CSA

Algorithm 2 Ring-LWE Key Generation

Require: Access to global constant a1: r1 ← SampleGaussσ2: r2 ← SampleGaussσ3: p = r1 − a ◦ r24: return (pk, sk) = (p, r2)

Algorithm 3 Ring-LWE Encryption

Require: Access to global constant a1: e1 ← SampleGaussσ2: e2 ← SampleGaussσ3: e3 ← SampleGaussσ4: c1 = a ◦ e1 + e25: c2 = p ◦ e1 + e3 + encode(m)6: return (c1, c2)

Algorithm 4 Ring-LWE Decryption

1: return decode(c1 ◦ r2 + c2).

would prohibit the retrieval of the binary message after decryption. With the simple thresh-old encoding encode(m) = q−1

2 m the value q−12 is assigned only to each binary one of the

string m. The corresponding decoding function needs to test whether a received coefficientz ∈ [0, q−1] is in the interval q−14 ≤ z < 3 q−14 which then is interpreted as one and zero other-wise. As a consequence, the maximum error added to each coefficient must not be larger than| q4 | in order to decrypt correctly. The probability for decryption errors is mainly determinedby the tailcut τ and the standard deviation σ of the polynomials e1, e2, e3 ← DZn,σ, whichfollow a small discrete Gaussian distribution (sampled by SampleGaussσ). To support thenumber-theoretic transform (NTT), Gottert et al. [28] proposed parameter sets (n, q, s) whereσ = s/

√2π denoted as Ring-LWE-I (256, 7681, 11.31) and Ring-LWE-II (512, 12289, 12.18).

Implementation Results

This scheme has been implemented on various small devices, including FPGAs [43, 44] andAVR microcontrollers [36, 45].

Poppelmann and Guneysu [43] proposed an architecture suitable for small reconfigurabledevices, such as a Spartan-6 device. Since their implementation relies on a generic microcodeengine, it can also be used for other lattice-based implementations. The implementation ofthe Ring-LWE-I parameter set requires 4121 LUTs, 3513 FFs, 14 BRAM elements, and onedigital signal processor. One encryption is performed in 43 microseconds while decryptiontakes 28 microseconds at a clock frequency of 160 MHz. The smallest FPGA implementation,to the best of our knowledge, has been presented by Poppelmann and Guneysu [44], the overallresource occupation is 32 slices, 1 BRAM, and 1 DSP. To achieve such a low area design, theauthors chose a parameter set for which the modulus is a power of two. As a result, therewas no need for a modular reduction step. However, the drawback of the proposed set ofparameters is that the NTT is no longer applicable and as a result, the computation time is

Page 19: Cryptographic protocols for small devices

D2.3 — Cryptographic protocols for small devices — New Challenges and Directions 13

increased by one order of magnitude.Furthermore, there are several implementations targeting 8-bit AVR microcontrollers us-

ing different optimization strategies. For instance, the work of Liu et al. [36] focuses on themodular reduction. The authors provide a highly optimized implementation of the Barrettreduction [4] in assembly language and thus achieve a performance of 21 milliseconds forencryption and 8.6 milliseconds for decryption for Ring-LWE-I. In comparison, the work ofPoppelmann et al. [45] focuses on the application and implementation of the NTT. Althoughtheir modular reduction is less optimized than the one from [36], they report a performanceof 27 milliseconds for encryption and 6.7 milliseconds for decryption. Another difference isthat the program code of the implementation from [45] has a size of 6,668 bytes and the onefrom [36] is significantly bigger code size of 13,604 bytes.

1.1.4 Hash-based Signatures: SPHINCS

Hash-based signatures provide are known to provide solid security guarantees given that theunderlying hash functions are one-way. In this section we describe the SPHINCS constructionthat was proposed in [11] as a stateless construction overcoming the main concerns withprevious hash-based signatures, such as XMSS. We begin by listing the parameters used inthe construction, reviewing the one-time signature scheme WOTS+ and binary hash trees.

Parameters. SPHINCS uses several parameters and several functions. The main securityparameter is n ∈ N. The functions include two short-input cryptographic hash functions F :{0, 1}n → {0, 1}n and H : {0, 1}2n → {0, 1}n; one arbitrary-input randomized hash functionH : {0, 1}n × {0, 1}∗ → {0, 1}m, for m = poly(n); a family of pseudorandom generatorsGλ : {0, 1}n → {0, 1}λn for different values of λ; an ensemble of pseudorandom functionfamilies Fλ : {0, 1}λ × {0, 1}n → {0, 1}n; and a pseudorandom function family F : {0, 1}∗ ×{0, 1}n → {0, 1}2n that supports arbitrary input lengths. Of course, these functions can allbe built from a single cryptographic hash function, but it is more natural to separate thefunctions according to their roles.

SPHINCS uses a hyper-tree (a tree of trees) of total height h ∈ N, where h is a multiple ofd and the hyper-tree consists of d layers of trees, each having height h/d. The components ofSPHINCS have additional parameters which influence performance and size of the signatureand keys: the Winternitz one-time signature WOTS naturally allows for a space-time tradeoffusing the Winternitz parameter w ∈ N, w > 1; the tree-based few-time signature schemeHORST has a space-time tradeoff which is controlled by two parameters k ∈ N and t = 2τ

with τ ∈ N and kτ = m.As a running example we present concrete numbers for SPHINCS-256 where we use n =

256,m = 512, h = 60, d = 12, w = 16, t = 216, k = 32.

WOTS+. We now describe the Winternitz one-time signature (WOTS+) from [31]. Wedeviate slightly from the description in [31] to describe the algorithms as they are used inSPHINCS. Specifically, we include pseudorandom key generation and fix the message lengthto be n, meaning that a seed value takes the place of a secret key in our description. Givenn and w, we define

`1 =

⌈n

log(w)

⌉, `2 =

⌊log(`1(w − 1))

log(w)

⌋+ 1, ` = `1 + `2.

For the SPHINCS-256 parameters this leads to ` = 67. WOTS+ uses the function F toconstruct the following chaining function.

Page 20: Cryptographic protocols for small devices

14 ECRYPT-CSA

Chaining function ci(x, r). On input of value x ∈ {0, 1}n, iteration counter i ∈ N, andbitmasks r = (r1, . . . , rj) ∈ {0, 1}n×j with j ≥ i, the chaining function works the followingway. In case i = 0, c returns x, i.e., c0(x, r) = x. For i > 0 we define c recursively as

ci(x, r) = F(ci−1(x, r)⊕ ri),

i.e. in every round, the function first takes the bitwise xor of the previous value ci−1(x, r)and bitmask ri and evaluates F on the result. We write ra,b for the substring (ra, . . . , rb) ofr. In case b < a we define ra,b to be the empty string. Now we describe the three algorithmsof WOTS+.

Key Generation Algorithm (sk, pk ← WOTS.kg(S, r)). On input of seed S ∈ {0, 1}nand bitmasks r ∈ {0, 1}n×(w−1) the key generation algorithm computes the internal secretkey as sk = (sk1, . . . , sk`)← G`(S), i.e., the n bit seed is expanded to ` values of n bits. Thepublic key pk is computed as

pk = (pk1, . . . , pk`) = (cw−1(sk1, r), . . . , cw−1(sk`, r)).

Note that S requires less storage than sk; thus one can generate sk and pk on the fly whennecessary.

Signature Algorithm (σ ←WOTS.sign(M,S, r)). On input of an n-bit message M , seedS and the bitmasks r, the signature algorithm first computes a base-w representation of M :M = (M1 . . .M`1), Mi ∈ {0, . . . , w− 1}. That is, M is treated as the binary representation ofa natural number x and then the w-ary representation of x is computed. Next it computesthe checksum C =

∑`1i=1(w − 1 − Mi) and its base w representation C = (C1, . . . , C`2).

The length of the base w representation of C is at most `2 since C ≤ `1(w − 1). We setB = (b1, . . . , b`) = M ‖ C, the concatenation of the base w representations of M and C.Then the internal secret key is generated using G`(S) the same way as during key generation.The signature is computed as

σ = (σ1, . . . , σ`) = (cb1(sk1, r), . . . , cb`(sk`, r)).

Verification Algorithm (pk′ ← WOTS.vf(M,σ, r)). On input of an n-bit message M , asignature σ, and bitmasks r, the verification algorithm first computes the bi, 1 ≤ i ≤ ` asdescribed above. Then it returns:

pk′ = (pk′1, . . . , pk′`) = (cw−1−b1(σ1, rb1+1,w−1), . . . , c

w−1−b`(σ`, rb`+1,w−1)).

A formally correct verification algorithm would compare pk′ to a given public key and outputtrue on equality and false otherwise. In SPHINCS this comparison is delegated to the overallverification algorithm.

For the full specification of SPHINCS we refer to the original work by Bernstein et al. [11]describing the complete SPHINCS construction.

Page 21: Cryptographic protocols for small devices

D2.3 — Cryptographic protocols for small devices — New Challenges and Directions 15

Implementation Results

We here outline the results for generating SPHINCS signatures running on an ARM Cortex-M3 platform with only 16 KB of volatile memory [32]. Besides memory usage, time is arelevant metric to be considered in this context. In fact, the running time very much deter-mines usability in practice.

Key generation. Generating a SPHINCS-256 key on the device takes 28 205 671 cycles. At32 MHz, this amounts to just below a second. As one would expect, virtually all of thesecycles can be attributed to WOTS+ key generation. When it comes to key generation, itshould be noted that the STM32L100C discovery board that was used for these benchmarksis not equipped with a random number generator. Instead, a hard-coded 32-byte value thatis included during the flashing process of the device, was used. While in practice, using sucha board, key generation would have to be done off the board, the results show that for similarboards with a TRNG on-board key generation is not only feasible but practical.

Signing. Producing a signature takes 589 018 151 cycles, or approximately 18.41 seconds. Asdescribed above, one cannot store the signature on the board – this requires communicationto a host outside of the board. Using direct memory access, one can efficiently interleavecontrol of this communication with computations. If the communication is disabled and thesignature is discard instead as it is being produced, the signing procedure requires 584 384 791cycles (for messages of small length, so as to focus the benchmark on penalty of signatureoutput). This shows that the overhead is noticeable but not significant. In practice, this is afactor that may vary slightly depending on the specific context and interfaces available.

In terms of RAM usage, the signing procedure ends up using 8 755 bytes of stack space.Note that some of this stack usage is the result of function inlining by the compiler, to preventhaving to perform function calls. When disabling this behavior, the stack space consumptionis reduced to 6 619 bytes. Furthermore, the authors observe that the current implementationrequires 25 KB of flash memory (or 19 KB, without inlining). These results show that thereis a sufficient amount of memory left on the device (in terms of both RAM and ROM) forother applications, but also indicate that moving to even smaller devices (such as the CortexM0) would be quite challenging.

Verification. Verification is much more straight-forward. The memory limit does not neces-sitate any significant changes like it did for signature generation, as the verification procedurenever requires the construction of a full tree. The signature needs to be streamed to the de-vice, but this does not complicate processing, as the node values arrive in the order in whichthey are to be consumed. At 16 414 251 cycles, verification takes roughly 513 milliseconds.When ignoring the communication and operating on bogus data instead, verification requires5 991 643 cycles. The communication penalty is in the same ballpark as the one incurredwhen signing, but still noticeably different. This can be accounted for by the way in whichcommunication and computation can be interleaved in the two procedures: for verification,the windows in which communication can be performed are much smaller, making it moredifficult to schedule the computation and communication efficiently.

1.2 Implementation Challenges for Small Devices

In this report we briefly surveyed recent implementation works and directions for public keycryptography and interestingly it shows that even more than 30 years after the first publica-

Page 22: Cryptographic protocols for small devices

16 ECRYPT-CSA

tions on Elliptic Curve Cryptography significant improvements in terms of efficiency are stillpossible as could be seen with the proposal of the FourQ curve. Obviously, any improvementwith respect to (software) implementation efficiency is usually also directly applicable to smalldevices. Likewise this holds for any alternative public-key cryptosystem (also known as post-quantum cryptosystem). In summary, there are many high-level challenges which mostly canbe identified from the efforts as shown above. This includes:

(a) Lightweight Security. Small devices typically come with a constraint amount of com-putational power, volatile memory and permanent storage. While those limitations havealready significantly relaxed during the last years due to the technological progress, thegrowing demand for advanced security services of modern applications remains to be asignificant challenge for small devices. In particular, public-key cryptosystems usuallyinvolve either complex arithmetic computations using large parameters and/or needs tohandle large chunks of data (e.g., secret or public keys, ciphtertexts, plaintexts or signa-tures).

(b) Long-term Security. New applications and trends (e.g., the Internet-of-Things) putadditional burden on the durability and expected lifetime of the security systems of smalldevices. In particular, many small devices will become part of future smart infrastructuresand thus will be active for several decades before they are replaced. Hence, this requiresdesigners to include facilities in the devices that can guarantee long-term security, ei-ther by suitable cryptosystems with high security margins or corresponding upgrade andmigration paths for the security subsystem.

(c) Physical Accessibility. Attackers can often easily gain physical access to small devicesas they usually are part of our infrastructure which is not always guarded and observed atall times. In this context, the cryptographic security subsystem of those devices which areexposed in this way needs to resist physical attacks. This particularly includes, reverseengineering attacks to extract the security function or the secret key, side-channel analysisor fault-injection attacks.

(d) Limited Randomness. The deployment of modern probabilistic cryptosystem and itsprotection against physical attacks requires the use of randomness to avoid semantic andphysical leakage of information. For small devices, this requires the utilization of a (true)random number generator that is costly and often slow in performance. It is thereforeimportant to reduce the required amount of randomness to a minimum for each invocationof a cryptographic operation.

1.3 Research Directions for Small Devices

Open research questions that should be covered in the next years:

(a) What cryptographic construction is an optimal fit considering the computational andstorage constraints of embedded systems? Lattice-based cryptography seems a promisingdirection, is there anything beyond?

(b) Considering the use of classic cryptography, what can be considered as optimal efficiencywith respect to Elliptic Curve Cryptography over prime fields? Is optimal performancethe best criterion to formulate evidence of rigidity of the construction?

Page 23: Cryptographic protocols for small devices

D2.3 — Cryptographic protocols for small devices — New Challenges and Directions 17

(c) Given the early stage of cryptanalysis of lattice-based cryptography, what is a safe choicefor security parameters that offers sufficient (mid-term/long-term) security, still respect-ing the constraints of small devices? What are the implications of sufficiently largequantum computers on such parameters?

(d) What countermeasures are efficient for lattice-bassed construction to thwart side-channeland fault-injection attacks? Are there possibilities to combine both? How can side-channel leakage during discrete Gaussian sampling be avoided?

(e) How can we reduce the amount of costly (uniform/Gaussian) randomness involved incryptographic operations to ensure its semantic and physical security?

Page 24: Cryptographic protocols for small devices

18 ECRYPT-CSA

Page 25: Cryptographic protocols for small devices

Chapter 2

Protocol and Primitive Level

For public-key cryptography, we strongly recommend to only consider protocols which areformally analyzed in the provable security framework. In this framework one usually firstdefines a meaningful security model that properly depicts the adversary’s goal to break thescheme, and its capabilities. Next, one proposes a scheme. Finally, one gives a formal securityproof showing that the scheme’s security (in the defined security model) only depends on thehardness of some well-studied mathematical problem (such as factoring, computing discretelogarithms, or finding a short vector on a lattice).

2.1 Protocols based on Elliptic Curves

On the protocol and primitive level, most of the recent research focus was on cryptographyfrom new hardness assumptions, such as assumptions related to lattices and codes. Protocolsbased on classical assumptions such as the hardness of breaking the discrete logarithm overelliptic curves are nowadays considered to be well understood. We can still mention someimportant open problems in the area.

(a) Extend the functionality of such public-key schemes while keeping in mind the limitedresources of (high-end) small devices such as smart cards. For concreteness, can weimprove the efficiency of identity-based encryption (more generally, functional encryption)such that it can be implemented on a smart card?

(b) Revisit existing and employed protocols and their security reductions in terms of tightness,in particular in more realistic multi-user environments.

2.2 Protocols based on new Assumptions

Lattice-based digital signatures have had a bad start in cryptography. Earlier proposalssuch as GCH [27] and NTRUSign [17] have been completely broken due to their flaws in thead-hoc design approach. This has changed by the introduction of new hard mathematicalproblems such as LWE [46] and SIS, which allowed mathematically elegant and provablysecure schemes. Extending the research on to cyclic and ideal lattices [41] furthermore helpedmaking the parameters considerably smaller, leading to more efficient schemes. For digitalsignatures, the most efficient schemes [38, 39, 29, ?] based on the Ring-LWE problem in the

19

Page 26: Cryptographic protocols for small devices

20 ECRYPT-CSA

random oracle model. For a security level of 100 bits, signatures and key-sizes are roughly10, 000 bits longs [29], which brings the schemes close to practicality on standard PCs.

Besides digital signatures, public-key encryption and (interactive) key exchange arearguably the most important cryptographic primitives. For key exchange several recent pro-posals have been made, for example [1, 8, 15].

In an non-interactive identity-based key exchange protocol, each user is identifiedwith a unique identity, such as an email address, an IP address, or a MAC address. Thekey-distribution center, holding a master secret key, establishes user secret keys to particularidentities. Using the first user’s identity and the second user’s user secret key one can, withoutinteraction, establish a common session key. This primitive is of high relevance to industry.For example, Philips Research has a research group dedicated to this topic. There existsseveral proposals in the Diffie-Hellman setting over elliptic curves. The main drawback ofthese schemes is simply that discrete exponentiation is too costly on small devices. Thisdrawback extends to schemes involving pairings. Some relevant examples are the schemesand related constructions in [13, 47, 21, 25]. The scheme by Blundo et al. [13] provides aninformation-theoretically secure solution to the problem with the drawback that it has lowcollusion-resistance. Building on the latter scheme, HIMMO [26] gives a computationally-secure adaption of the Blundo et al. protocol with still high performance. Its provablesecurity from standard assumptions, however, remains unclear.

(a) Lower the parameter sizes of digital signature schemes, while preserving its efficiencyand provable security. For small devices an improvement by a factor of at least twocompared to the currently best schemes is highly desirable in order to be practical inmany application settings. At least for encryption, one approach to improve bandwidthis to apply non-trivial codes. Similar ideas deserve to be explored for signatures.

(b) Multivariate polynomials have already proved to be useful for use on small devices [14]but almost all practical schemes are ad-hoc and not provably secure. Can we build apractical and provably secure signature scheme from hard problems over multivariatepolynomials?

(c) Most of the basic lattice-based encryption schemes are only semantically secure. For someof them it remains to find a chosen-ciphertext secure variant with minimal overhead anda tight security reduction. For small devices the use of the random oracle heuristic isrecommended.

(d) Can hash-based signatures such as SPHINCS [11] be made more efficient? In particular,can the signature size of currently 41 KB be lowered?

(e) An important research direction is to extend the Blundo et al. [13] non-interactive identity-based key-exchange protocol to the computational setting in a way that its efficiency ispreserved while its security can be provably based on standard assumptions. The HIMMOscheme [26] can be seen as an extension for the Blundo et al. scheme to the computationalsetting using lattices. What is its real-world security?

2.3 Security Models for Small Devices

A security model is usually defined through a game played with an adversary. During thisgame he can make an arbitrary number of queries to the cryptographic primitive from which

Page 27: Cryptographic protocols for small devices

D2.3 — Cryptographic protocols for small devices — New Challenges and Directions 21

he tries to learn some secret information. In asymptotic terms, the number of queries isrequired to by polynomially bounded, suggested bounds on the queries are usually in therange of 240 (online) and 260 (offline).

For specific scenarios in which small devices are frequently used, such traditional securitymodels do no longer depict the attackers reality. The key observation is that an attackeragainst low-end small devices can be assumed to be limited in his capabilities since, unlikein traditional security models, he only has limited access to the device. Such an assumptionis justified for two reasons. Firstly, in order to access a low-end small device, an adversarymust have physical proximity to it — a rare event in most environments. Secondly, once anadversary has unlimited access to a low-end small device he could mount all kinds of physicalattacks (including reverse-engineering of the secret key) on the device. Due to the extremeresource limitations, such attacks would almost certainly lead to a complete break of thedevice.

The main open problem is as follows.

(a) Do there exist reasonable security models that properly depict the real-world security ofsmall devices.

For concreteness, we will now mention some of the possible adversarys limitations thatcan be integrated in the security models.

• Partial access to communication. Here it is assumed that the cryptographic ob-jects (or, more generally, the communication between the honest parties executing acryptographic protocol) can only be accessed partially by the adversary. This can bemodeled by using information-theoretic measures, for example by letting the adversaryspecify an arbitrary leakage function f : {0, 1}n → 0, 1` outputting ` bits of the com-munication in each round, for a fixed bound `. There are connections to similar modelsintroduced in security against side-channel attacks [23, 50] and the bounded retrievalmodel [20, 22].

• Limited access to the device. Here it is assumed that the device can only be accessedby an adversary for a limited amount of times, allowing him to interact with it for an apriori bounded number. In traditional security models, once the bound is reached, it isassumed that the small device interacts in private with a valid server. This assumptionmay sound a bit unrealistic but it can actually be enforced by putting the device in aspecial sleep mode after a fixed number of protocol runs.

• Detection models. Often it is sufficient to ensure security or privacy to only a minimalextent as long as any adversarial behavior can be detected. In that case countermeasurescan be taken, e.g. making use of a shut-down function which is quite common amonglow-end RCDs.

Furthermore, one can also consider integrating physical attack into the security model(side-channel or tampering attacks).

Page 28: Cryptographic protocols for small devices

22 ECRYPT-CSA

Page 29: Cryptographic protocols for small devices

Chapter 3

Fundamental Research

Several fundamental primitives and hardness assumptions on which modern public-key pro-tocols on small devices rely on are not very well understood. This is in particular the casefor lattice-based cryptography.

(a) For many lattice-based protocols, the error sampling algorithm is the bottleneck sincethe Gaussian error distribution has to be approximated. Can we find alternative, moreefficient, sampling algorithms with the same provable security guarantees as Gaussiansampling? In particular, it is unclear what is the security impact of non-Gaussian errordistributions for lattice-based schemes. Loose asymptotic reduction exists for replacingGaussian by easily sampleable ones, as well as rather ad-hoc tight ones [1, 15], but itis unclear from a cryptanalytic point of view if this loss of security actually happens.Moreover, it is also theoretically allowed to replace random errors by deterministic ones.This variant, called Learning with Rounding (LWR) enjoys worst-case hardness [3] andrecent work seems to also cover the Ring and Module versions [2].

(b) The security of practical Ring-LWE instances seems not fully understood yet. Recent ad-vances on quantum algorithms have discovered a gap between the hardness of Ring-LWEand general LWE. In this regard, it seems wise to start implementing fallback options, con-sidering Module-LWE [34] for example, or Ring-LWE with other rings than cyclotomics.The same holds for the security of practical instances of multi-variate cryptography anddecoding structured linear codes.

23

Page 30: Cryptographic protocols for small devices

24 ECRYPT-CSA

Page 31: Cryptographic protocols for small devices

Bibliography

[1] E. Alkim, L. Ducas, T. Pppelmann, and P. Schwabe. Post-quantum key exchange - anew hope. Cryptology ePrint Archive, Report 2015/1092, 2015. http://eprint.iacr.

org/2015/1092.

[2] J. Alperin-Sheriff and D. Apon. Dimension-preserving reductions from lwe to lwr. Cryp-tology ePrint Archive, Report 2016/589, 2016. http://eprint.iacr.org/2016/589.

[3] A. Banerjee, C. Peikert, and A. Rosen. Pseudorandom functions and lattices. InD. Pointcheval and T. Johansson, editors, EUROCRYPT 2012, volume 7237 of LNCS,pages 719–737. Springer, Heidelberg, Apr. 2012.

[4] P. Barrett. Implementing the rivest shamir and adleman public key encryption algo-rithm on a standard digital signal processor. In Proceedings on Advances in cryptology—CRYPTO ’86, pages 311–323, London, UK, 1987. Springer-Verlag.

[5] D. Bernstein. Curve25519: New Diffe-Hellman Speed Records. In M. Yung, Y. Dodis,A. Kiayias, and T. Malkin, editors, 9th International Conference on Theory and Prac-tice in Public-Key Cryptography - PKC 2006, New York, NY, USA, April 24–26,2006. Proceedings, volume 3958, pages 207–228, 2006. http://cr.yp.to/papers.html\#curve25519.

[6] D. J. Bernstein, P. Birkner, M. Joye, T. Lange, and C. Peters. Twisted edwards curves. InS. Vaudenay, editor, Progress in Cryptology – AFRICACRYPT 2008, First InternationalConference on Cryptology in Africa, Casablanca, Morocco, June 11–14, 2008. Proceed-ings, volume 5023 of Lecture Notes in Computer Science, pages 389–405. Springer-VerlagBerlin Heidelberg, 2008. http://cr.yp.to/papers.html\#twisted.

[7] D. J. Bernstein, P. Birkner, M. Joye, T. Lange, and C. Peters. Twisted Edwards curves.In Progress in Cryptology — AFRICACRYPT 2008, volume 5023 of Lecture Notes inComputer Science, pages 389–405. Springer, 2008.

[8] D. J. Bernstein, C. Chuengsatiansup, T. Lange, and C. van Vredendaal. Ntru prime.Cryptology ePrint Archive, Report 2016/461, 2016. http://eprint.iacr.org/2016/

461.

[9] D. J. Bernstein, N. Duif, T. Lange, P. Schwabe, and B.-Y. Yang. High-speed high-security signatures. In B. Preneel and T. Takagi, editors, Cryptographic Hardware andEmbedded Systems – CHES 2011, 13th International Workshop, Nara, Japan, September28 – October 1, 2011. Proceedings, volume 6917 of Lecture Notes in Computer Science,pages 124–142. Springer-Verlag Berlin Heidelberg, 2011. see also full version [10].

25

Page 32: Cryptographic protocols for small devices

26 ECRYPT-CSA

[10] D. J. Bernstein, N. Duif, T. Lange, P. Schwabe, and B.-Y. Yang. High-speed high-security signatures. Journal of Cryptographic Engineering, 2(2):77–89, 2012. http:

//cryptojedi.org/papers/\#ed25519, see also short version [9].

[11] D. J. Bernstein, D. Hopwood, A. Hulsing, T. Lange, R. Niederhagen, L. Pa-pachristodoulou, M. Schneider, P. Schwabe, and Z. Wilcox-O’Hearn. SPHINCS: Prac-tical stateless hash-based signatures. In E. Oswald and M. Fischlin, editors, EURO-CRYPT 2015, Part I, volume 9056 of LNCS, pages 368–397. Springer, Heidelberg, Apr.2015.

[12] D. J. Bernstein and P. Schwabe. NEON crypto. In E. Prouff and P. Schaumont, editors,Cryptographic Hardware and Embedded Systems - CHES 2012, volume 7428 of LectureNotes in Computer Science, pages 320–339. Springer, 2012.

[13] C. Blundo, A. De Santis, A. Herzberg, S. Kutten, U. Vaccaro, and M. Yung. Perfectly-secure key distribution for dynamic conferences. In E. F. Brickell, editor, CRYPTO’92,volume 740 of LNCS, pages 471–486. Springer, Heidelberg, Aug. 1993.

[14] A. Bogdanov, T. Eisenbarth, A. Rupp, and C. Wolf. Time-area optimized public-keyengines: Cryptosystems as replacement for elliptic curves? In E. Oswald and P. Rohatgi,editors, CHES 2008, volume 5154 of LNCS, pages 45–61. Springer, Heidelberg, Aug. 2008.

[15] J. Bos, C. Costello, L. Ducas, I. Mironov, M. Naehrig, V. Nikolaenko, A. Raghunathan,and D. Stebila. Frodo: Take off the ring! practical, quantum-secure key exchange fromlwe. Cryptology ePrint Archive, Report 2016/659, 2016. http://eprint.iacr.org/

2016/659.

[16] M. Braun, E. Hess, and B. Meyer. Using elliptic curves on rfid tags. Journal of ComputerScience and Network Security, 8:1–9, 2008. No. 2.

[17] J. Buhler, editor. Algorithmic Number Theory, Third International Symposium, ANTS-III, Portland, Oregon, USA, June 21-25, 1998, Proceedings, volume 1423 of Lecture Notesin Computer Science. Springer, 1998.

[18] C. Costello and P. Longa. FourQ: Four-dimensional decompositions on a Q-curve overthe Mersenne prime. In T. Iwata and J. H. Cheon, editors, ASIACRYPT 2015, Part I,volume 9452 of LNCS, pages 214–235. Springer, Heidelberg, Nov. / Dec. 2015.

[19] C. Costello and P. Longa. SchnorrQ: Schnorr signatures on FourQ. MSR Tech-nical Report, 2015. https://www.microsoft.com/en-us/research/publication/

schnorrq-schnorr-signatures-fourq/.

[20] G. Di Crescenzo, R. J. Lipton, and S. Walfish. Perfectly secure password protocols in thebounded retrieval model. In S. Halevi and T. Rabin, editors, TCC 2006, volume 3876 ofLNCS, pages 225–244. Springer, Heidelberg, Mar. 2006.

[21] R. Dupont and A. Enge. Provably secure non-interactive key distribution based onpairings. Discrete Applied Mathematics, 154(2):270–276, 2006.

[22] S. Dziembowski. Intrusion-resilience via the bounded-storage model. In S. Halevi andT. Rabin, editors, TCC 2006, volume 3876 of LNCS, pages 207–224. Springer, Heidelberg,Mar. 2006.

Page 33: Cryptographic protocols for small devices

D2.3 — Cryptographic protocols for small devices — New Challenges and Directions 27

[23] S. Dziembowski and K. Pietrzak. Leakage-resilient cryptography. In 49th FOCS, pages293–302. IEEE Computer Society Press, Oct. 2008.

[24] A. Faz-Hernandez, P. Longa, and A. H. Sanchez. Efficient and secure algorithms forGLV-based scalar multiplication and their implementation on GLV-GLS curves (extendedversion). J. Cryptographic Engineering, 5(1):31–52, 2015.

[25] E. S. V. Freire, D. Hofheinz, E. Kiltz, and K. G. Paterson. Non-interactive key exchange.In K. Kurosawa and G. Hanaoka, editors, PKC 2013, volume 7778 of LNCS, pages 254–271. Springer, Heidelberg, Feb. / Mar. 2013.

[26] O. Garcia-Morchon, D. Gomez-Perez, J. Gutierrez, R. Rietman, B. Schoenmakers, andL. Tolhuizen. Himmo - a lightweight collusion-resistant key predistribution scheme. Cryp-tology ePrint Archive, Report 2014/698, 2014. http://eprint.iacr.org/2014/698.

[27] O. Goldreich, S. Goldwasser, and S. Halevi. Public-key cryptosystems from lattice re-duction problems. In B. S. Kaliski Jr., editor, CRYPTO’97, volume 1294 of LNCS, pages112–131. Springer, Heidelberg, Aug. 1997.

[28] N. Gottert, T. Feller, M. Schneider, J. Buchmann, and S. A. Huss. On the design ofhardware building blocks for modern lattice-based encryption schemes. In E. Prouff andP. Schaumont, editors, CHES 2012, volume 7428 of LNCS, pages 512–529. Springer,2012.

[29] T. Guneysu, V. Lyubashevsky, and T. Poppelmann. Practical lattice-based cryptogra-phy: A signature scheme for embedded systems. In E. Prouff and P. Schaumont, editors,CHES 2012, volume 7428 of LNCS, pages 530–547. Springer, Heidelberg, Sept. 2012.

[30] H. Hisil, K. K. Wong, G. Carter, and E. Dawson. Twisted Edwards curves revisited. InAdvances in Cryptology — ASIACRYPT 2008, volume 5350 of Lecture Notes in Com-puter Science, pages 326–343. Springer, 2008.

[31] A. Hulsing. W-OTS+ – shorter signatures for hash-based signature schemes. InA. Youssef, A. Nitaj, and A.-E. Hassanien, editors, Progress in Cryptology –AFRICACRYPT 2013, volume 7918, pages 173–188, 2013.

[32] A. Hulsing, J. Rijneveld, and P. Schwabe. ARMed SPHINCS - computing a 41 KBsignature in 16 KB of RAM. In C.-M. Cheng, K.-M. Chung, G. Persiano, and B.-Y. Yang, editors, PKC 2016, Part I, volume 9614 of LNCS, pages 446–470. Springer,Heidelberg, Mar. 2016.

[33] K. Jarvinen, A. Miele, R. Azarderakhsh, and P. Longa. FourQ on FPGA: new hardwarespeed records for elliptic curve cryptography over large prime characteristic fields. InB. Gierlichs and A. Y. Poschmann, editors, Cryptographic Hardware and Embedded Sys-tems - CHES 2016, volume 9813 of Lecture Notes in Computer Science, pages 517–537.Springer, 2016.

[34] A. Langlois and D. Stehle. Worst-case to average-case reductions for module lattices.Designs, Codes and Cryptography, 75(3):565–599, 2015.

[35] R. Lindner and C. Peikert. Better key sizes (and attacks) for LWE-based encryption. InA. Kiayias, editor, CT-RSA 2011, volume 6558 of LNCS, pages 319–339. Springer, 2011.

Page 34: Cryptographic protocols for small devices

28 ECRYPT-CSA

[36] Z. Liu, H. Seo, S. S. Roy, J. Großschadl, H. Kim, and I. Verbauwhede. Efficient ring-lweencryption on 8-bit AVR processors. In T. Guneysu and H. Handschuh, editors, Crypto-graphic Hardware and Embedded Systems - CHES 2015 - 17th International Workshop,Saint-Malo, France, September 13-16, 2015, Proceedings, volume 9293 of Lecture Notesin Computer Science, pages 663–682. Springer, 2015.

[37] P. Longa. FourQNEON: faster elliptic curve scalar multiplications on ARM processors. InR. Avanzi and H. Heys, editors, Selected Areas in Cryptography - SAC 2016 (to appear),Lecture Notes in Computer Science. Springer, 2016.

[38] V. Lyubashevsky. Fiat-Shamir with aborts: Applications to lattice and factoring-basedsignatures. In M. Matsui, editor, ASIACRYPT 2009, volume 5912 of LNCS, pages 598–616. Springer, Heidelberg, Dec. 2009.

[39] V. Lyubashevsky. Lattice signatures without trapdoors. In D. Pointcheval and T. Jo-hansson, editors, EUROCRYPT 2012, volume 7237 of LNCS, pages 738–755. Springer,Heidelberg, Apr. 2012.

[40] V. Lyubashevsky, C. Peikert, and O. Regev. On ideal lattices and learning with errorsover rings. In H. Gilbert, editor, EUROCRYPT 2010, volume 6110 of LNCS, pages 1–23.Springer, 2010.

[41] V. Lyubashevsky, C. Peikert, and O. Regev. On ideal lattices and learning with errorsover rings. In H. Gilbert, editor, EUROCRYPT 2010, volume 6110 of LNCS, pages 1–23.Springer, Heidelberg, May 2010.

[42] P. L. Montgomery. Speeding the Pollard and elliptic curve methods of fac-torization. Mathematics of Computation, 48(177):243–264, 1987. http:

//www.ams.org/journals/mcom/1987-48-177/S0025-5718-1987-0866113-7/

S0025-5718-1987-0866113-7.pdf.

[43] T. Poppelmann and T. Guneysu. Towards practical lattice-based public-key encryptionon reconfigurable hardware. In Selected Areas in Cryptography–SAC 2013, pages 68–85.Springer, 2013.

[44] T. Poppelmann and T. Guneysu. Area optimization of lightweight lattice-based en-cryption on reconfigurable hardware. In Circuits and Systems (ISCAS), 2014 IEEEInternational Symposium on, pages 2796–2799. IEEE, 2014.

[45] T. Poppelmann, T. Oder, and T. Guneysu. High-performance ideal lattice-based cryptog-raphy on 8-bit atxmega microcontrollers. In K. E. Lauter and F. Rodrıguez-Henrıquez,editors, Progress in Cryptology - LATINCRYPT 2015 - 4th International Conferenceon Cryptology and Information Security in Latin America, Guadalajara, Mexico, Au-gust 23-26, 2015, Proceedings, volume 9230 of Lecture Notes in Computer Science, pages346–365. Springer, 2015.

[46] O. Regev. On lattices, learning with errors, random linear codes, and cryptography. InH. N. Gabow and R. Fagin, editors, 37th ACM STOC, pages 84–93. ACM Press, May2005.

Page 35: Cryptographic protocols for small devices

D2.3 — Cryptographic protocols for small devices — New Challenges and Directions 29

[47] R. Sakai, K. Ohgishi, and M. Kasahara. Cryptosystems based on pairing. In SCIS 2000,Okinawa, Japan, Jan. 2000.

[48] P. Sasdrich and T. Guneysu. Efficient elliptic-curve cryptography using curve25519 onreconfigurable devices. In D. Goehringer, M. Santambrogio, J. Cardoso, and K. Bertels,editors, Reconfigurable Computing: Architectures, Tools, and Applications, volume 8405of Lecture Notes in Computer Science, pages 25–36. Springer International Publishing,2014.

[49] P. Sasdrich and T. Guneysu. Implementing Curve25519 for side-channel-protected ellip-tic curve cryptography. ACM Transactions on Reconfigurable Technology and Systems,9(1):Art. 3, 2015.

[50] F.-X. Standaert, T. Malkin, and M. Yung. A unified framework for the analysis of side-channel key recovery attacks. In A. Joux, editor, EUROCRYPT 2009, volume 5479 ofLNCS, pages 443–461. Springer, Heidelberg, Apr. 2009.