D J Campbell

M Frachet

S Benhabib

I Gilmutdinov

C Proust

T Kurosawa

N Momono

M Oda

M Horio

K Kramer

J Chang

M Ichioka

D Leboeuf

Evidence for a square-square vortex lattice transition in a high-T c cuprate superconductor

Using sound velocity and attenuation measurements in high magnetic fields, we identify a new transition in the vortex lattice state of La2-xSrxCuO4 (LSCO). The transition, observed in magnetic fields exceeding 35 T and temperatures far below zero field Tc, is detected in the compression modulus of the vortex lattice, at a doping level x = p = 0.17. Our theoretical analysis based on Eilenberger theory of vortex lattice shows that the transition corresponds to the long-sought 45 • rotation of the square vortex lattice, predicted to occur in d-wave superconductors near a van Hove singularity.

The band structure of 2D metals hosts special points, known as van Hove singularities (vHS), where the density of states diverges. When the Fermi level is tuned towards a vHS, interesting phenomena occur in the form of electronic instabilities and strongly correlated electron physics. This is exemplified in twisted bilayer graphene, where proximity to a vHS at certain "magic angles" [START_REF] Yuan | Magic of high-order van Hove singularity[END_REF] can stabilize unconventional superconductivity [START_REF] Cao | Unconventional superconductivity in magic-angle graphene superlattices[END_REF] and correlated insulating states [START_REF] Cao | Correlated insulator behaviour at half-filling in magic-angle graphene superlattices[END_REF]. In Sr 2 RuO 4 a vHS can be tuned to the Fermi level with chemical substitution or strain, yielding a dramatic increase of superconducting T c [START_REF] Hicks | Strong Increase of Tc of Sr2RuO4 Under Both Tensile and Compressive Strain[END_REF], and non-Fermi liquid behaviour [START_REF] Burganov | Strain control of fermiology and many-body interactions in two-dimensional ruthenates[END_REF][START_REF] Barber | Resistivity in the Vicinity of a van Hove Singularity: Sr2RuO4 under Uniaxial Pressure[END_REF]. Finally, in high-T c cuprate superconductors, the closing of the notorious pseudogap has been associated with doping through a vHS [START_REF] Benhabib | Collapse of the Normal-State Pseudogap at a Lifshitz Transition in the Bi2Sr2CaCu2O 8+δ Cuprate Superconductor[END_REF].

In 2D type-II superconductors with d-wave gap symmetry, the proximity to a vHS results in unique behaviour of the vortex lattice (VL). Generally, at low enough fields, a triangular vortex lattice minimizes the dominant electromagnetic interactions [START_REF] Kleiner | Bulk Solution of Ginzburg-Landau Equations for Type II Superconductors: Upper Critical Field Region[END_REF]. With increasing field, the intervortex distance decreases and anisotropies in the electronic structure and/or superconducting gap become relevant. They produce anisotropic screening currents and field distributions around vortices that modify the symmetry and orientation of the VL with respect to the crystallographic axes. In a system where the d-wave gap anisotropy is dominant, such as YBa 2 Cu 3 O y (YBCO), a square VL with nearest-neighbours along the nodal direction is expected [START_REF] Ichioka | Field dependence of the vortex structure in d-wave and s-wave superconductors[END_REF], as observed with small angle neutron scattering (SANS) [START_REF] Keimer | Vortex Lattice Symmetry and Electronic Structure in YBa2Cu3O7[END_REF][START_REF] Brown | Triangular to Square Flux Lattice Phase Transition in YBa2Cu3O7[END_REF]. On the other hand, in LSCO close to optimal doping, proximity to a vHS induces a significant Fermi velocity (v F ) anisotropy that in turn stabilizes a square VL with nearest neighbour direction oriented along the Cu-O bond at low field. [START_REF] Gilardi | Direct Evidence for an Intrinsic Square Vortex Lattice in the Overdoped High-Tc Superconductor La1.83Sr0.17CuO 4+δ[END_REF][START_REF] Chang | Spin density wave induced disordering of the vortex lattice in superconducting La2-xSrxCuO4[END_REF].

The presence of a d-wave gap and four-fold Fermi velocity anisotropy are the ingredients of a long-standing theoretical prediction. Using the Eilenberger theory of the VL [START_REF] Eilenberger | Transformation of Gorkov's equation for type II superconductors into transport-like equations[END_REF], Nakai et al. predicted that in a sufficiently large magnetic field, the vortex lattice will rotate 45 • , through a first order phase transition, changing the nearest neighbour vortex alignment from along the minima in v F to the minima in the superconducting gap ∆. It is thus predicted that eventually, as the upper critical field is approached, the superconducting gap anisotropy dictates the square lattice coordination [START_REF] Nakai | Reentrant Vortex Lattice Transformation in Fourfold Symmetric Superconductors[END_REF].

The d-wave superconductor LSCO near its dopinginduced Lifshifz transition is a promising candidate material to display such physics. However, the unconventional electronic properties that typify high-T c cuprates, call into question the applicability of conventional theories for vortex physics. The prediction of a field-induced squaresquare vortex lattice rotation thus stands as an important test of such theories. Experimentally, this is however a challenging task. Being an extreme type-II superconductor, a large portion of the LSCO field-temperature phase diagram is dominated by a vortex liquid. Scanning tunneling microscopy (STM), traditionally used to image the VL [START_REF] Zhou | Visualizing nodal heavy fermion superconductivity in CeCoIn5[END_REF], is not applicable to LSCO as high quality surfaces have not been established. The weak neutron-matter interaction requires SANS experiments to be carried out using DC-magnets to obtain sufficient counting statistics. This fact has prevented SANS to access field strengths of interest. Ultrasound offers a solution to all those challenges: it is sensitive to the elasticity of the VL and can be measured in pulsed magnetic fields, which cover a larger field range.

Here we present an ultrasound study of the VL of LSCO up to 65 T and down to 1.5 K. We find a new elastic anomaly, marked by a sudden jump in sound velocity, just prior to the melting of the VL, at our lowest measured temperatures. Measuring doping levels from p = 0.10 to p = 0.215, we see it only at p = 0.17 (T c = 38 K). Moreover, the transition is only observed in the in-plane compression mode, leaving other modes The change in sound velocity of the in-plane longitudinal mode (called c11) of a LSCO p = 0.17 crystal at different temperatures, as a function of field applied along the c-axis. All data are from pulsed field downsweeps, except the lowest temperature curve which is an upsweep in a DC field magnet. This curve shows a serie of spikes above 5 T or so, associated with flux jumps. Curves have been offset vertically (though not by a constant amount). The arrow marks the field of the anomaly, Banom, which is visible but more subtle up to 1.90 K in the sound velocity, and the depinning field B dp . Measurements were taken at frequencies of 155 MHz in pulsed field and 127 MHz in DC field. (b) Temperature-magnetic field phase diagram, showing the area covered by ultrasound measurements in different magnet systems and the location of the anomaly (blue) and vortex melting (red). Dashed lines are guides to the eye.

unaffected. Given the absence of any sharp electronic phase transition in this temperature-field range, and the fact that the transition is only seen within the VL state, we conclude that the feature can only come from a change in the VL structure. Using Eilenberger equations along with a realistic tight-binding model of the electronic structure of LSCO p = 0.17, we show that a squaresquare first order transition is expected in the field and temperature range where the ultrasound anomalies are observed. We hence conclude that the transition detected in ultrasound in LSCO p = 0.17 is the long-sought square-square VL transformation.

Data were taken at the two sites of the French National High Magnetic Field Laboratory (LNCMI). Pulsed field measurements up to 65 T and down to 1.5 K were made at the Toulouse site, and DC field measurements up to 36 T and down to 370 mK in Grenoble. Field was always applied along the c-axis. The change in sound velocity ∆v/v (equal to 1 2 ∆c ij /c ij for high symmetry modes, with c ij the corresponding elastic constant) and sound attenuation ∆α were tracked using a pulse-echo technique after gluing LiNbO 3 transducers to the sides of polished and oriented samples. Hole doping levels are estimated using the high temperature tetragonal-low temperature othorhombic (HTT-LTO) transition temperature determined with sound velocity [START_REF] Frachet | Hidden magnetism at the pseudogap critical point of a cuprate superconductor[END_REF].

The elastic tensor of the triangular VL found in conventional type-II superconductors is made up of three independent elastic moduli (assuming a field along the c-axis):

a compression modulus c v L = c v 11 -c v 66 , a tilt modulus c v
44 and a shear modulus c v 66 (the Voigt notation is used, see [START_REF] Campbell | Flux vortices and transport currents in type II superconductors[END_REF][START_REF] Brandt | The flux-line lattice in superconductors[END_REF] for reviews). The shear modulus decreases with increasing field and goes to zero at the melting point of the VL [START_REF] Labusch | Elastische Konstanten des Flußfadengitters in Supraleitern zweiter Art[END_REF][START_REF] Labusch | Elastic Constants of the Fluxoid Lattice Near the Upper Critical Field[END_REF]. On the other hand,

c v L = B 2 4π dH dB and c v 44 = BH 4π (in CGS units).
Since our work focuses on properties well above the lower critical field, we assume that the magnetic induction is nearly equal to the applied field. In the field range considered here (B ∼ 1 2 B c2 ), and for extreme type-II superconductors such as LSCO (κ ≈ 100), the ratio of

c v 66 to c v 44 or c v 11 is of order 1 10 κ 2 ≈ 10 -5 [18]. Consequently c v 66 << c v 11 = c v 44 ≈ B 2 /4π.
In the following we discuss the VL properties of LSCO p = 0.17 which has square coordination for B > 0.4 T [START_REF] Gilardi | Direct Evidence for an Intrinsic Square Vortex Lattice in the Overdoped High-Tc Superconductor La1.83Sr0.17CuO 4+δ[END_REF][START_REF] Chang | Spin density wave induced disordering of the vortex lattice in superconducting La2-xSrxCuO4[END_REF]. In contrast to the triangular VL, the square VL has four independent moduli and the compression modulus is

c v L = (c v 11 + c v 12 )/2.
The different elastic constants of the square and hexagonal VL probed for different propagation and polarization directions used here are listed in Table I.

Pinning of the flux lines is responsible for the coupling between the crystal lattice and the VL. This coupling makes it possible to measure the elastic and pinning properties of the VL with ultrasounds. When the VL is pinned, the sound velocity v s has a contribution from the VL: ρv 2 s = c c ij + ∆c v ij , with ρ the mass density and c c ij the crystal lattice elastic modulus. In the early 90's, Pankert et al. developed a phenomenological model based on thermally assisted flux flow (TAFF) to describe the influence of the VL on the ultrasound properties in cuprate superconductors [START_REF] Pankert | Ultrasonic attenuation in the mixed state of high-tc superconductors[END_REF]. The model has been successfully applied to several cuprates, including LSCO [START_REF] Pankert | Ultrasonic attenuation by the vortex lattice of high-Tc superconductors[END_REF][START_REF] Lemmens | Ultrasonic attenuation by the vortex lattice of Bi1.6Pb0.4Sr2Ca2Cu3[END_REF][START_REF] Hanaguri | Elastic properties and anisotropic pinning of the flux-line lattice in single-crystalline La1.85Sr0.15CuO4[END_REF]. Within this model, ∆c v ij is given by the VL elastic moduli c v ij , renormalized by the VL dynamics associated with the TAFF model.

Data in the c 11 mode of LSCO p = 0.17 at 2.2 K (Fig. 1) illustrate the expected behaviour as a function of magnetic field. In this mode, with field along the c-axis, we probe the compression modulus of the VL (see Table I). At low fields, the VL is pinned, such that the sound velocity change follows roughly the B 2 increase of the VL compression modulus. At 40 T or so, a step-like decrease is observed in the sound velocity. It corresponds to the ) shows a broad peak at this depinning field, as also expected within the TAFF model. The broad peak is combined with a monotonic background related in part to the gradual suppression of the superconducting gap [START_REF] Ikushima | Effects of Magnetic Field on the Ultrasonic Attenuation in Superconducting Niobium[END_REF][START_REF] Kudo | On the magnetic-field dependence of the longitudinal ultrasonic attenuation in a type-II superconductor[END_REF].

vortex lattice c v ij v v g c11 [100] [100] c c 11 c v 11 c v 11 (c v 11 + c v 12 + 2c v 66 )/2 L110 [110] [110] (c c 11 + c c 12 + 2c c 66 )/2 c v 11 (c v 11 + c v 12 + 2c v 66 )/2 c v 11 c44 [
Below 2 K we see another elastic anomaly emerge, in the form of a smaller but more sudden dip at 1.5 K just below 40 T, and a more subtle change in the signal through 1.9 K (see derivative of ∆v/v with respect to B in Fig. S1 [26] where the anomaly is more visible throughout the temperature range). The field at which this feature appears also slightly increases, up to about 43 T. There is a small uptick in the attenuation at the same field [26]. The new elastic anomaly shows hysteretic behaviour between the up and downsweep of the pulsed field (Fig. S6 [26]). The phase diagram in Fig. 1(b) shows the field of this feature (B anom , defined as the dip in the derivative shown in Fig. S1 [26]), as well as the vortex depinning line (B dp , defined as the peak in ∆α(B)). Though the trend line would make it seem as if the anomaly should be observed at low field and lower temperature, no similar behavior was seen down to 0.37 K in DC field measurements up to 36 T on the same sample. This surprising observation has a natural explanation that will be given later.

Although we investigated other elastic modes for a similar anomaly, it is only present in c 11 . Figure 2(a) shows a comparison of c 11 to two other configurations at 1.5 K, either for the same sample or one cut from the same original piece. Neither of the other two show an anomaly, and in fact these modes both have a very weak response between low field and 30 T, demonstrating that they are much less sensitive to the vortex lattice. We have probed the L110 mode (see Table I) of LSCO p = 0.17, but the signal in this configuration is strongly attenuated below the HTT-LTO structural transition, resulting in a poor signal-to-noise ratio and preventing us from detecting an anomaly (Fig. S2 [26]). We have also measured the c 11 mode of other dopings of LSCO [Fig. 2(b)]. All are qualitatively similar, with an increase in the mixed state and dropoff at their corresponding B dp . However, the only one with an anomaly before the depinning field

FIG. 2. (a)

A comparison of the field dependence of three different ultrasound modes of the same LSCO p = 0.17 single crystal used in Fig. 1, taken at 1.5 K, from downsweeps in pulsed field measurements. (b) and (c) Pulsed field data comparing the c11 mode for six different LSCO doping levels. Arrows mark the decrease associated with vortex lattice depinning at B dp . Note that p = 0.10 and 0.11 data are at 4.2 K, all the others are at 1.5 K. The VL contribution appears on top of a background sound velocity, which is associated with the field-dependent electronic properties of LSCO such as superconductivity and magnetism [START_REF] Frachet | High magnetic field ultrasound study of spin freezing in La1.88Sr0.12CuO4[END_REF][START_REF] Nohara | Unconventional lattice stiffening in superconducting La2-x Srx CuO4 single crystals[END_REF]. This nonvortex background is significant for p ≤ 0.145 but diminishes smoothly with doping. At low fields, flux jumps appear as a sequence of spikes in the sound velocity of samples with p ≤ 0.145. Only p = 0.17 shows the new elastic anomaly.

is p = 0.17, establishing the uniqueness of this doping.

In LSCO p = 0.17, a spin-glass is present in high magnetic fields; it is characterized by a gradual slowing down of spin fluctuations that produces the smooth softening of the T110 mode (Fig. 2(a)) [START_REF] Frachet | Hidden magnetism at the pseudogap critical point of a cuprate superconductor[END_REF]. The new sharp fea-ture observed in the c 11 mode is consequently unlikely to be related to this gradual magnetic freezing. Moreover, the transition is only observed in the in-plane compression mode c 11 , suggesting it is not a structural transition of the crystal lattice. Instead, it is what we expect for a transition in the vortex lattice, as c 11 is the most sensitive mode to the VL elasticity. It measures the compression modulus of the VL, whereas the c 44 mode does not couple to the VL, and T110 probes the VL shear modulus c v 66 (see Table I), the value of which is well below our resolution. All these observations, along with the fact that the new feature only exists within the pinned vortex solid phase bounded by the red points in Fig. 1(b), suggest that the new anomaly has its origin in VL physics.

Since the vortex depinning field is unchanged with the appearance of the feature, an ordered and pinned VL is presumably still present above B anom , with only its elasticity or coupling to the crystal lattice being modified. The transition is remarkably sharp, with indication of hysteresis as shown in Fig. S6 [26], pointing to a first order phase transition. The most likely explanation is a structural transformation of the VL. Ultrasound should be sensitive to such transitions, which are expected to involve either a change in elasticity or pinning strength. Indeed, ultrasound has been used to observe a known 45 • rotation of the hexagonal vortex lattice and a rhombicsquare transition in YNi 2 B 2 C at low fields [START_REF] Ishikawa | Ultrasound velocity measurements in the vortex-state of YNi2B2C[END_REF]. In LSCO p = 0.17, the VL structure goes from hexagonal to square at very low field (< 0.5 T) with nearest-neighbour direction aligned along the Cu-O directions [START_REF] Gilardi | Direct Evidence for an Intrinsic Square Vortex Lattice in the Overdoped High-Tc Superconductor La1.83Sr0.17CuO 4+δ[END_REF][START_REF] Chang | Spin density wave induced disordering of the vortex lattice in superconducting La2-xSrxCuO4[END_REF][START_REF] Drew | µSR measurements on the vortex lattice of La1.83Sr0.17CuO4[END_REF]. This square VL configuration, presented as v in Fig. 3, is at odds with expectations for a d-wave superconductor [START_REF] Ichioka | Field dependence of the vortex structure in d-wave and s-wave superconductors[END_REF], but can be explained by taking into account the anisotropy in Fermi velocity resulting from the proximity to the vHS. The interplay between superconducting gap and Fermi surface anisotropy has previously been investigated with Eilenberger theory [START_REF] Nakai | Reentrant Vortex Lattice Transformation in Fourfold Symmetric Superconductors[END_REF]. The calculations showed that at higher fields, further transformations are expected: the v can either transition to a hexagonal lattice, or to a gap-centered square lattice g -the latter being, in essence, a 45 • rotation.

We have performed theoretical calculations following up on Ref. [START_REF] Nakai | Reentrant Vortex Lattice Transformation in Fourfold Symmetric Superconductors[END_REF] based on a 2D tight binding model, with parameters specific to LSCO p = 0.17 obtained via angleresolved photoemission spectroscopy (ARPES) [26,[START_REF] Chang | Anisotropic quasiparticle scattering rates in slightly underdoped to optimally doped high-temperature La2-xSrxCuO4 superconductors[END_REF]. We evaluate the free energy for a given VL shape, after calculating the vortex state with Eilenberger theory [26]. Closer to zero field T c the triangular phase is present, but below about 0.3T c (≈ 13 K) only square-square transitions will occur with changing field. From the condition that the free energy increases with a small deformation of the square VL, we can determine the regions (denoted A-D in Fig. 3(b)) where the v and g VL are stable. At low temperature and field (regions C and D) the v VL is favored, as observed in prior experiment [START_REF] Gilardi | Direct Evidence for an Intrinsic Square Vortex Lattice in the Overdoped High-Tc Superconductor La1.83Sr0.17CuO 4+δ[END_REF]. At higher fields (regions A and B), the contribution of the Fermi surface anisotropy becomes weaker and the influence of the gap structure favors a g VL orientation [START_REF] Nakai | Reentrant Vortex Lattice Transformation in Fourfold Symmetric Superconductors[END_REF]. Because the reorientation is a first order transition, VL configurations can have a wide range of metastability within which they can resist temperature or field fluctuations before transitioning to the more energetically favorable configuration [START_REF] Louden | Nonequilibrium structural phase transitions of the vortex lattice in MgB2[END_REF]. Consequently, in regions B and C the unfavored VL configuration ( v and g , respectively) can still exist in a metastable state. This means that for downsweeps of pulsed field measurements the g VL configuration survives in region C until it undergoes a first order transition to the v VL at the C-D boundary (orange circles in Fig. 3). In contrast, in static field measurements, where magnetic field is swept more slowly, the transition is expected at higher field, at the B-C boundary (brown circles).

The theory qualitatively explains the absence of any transition in the DC field measurements. It should only be found at fields above B anom obtained from pulsed field downsweeps. In contrast with Ref. [START_REF] Nakai | Reentrant Vortex Lattice Transformation in Fourfold Symmetric Superconductors[END_REF] which found a reentrant hexagonal phase at low T between the two square VL configurations, our calculation yields a single, first order transition in LSCO p = 0.17 at low T , as observed experimentally. As noted, a comparison of the up and downsweeps of the field pulse shows evidence for hysteresis (Fig. S6 [26]), indicating the first order character of the transition. The C-D boundary increases in field with T , as does B anom . The overall qualitative agreement between theory and experiment is remarkable, and we hence conclude that the ultrasound anomaly at B anom in LSCO p = 0.17 corresponds to a transition from v VL to g phase. There is some discrepancy between the transition field predicted by theory (C-D boundary at B/B c2 ≈ 0.4 at low T ) and the measured B anom /B c2 ≈ 0.7 at 1.5 K, with B c2 = 55 T [START_REF] Frachet | Hidden magnetism at the pseudogap critical point of a cuprate superconductor[END_REF]. This difference can be explained by at least 2 factors. First, the theoretical curve of B c2 may be suppressed at low temperatures if paramagnetic pair breaking and competing electronic orders are considered. Second, including the c-axis dispersion in the tight binding model for LSCO may quantitatively shift the C-D boundary [START_REF] Horio | Three-Dimensional Fermi Surface of Overdoped La-Based Cuprates[END_REF].

Our data show that the sound velocity in g VL is smaller than in v VL. This difference can either be due to a smaller rigidity of the g VL or enhanced pinning of the v VL. Note that we do not observe the hexagonal-tov transition reported using SANS in LSCO for p ≥ 0.145. At p = 0.17 this transition occurs at B ≈ 0.4 T [START_REF] Chang | Spin density wave induced disordering of the vortex lattice in superconducting La2-xSrxCuO4[END_REF], where the vortex contribution to sound velocity change is small and any anomaly associated with a transition is thus below the measurement resolution ∆v/v ∼ 10 -6 . Our extensive doping dependence (Fig. 2) shows that the VL structural transition only exists within a limited doping range around p = 0.17. This limitation comes partly from the fact that the VL is disordered for p ≤ 0.145 due to the presence of a spin glass phase that acts as a source of disorder for the VL However, metastable regions emerge in pulsed fields. Those regions, labeled B and C as indicated in the table in the top right, are shown with slashed lines. In rapid downsweeps of pulsed fields (as shown in Fig. 1), the transition from g VL to v VL occurs at the C-D boundary, marked by the orange line. In rapidly increasing field, the v VL would persist up to the A-B boundary (blue line). The vortex solid is unobservable with ultrasound for B > B dp . Solid circles are results of the calculation, lines connecting them are guides to the eye. The depinning transition was not taken into account for the calculations. [START_REF] Chang | Spin density wave induced disordering of the vortex lattice in superconducting La2-xSrxCuO4[END_REF]. In LSCO, the VL transition will presumably only exist for doping levels where the spin glass develops at fields larger than the VL transition field, which is the case for p = 0.17 but not for p = 0.145 [START_REF] Chang | Spin density wave induced disordering of the vortex lattice in superconducting La2-xSrxCuO4[END_REF][START_REF] Frachet | Hidden magnetism at the pseudogap critical point of a cuprate superconductor[END_REF][START_REF] Chang | Tuning competing orders in La2-xSrxCuO4 cuprate superconductors by the application of an external magnetic field[END_REF]. However, while the spin glass phase is not present in LSCO p = 0.215 [START_REF] Frachet | Hidden magnetism at the pseudogap critical point of a cuprate superconductor[END_REF], we do not observe the VL transition at this doping level either (Fig. 2). As discussed in detail in Ref. [26], the field dependence of the sound velocity at p = 0.215 in DC magnet shows a broad maximum at low field which is interpreted as a signature of a fishtail effect. The fishtail has been observed in overdoped LSCO using magnetization measurements [START_REF] Tanabe | Magnetic-Field-Induced Enhancement of the Vortex Pinning in the Overdoped Regime of La2-xSrxCuO4: Relation to the Microscopic Phase Separation[END_REF]. Its presence signals a disordered vortex state, which cannot support a VL structural transition.

In summary, we have conducted an ultrasound study of LSCO at several hole concentrations, measuring different elastic modes at low temperature in both pulsed and DC magnetic fields. For p = 0.17, we observe a novel feature in the c 11 mode deep within the mixed phase. Motivated by theoretical calculations based on Eilenberger equations using realistic tight-binding parameters, we interpret this ultrasound elastic anomaly in terms of a 45 • square vortex lattice rotation. Requiring a unique combination of d-wave superconductivity and proximity to a van Hove singularity, this square-square transition is not as widespread as the lower field rhombic-square transition [10-13, 16, 31]. Even in LSCO, a material that meets both these requirements, the VL transition presumably only exists in a restricted range of the phase diagram, due to the presence of competing electronic phases that act as sources of disorder in the VL. This being said, our results provide experimental evidence of the long standing Eilenberger theory prediction of a magnetic field induced square-to-square vortex lattice transition.

  FIG. 1. (a)The change in sound velocity of the in-plane longitudinal mode (called c11) of a LSCO p = 0.17 crystal at different temperatures, as a function of field applied along the c-axis. All data are from pulsed field downsweeps, except the lowest temperature curve which is an upsweep in a DC field magnet. This curve shows a serie of spikes above 5 T or so, associated with flux jumps. Curves have been offset vertically (though not by a constant amount). The arrow marks the field of the anomaly, Banom, which is visible but more subtle up to 1.90 K in the sound velocity, and the depinning field B dp . Measurements were taken at frequencies of 155 MHz in pulsed field and 127 MHz in DC field. (b) Temperature-magnetic field phase diagram, showing the area covered by ultrasound measurements in different magnet systems and the location of the anomaly (blue) and vortex melting (red). Dashed lines are guides to the eye.

  VL which results in the loss of the vortex contribution to the sound velocity. The ultrasound attenuation ∆α(B) (Fig.S1(a),[26]

FIG. 3 .

 3 FIG. 3. (a) (left) the Cu-O plane[START_REF] Momma | VESTA3 for three-dimensional visualization of crystal, volumetric and morphology data[END_REF] of LSCO, with the c-axis out of the page. (right) Illustrations of the hexagonal, vF -centered square and superconducting gap-centered square vortex lattices, respectively, relative to the crystal lattice, with vortices portrayed as black circles. Dashed lines mark the Cu-O-Cu bond directions, also the [100] axes of the high temperature tetragonal phase. (b) A phase diagram for p = 0.17 showing the calculated VL configurations as a function of T and B. The hexagonal phase is stable in the green-colored region at high T , low B. In regions A and D (orange and blue), one of the two square lattices is stable. The brown line (B-C boundary) marks the transition between the two square VL arrangements in slowly varying magnetic field. However, metastable regions emerge in pulsed fields. Those regions, labeled B and C as indicated in the table in the top right, are shown with slashed lines. In rapid downsweeps of pulsed fields (as shown in Fig.1), the transition from g VL to v VL occurs at the C-D boundary, marked by the orange line. In rapidly increasing field, the v VL would persist up to the A-B boundary (blue line). The vortex solid is unobservable with ultrasound for B > B dp . Solid circles are results of the calculation, lines connecting them are guides to the eye. The depinning transition was not taken into account for the calculations.

TABLE I .

 I Elastic constants of the crystal lattice (c c ij ) measured for different propagation direction k and polarization u, in the tetragonal phase. The corresponding elastic constants for the hexagonal and square vortex lattices for applied magnetic field B [001] are given. For practical purposes, in the text the different modes are referred to as c11, L110, c44 and T110.

	mode k	u	crystal lattice c c ij

ACKNOWLEDGMENTS

We thank E. M. Forgan, K. Machida and M.-H. Julien for valuable discussions. Part of this work was performed at the LNCMI-CNRS, a member of the European Magnetic Field Laboratory (EMFL). Work at LNCMI was supported by the Laboratoire d'Excellence LANEF (ANR-10-LABX-51-01), French Agence Nationale de la Recherche (ANR) grant ANR-19-CE30-0019-01 (Neptun) and EUR grant NanoX nANR-17-EURE-0009. M. H., K. K., and J.C. acknowledge support by the Swiss National Science Foundation.

SUPPLEMENTARY MATERIAL FOR

Evidence for a square-square vortex lattice transition in a high-T c cuprate superconductor D. J. Campbell 1 et al., 1 LNCMI-EMFL, CNRS UPR3228, Univ. Grenoble Alpes, Univ. Toulouse, Univ. Toulouse 3, INSA-T, Grenoble and Toulouse, France Methods Measurements up to 36 T were carried out with the resistive magnets of the French National High Magnetic Field Laboratory (LNCMI) site in Grenoble, using a 3 He refrigerator. These magnets generate a static, "DC" field that can be slowly swept or held constant. Higher fields were obtained at the LNCMI's pulsed field site in Toulouse, where measurements were performed down to 1.5 K by pumping on liquid 4 He. Field was applied along the c-axis for all experiments. The change in sound velocity was measured via the pulse-echo ultrasound method using LiNbO 3 transducers glued to polished and oriented single crystals. For high symetry modes, the change in sound velocity v directly gives the change in the elastic constant c ij (written with Voigt notation throughout the text) describing those modes, through the basic relation between the two quantities: c ij = ρv 2 , where ρ is the material density.

LSCO Sample Details

Supplementary Table S1. Values of hole doping p, high temperature tetragonal-low temperature orthorhombic (HTT-LTO) structural transition temperature Ts, and superconducting transition temperature Tc for all LSCO samples mentioned in this work. p values were determined by the Ts rather than Tc, as the former is a monotonic function of p and changes significantly more with doping. However, we used Tc in the case of the p = 0.215 sample where no structural transition was observed down to the lowest measured T . Within the text, samples have been identified by their values of p. Additional LSCO p = 0.17 Data

Figure S1(a)

shows the ultrasonic attenuation in LSCO p = 0.17, data which were obtained simultaneously with the sound velocity change data seen in Fig. 1(a) of the main text. A subtle increase and change in slope is visible in the 1.5 K attenuation data at the same field as the much more obvious ∆v/v feature. The broad peak in attenuation indicates the vortex lattice depinning.

The lower panel of Fig. S1 shows the derivatives of the sound velocity change with field for selected temperatures shown in Fig 1(a) of the main text. The feature that is more subtle above 1.5 K in those data is clearer here as a dip in the derivative, until 2.2 K where it has either disappeared or been absorbed into the higher field feature corresponding to the vortex lattice depinning. In Fig. S2 we show the results of the longitudinal diagonal mode of LSCO p = 0.17 at high field, i.e. the mode with u k [110] HTT , along with the data shown in Fig. 2(a). This mode corresponds to the (c 11 + c 12 + 2c 66 )/2 elastic constant combination. It has the same qualitative shape as the c 11 data, but the noise level is such that we cannot pick out a potential transition. The reason for the increased noise is that this mode couples strongly to the HTT-LTO transition that occurs far above base temperature (Table S1), and within the LTO phase the signal amplitude is significantly reduced.

Fig. S3 shows the field dependence of the sound velocity through T c = 37.5 ± 1 K, a much larger temperature range than in the main text. Small humps attributable to the vortex lattice depinning can still be seen at much lower field up to 20 K, but above that there is minimal change with field.

Field dependence of all measured modes of LSCO p = 0.17, as shown in Fig. 2(a) of the main text, but now including the L110. This mode is noisier because its signal is significantly reduced in amplitude below the HTT-LTO structural transition.

. The field dependence of ∆v/v of LSCO p = 0.17 sample in the c11 configuration, this time extended to higher temperatures than in Fig. 1 of the main text. Curves are separated by a constant offset. Data were taken at 133 MHz. Note that the data set presented in this figure was taken during a different run than the data set presented in Fig. 1(a), but the corresponding Banom have been added to the main text Fig. 1(b).

Calculation Details

To study potential stable vortex lattice configurations, we estimate the free energy F , after calculating the spatial structure of the vortex states by Eilenberger theory. This Eilenberger theory formalism is valid for ξ 0 k F 1, with k F the Fermi wave number and ξ 0 the superconducting coherence length. It allows us to quantitatively estimate vortex lattice parameters across the entire T and B range of the vortex state, by evaluating the vortex core structure and the contributions from neighboring vortices.

The Fermi surface of LSCO p = 0.17 in a two-dimensional tight-binding model is described by the equation

with t = 0.19 eV, t = -0.027 eV, t = 0.013 eV, and µ = -0.144 eV. The Fermi velocity v = (v x , v y ) is given by

The Fermi surface and the Fermi velocity are presented in Fig. S4. On the Fermi surface, the d x 2 -y 2 -wave pairing function is assumed to be ϕ

We assume that a magnetic field is applied to the z-axis, with B = ∇ × A and the vector potential A = 1 2 H × r + a, where H = (0, 0, H) and ∇ × a r = 0. • • • r indicates the spatial average within a unit cell of the vortex lattice. In our calculation, the unit cell of the vortex lattice is given by unit vectors r 1 = (a x , 0) and r 2 = ( 1 2 a x , a y ) with a x a y H = φ 0 , a y = 1 2 a x tan θ, and the flux quantum φ 0 . The triangular (equivalently, hexagonal) lattice with θ = 60 • is stable in isotropic s-wave superconductors. However, due to the fourfold symmetric structure of the Fermi velocity and the pairing function, the vortex lattice may take on a square, rather than triangular, shape at higher fields. To study the square lattice g in Fig. 3, we set θ = 45 • . When we consider the square lattice v , we use the Fermi surface rotated by 45 • in k space.

In a given vortex lattice shape, the spatial structure of the quasiclassical Green's functions g(ω n , k, r), f (ω n , k, r), and f † (ω n , k, r) at spatial position r and the Fermi wave number k are calculated in the vortex lattice state by the Eilenberger equations [START_REF] Eilenberger | Transformation of Gorkov's equation for type II superconductors into transport-like equations[END_REF][START_REF] Nakai | Reentrant Vortex Lattice Transformation in Fourfold Symmetric Superconductors[END_REF][START_REF] Suzuki | Generic First-Order Orientation Transition of Vortex Lattices in Type II Superconductors[END_REF]

in the clean limit, where g = (1

The length, magnetic field, and temperature are in Eilenberger units, i.e. ξ 0 = v F0 /2πk B T c , B 0 = φ 0 /2πξ 2 0 , and the transition temperature T c , respectively. The order parameter ∆(r) and the Matsubara frequency ω n are normalized in units of πk B T c . Equation (S3) is self-consistently solved with the gap equation

and the current equation In Eq. (S4), (g 0 N 0 ) -1 = ln T + 2T 0<ωn≤ωcut ω -1 n and we use ω cut = 20k B T c . In Eq. (S5), we set the GL parameter to κ = 100. The details of the calculation method can be found in Ref. [START_REF] Sera | Relation of Superconducting Pairing Symmetry and Non-Magnetic Impurity Effects in Vortex States[END_REF]. Using the self-consistent solution, we evaluate the free energy given by [START_REF] Suzuki | Generic First-Order Orientation Transition of Vortex Lattices in Type II Superconductors[END_REF]

in Eilenberger theory. The upper critical field H c2 is evaluated as a magnetic field where ∆ → 0 in the self-consistent solution. At T ≈ 0, H c2 ≈ 1.3B 0 .

For the g configuration, we evaluate the free energy F θ while changing θ of the vortex lattice deformation, and show the angle θ-dependence of the free energy difference F θ -F θ=45 • at T = 0.2T c in Fig. S5. There, at H > 0.46, F θ has a minimum at θ = 45 • , indicating that the square lattice g is stable or metastable. On the other hand, for H ≤ 0.46, F θ has a local maximum at θ = 45 • , and g is unstable towards deformation to triangular or v lattice. Therefore, by the condition F g ≡ F θ=45 • < F θ=46 • , we determine the phase of g , where the square lattice g is stable or metastable, in the T -B phase diagram of Fig. 3 in the main text. We also determine the phase of v similarly.

In Fig. 3 of the main text, the g arrangement is possible in regions A, B and C, and the v phase in B, C, and D. While regions B and C can host both g and v , F g < F v in region B, indicating that the g vortex lattice is the true free energy minimum, and v is metastable. In region C the situation is reversed: v is stable, and g is metastable since F v < F g . These results of stability for v and g are summarized in Table S2. S2. Stability of square vortex lattice g and v in regions A-D of Fig. 3 Supplementary Figure S6. Sound velocity of the c11 mode in LSCO p = 0.17 during a 58 T magnetic field pulse at 1.5 K.

Supplementary Table

The upsweep (downsweep) is shown in red (blue). For increasing fields, the VL transition is found at 41 T while it appears at 37 T or so for decreasing fields. Due to the pulsed-field conditions we cannot rule out eddy current heating of the sample during the pulse. However, the fact that above the irreversibility field the two curves overlap indicates isothermal conditions.

Second ∆v/v Peak in Overdoped LSCO In LSCO p = 0.215, the sharp VL transition is not observed, but measurements of c 11 in the vortex solid phase show an interesting feature [Fig. S7]. At 4.2 K, a smooth step-like decrease of the sound velocity is found at the depinning field B dp ≈ 30 T, as expected for c 11 . In addition, a broad maximum is found just above 10 T, which we call B peak . Similar features are observed at 10 K. Note that the broad maximum at B peak is not observed in pulsed field data, probably because of the shorter time-scale of those measurements. Nevertheless, a small anomaly could be seen in some pulsed field data sets (for example, at around 5 T and 1.5 K in Fig. 2 of the main text). While the sound velocity change at B peak is very similar in appearance to the known B dp transition at higher field, there is no corresponding feature in the attenuation [Fig. S7(b)]. Therefore, the lower field transition is different from the vortex depinning transition, where there is a sharp rise in the attenuation. The fact that the ∆v/v peak is larger (in DC field), but ∆α shows no response, rules out the idea of inhomogeneity in the sample, where different regions could have different B dp values. The presence of a single T c measured with sound velocity in zero field also rules out this scenario.

Data up to 20 T in both increasing and decreasing field also show that B peak is still well below the irreversibility field and that B dp > B peak . As seen in Fig. S8(a), B peak is a maximum in ∆v/v in increasing field, but a minimum at the same field when B is moving toward 0 T. A phase diagram of the inflection points corresponding to the local maximum in ∆v/v shows that the temperature dependence of B peak is qualitatively similar to B dp [Fig. S8(b)], and thus very different from that of the vortex lattice reorientation field B anom .

The smooth and broad shape of the feature at B peak suggests it is not a phase transition. A "second peak" or "fishtail" effect observed in the magnetization of many superconductors, including LSCO, could be the origin of the anomaly at B peak . Indeed, the lower field peaks in the sound velocity come at similar field and temperature to those in the magnetization of an LSCO x = 0.198 sample [START_REF] Tanabe | Magnetic-Field-Induced Enhancement of the Vortex Pinning in the Overdoped Regime of La2-xSrxCuO4: Relation to the Microscopic Phase Separation[END_REF]. The crystal lattice is has been shown to be sensitive to the fishtail effect via magnetostriction measurements on YBCO [START_REF] Cura | Magnetostriction and magnetoacoustic measurements on pure and Zn-doped YBCO crystals[END_REF]. In LSCO, the second peak is most evident at overdoping [START_REF] Tanabe | Magnetic-Field-Induced Enhancement of the Vortex Pinning in the Overdoped Regime of La2-xSrxCuO4: Relation to the Microscopic Phase Separation[END_REF], in line with our observation of a second ultrasound peak only in the highest doping we measured. The origin of the magnetization peak is still debated, and in fact there may not be a universal explanation valid for different materials [START_REF] Miu | On the nature of the second magnetization peak in FeSe1-xTex single crystals[END_REF]. However, we believe that in the case of LSCO p = 0.215 it corresponds to a vortex order-disorder transition, possibly to a disordered vortex glass. Enhanced pinning resulting from this process would also cause the observed increase in sound velocity. This has been one of the explanations put forth from measurements on LSCO and other materials [START_REF] Tanabe | Magnetic-Field-Induced Enhancement of the Vortex Pinning in the Overdoped Regime of La2-xSrxCuO4: Relation to the Microscopic Phase Separation[END_REF][START_REF] Miu | On the nature of the second magnetization peak in FeSe1-xTex single crystals[END_REF]. Increased disorder in the vortex lattice would explain the lack of a VL reorientation transition at this doping-a disordered or glassy vortex lattice, by definition, cannot transition between two ordered structures.


St Saad

E L Jaouhari
email: saad.el-jaouhari@isep.fr

Toward a generic and secure bootloader for IoT device firmware OTA update

The Internet of Things (IoT) devices market has shown strong growth in recent years. Time to market has become essential to be competitive, the faster a competitor develops and integrates his/her product, the more likely he/she is to dominate the market. This competition leads to critical software problems in the systems due to lack of testing or short development times. Lots present some vulnerabilities that can be exploited by attacks via botnets or malwares. Moreover, they are subject to huge number of 0-days that need quick intervention to maintain the security of the environment in which the IoT device is deployed in. For this purpose, the quick update of the firmware of these devices via patches is the most effective solution to counter these attacks. In this process, to operate embedded systems' set-up, control and supervision, an important component called the bootloader have to be implemented. This piece of code can manage and execute boot sequence and launch the firmware. However, without any recommendations or references, currently, there is no generic bootloader for all the IoT device, but there are several bootloaders specific for a particular or a group of hardware or kernel. This paper aims to analyze some of these bootloaders and develop a minimal generic bootloader implementing a firmware Over-The-Air update for constrained IoT devices. After analyzing several bootloaders and the OTA update process, a PoC of a bootloaders based on FreeRTOS, has been designed and implemented, and which allows to perform firmware verifications and OTA updates.

I. INTRODUCTION

It is very likely that by the year 2025, the number of connected devices will be more that the double of the humans on earth. These equipment are continuously being produced by many manufacturers. Moreover, in order to catch up to the "Time To Market" race, the priority is given to profitability and performance, to the detriment of robustness and safety. Thus, a large majority of these devices are highly vulnerable to old and new attacks launched by botnets or other malware. Furthermore, most of these devices do not have enough capabilities to deploy the necessary security mechanisms to counter these attacks and do not integrate proper update system that can patch these vulnerabilities.

Currently, new technologies allow more or less secure firmware update to correct any security flaws and to respond to eventual zero-days vulnerabilities, depending on the capabilities of these objects. In this process, the bootloader is an important element which allows the flashing and the installation of the new firmware image or modules. It is the piece of code that will launch the main application. This software can also be used to manage firmware updates remotely. The manufacturers of microprocessors (such as ARM, Intel, Texas Instruments, Atmel, etc.) developed their own bootloaders to better control and debug these updates. Moreover, in the absence of genericity of IoT's hardware modules, bootloaders becomes numerous and most often specific to the same family of microcontrollers. Hence, it becomes necessary to study their mechanisms and to look into the development of a generic module, which is also driven by the presence of very few standards and recommendations for the particular bootloader of the IoT devices. Following the example of universal ports for smartphones, it would be interesting to look into universal processes for managing IoT connected devices. Thus, this work studies the concept of a generic bootloader mechanism and extends it with the conception of secure update mechanism for the IoT that guarantees the integrity and the authenticity during the update process.

The main contributions of this work are: 1) A state of art and a comparison of some popular bootloaders currently used in constrained IoT devices. 2) A Generic bootloading process for typical IoT devices. 3) A Proof of Concept of the firmware over the air process, which uses the generic bootloader on top of ones of the most used OS (i.e., FreeRTOS). 3) The discussion of a secure and generic bootloading process that guarantees the integrity and the authenticity of the received firmware image. The remaining of the paper will be structured as follow: the paper starts with a background overview related to IoT devices, the bootloader and the firmware update process, in sectionII-B. Then, in sectionIII, it presents the related works, followed by the presentation and choices related the generic bootloader, in sectionIV. Next, the sectionV provides the implementation details. Finishes with a discussion in sectionVI and a conclusion in sectionVII.

II. BACKGROUND

This section provides an overview of some important notions to have a clear understanding of the different challenges related to the firmware update for IoT devices.

A. Generic/Typical IoT Device

With the mass of definitions related to the structure of the IoT device, it is important to have a precise idea about what is an IoT device. For this purpose, the Fig. 1 provides a generic and typical stack representation of the different hardware and software that can be involved in an IoT device. Within this representation, a constrained devices might have less elements and a reduced stack, for instance a device without an OS or without flash, etc.

B. Bootloader

Generally, a bootloader is a software that launches the kernel or another application during the boot sequence. Implemented in a ROM, NOR, NAND or MMC type microcontroller, this piece of code launches the kernel from a fixed address to the given memory (RAM). The bootloader typically contains minimal operations such as kernel release steps and cryptographic operations to read and verify the integrity of the firmware stored and/or received via an upgrade process. The transition from the bootloader application to the main kernel is achieved by using the partition table which allows the bootloader to know the address of the kernel. This partition table is typically used for a PC bootloader. However, for constrained systems, there is often no partition, just a flash address to target the kernel.

C. Over the Air Updates

In practice, there are multiple ways of updating an IoT devices, since different manufacturers follows different approaches depending on their tools, infrastructures and strategies. The updates the wired updates via a USB port, the wireless Over the Air (OTA) updates, and also they can be either full or partial (e.g., only a piece of the firmware or the OS), they can include signature and integrity verification or not, they can require an attestation of delivery and installation or not, and so on and so fourth. In this work, a special focus if given to the OTA updates of the full firmware. An OTA update refers to the transmission of a piece of software (will be referred as firmware from now onn) to an embedded system (mobile, tablet, connected objects) wirelessly "over the air", usually via Wifi, GSM/GPRS, BLE etc. It concerns mainly the new firmware version in order to either add new functionalities or to fix some bugs or vulnerabilities. The bootloader will then receive the firmware, implements checksum operations, verifies the integrity and authenticity if possible, installs it and then reboots.

The OTA update module can be implemented in the IoT device at two levels:

• At the bootloader level: the OTA and firmware verification process are executed at the bootloader stage and is independent of the application. This choice allows a bootloader/application separation but increases the footprint of the first one (bootloader size).

• At the application level: the implementation of the ota process at this level allows to decrease the bootloader footprint. The OTA process is dependent on the application, but independent of the bootloader. Moreover, the update can be either partial, by updating only the application for instance, or complete, by updating the system file, the bootloader and the application. This update process may also be interrupted due to a loss of connection between the server and the device, the device's extinction or simply a power cut. It is therefore necessary to schedule update operations in advance in order to avoid blocking the device. In this work, a special interest was given to the OTA update at the application level, to reduce the most possible additional footprint impact on the constrained device.

III. RELATED WORK

In the literature there are only few works that studies the IoT device's bootloader, and even less for having a generic bootloader, OS and hardware independent. In [START_REF] Michalec | Remote programming and reconfiguration system for embedded devices[END_REF], the authors present the concept of the remote programming, configuration, and monitoring system for development and testing which can be applied to resource constrained wireless sensors and IoT nodes, based on a general purpose microcontroller, unit or a field programmable gate array (FPGA) chip. The remote management interface can be run on many different operating systems via to the utilization of the Leshan LWM2M implementation with Web-based GUI. In another work [START_REF] Morel | Idols with feet of clay: On the security of bootloaders and firmware updaters for the iot[END_REF], the authors provide an overview of the threats targeting Bootloader and Firmware Update (BFU)s, and existing protections. The paper covers the hardware and software attacks. The authors also provide a generic and typical workflow of a secured firmware update at the bootloader lever, mainly inspired from Atmel architecture [START_REF] Atmel | Safe and Secure Bootloader Implementation for SAM3/4[END_REF]. The latter's security is mainly based on the integrity and the authenticity of the downloaded firmware. However, there is not evaluation nor implementation of this workflow, since the main purpose of the paper is the study of the security aspects and threats of the IoT devices itself. Next, in [START_REF] Schmidt | Secure Firmware Update Over the Air in the Internet of Things Focusing on Flexibility and Feasibility[END_REF], the authors propose SecFOTA an enhanced bootloader, which decides the kind of update used based on the user's settings, which a special focus on the security. The concerned firmware in this case is the RIOT-OS application running on Atmel SAMR21-Xplained Pro Evaluation Board (Cortex-M0+, 256kB Flash,32kB RAM). The solutions uses different partitions, or areas, in the flash memory run the firmware update. The firmware is loaded into an update area which is used to run integrity and version checks before copying the image into a live partition. Moreover, the last installed version is copied to a backup area, and in case of failure, a rollback to this version is done. Atmel introduces in [START_REF] Atmel | Safe and Secure Bootloader Implementation for SAM3/4[END_REF] an in-field firmware upgrading and describes various aspects regarding the implementation of a safe and secure bootloader for Atmel SAM3 and SAM4 families of microcontrollers. The document discusses several design considerations in developing this kind of software, the most important ones are: the bootloader sequence diagram for firmware upgrade, which includes firmware integrity verification and code encryption; the memory partitioning (i.e., single or dual banked memory), which makes it possible to have at least one working version of the firmware in the device at anytime, in order to avoid firmware corruption in case of an issues such as power or connection loss; safety solutions so as to prevent safety related errors from happening (i.e., transmission error, transmission failure, information loss); Security solution, by enforcing the privacy, integrity and authenticity features, via hash functions, digital signatures, message authentication codes (MACs) and encryption in order to prevent attacks (i.e., unauthorized device, third party firmware, firmware alteration, reverse-engineering).

IV. PRESENTATION AND CHOICE OF GENERIC BOOTLOADERS FOR THE IOT

A. Hardware environment

For the PoC, the following hardware have been used: Each cards has specific tool-chains. The chosen bootloaders for the PoC was influenced by the available environment.

B. State of the Art of some popular bootloaders

The sequential analysis of the bootloader was necessary in order to be able to master the bootloading process. The next sections present some popular bootloaders for embedded systems and the chosen one for our PoC.

1) U-boot: Now known as Das U-boot is an open source primary bootloader for embedded devices. It is a very generic solution and used by a large community. However, It requires lots of resources for a constrained memory SsC. Moreover, it is currently available for a number of well-known computer architectures such as ARM, PowerPC, x86 and MIPS.

2) MCUBboot: Bootloader is developed by NXP and previously named Kboot (Kitenis Bootloaders). MCUBboot is intended for 32-bit microprocessors. It is operational with the Apache Mynewt, RIOT and Zephyr operating systems. Zephyr is an OS with a small footprint especially for embedded and constrained systems. It supports a large number of architectures such as ARM Cortex-M, AVR MIPS etc. Moreover, it is supported by many architectures and several OSs (Zephyr, Mynewt, RIOT) and Open source. However, it is too large for constrained memory SoCs.

3) FreeRTOS: Is an open-source kernel developed in 2003 under the MIT license. FreeRTOS is known as covering a large environment of architectures (TI, Microchip, Atmel, NXP, Intel, etc.) with 18 compilation strings and having a very small footprint (4Ko to 9Ko). In 2014, FreeRTOS is one of the leading RTOS on the embedded market. Furthermore, in addition to be supported by numerous architectures, it provides real-time processing, and very active by it large community. However, it is characterized by it high complexity of implementation if using multi-tasking.

4) Expressif Rboot: Is designed to be a flexible open source boot loader, only for Espressif devices, a replacement for the binary blob supplied with the SDK. This bootloader is supported by multiple Hardware architecture Microcontrollers: CC3220, CC3200, ESP32, ESP8266, STM32F4 and multiple hardware platforms: TI CC3200, TI MSP432, NRF52, STM32, PIC32, ESP8266, ESP32 and it is Open source. However, there is no generic aspect.

5) Tiva: The Texas Instruments Tiva bootloader is a small piece of code that can be programmed at the beginning of flash to act as an application loader and an update mechanism for applications running on a Tiva ARM Cortex-M4-based microcontroller. The bootloader can be built to use either the UART, SSI, I2C, CAN, Ethernet, or USB ports to update the code on the microcontroller. The bootloader is customizable via source code modifications, or simply deciding at compile time which routines to include. Since full source code is provided, the bootloader can be completely customized.

6) LK (Little Kernel): Is a tiny operating system suited for small embedded devices, bootloaders, and other environments where OS primitives like threads, mutexes, and timers are needed, but theres a desire to keep things small and lightweight. On embedded ARM platforms the core of LK is typically 15-20 KB. LK is the Android bootloader and For demonstration, we decided to use FreeRTOS which implements its own bootloader. The technical achievements using this OS and the PoC will be exposed next.

V. IMPLEMENTATION

In this section, technical details about the PoC of the generic bootloader for update IoT devices are provided. For this purpose, three entities interact to update an IoT device: Maintainer, Device Management gateway, and IoT device.

A. Maintainer

As a first step, a Maintainer server was developed. It intends to simulate multiple manufacturers providing multiple updates of firmware for various IoT devices. In this case, and to simplify the PoC, a simple HTTP server was implemented and enhanced with a JSON API. The latter allows a device to know the status of the IoT device (i.e, the firmware version) to make an update request decision. If so, it provides the IoT device with the URL to the new firmware image. Basically, the server stores the card id, firmware version and manufacturer in the form of a JSON Object. The design and the implementation of the firmware update process including the security consideration and the use of firmware manifests [START_REF] Moran | A Concise Binary Object Representation (CBOR)-based Serialization Format for the Software Updates for Internet of Things (SUIT) Manifest, Internet-Draft draft-ietf-suit-manifest-04[END_REF], are currently in progress, and will be exposed in future works. Furthermore, since this is only a preliminary work, a more secure PoC including end-to-end security from this Maintainer to the IoT devices is under investigation. Solutions including pre-shared asymmetric keys, CoAP-DTLS, or via a key establishment protocol are considered.

B. Generic Bootloader

To realize the PoC, we decided to implement additional blocks over the base codes of FreeRTOS. Then, a simple and generic bootloader that manages also the firmware updates was implemented. Thus, it is necessary to explain first the different steps of FreeRTOS from the hardware initialization to kernel launch, which will be explained later in the update process. FreeRTOS allows the initialization of the different partitions like the partition table which has the firmware address. Hardware initialization is illustrated in Fig. 2, from step 1 to 6. These different steps are unmodified libraries of FreeRTOS. After these steps, the application is launched.

C. OTA firmware update

To completely separate the OTA bootloader from the application, additional processes to perform updates during the boot process were implemented. In the case of the ESP32-WiFi, the bootloader will first initialize and configure the WiFi (i.e., steps 7 and 8 shows the connection steps performed by the bootloader). Next, in the step 9, the bootloader (the communication server inside the IoT device) connects to the Device Management (DM) Gateway and will initially send some information to declare its identity (identification process, step 10): name, communication protocol, vendor, firmware version. Since FreeRTOS allows programming in the form of tasks that run in parallel and that can communicate, the bootloader will also query via an HTTP GET request, the Maintainer that contains the firmware information, in the step 11, in parallel with the execution of the identification task. In order to offload some of the computation from the constrained devices, these information are then relayed to the DM gateway. Another alternative is to delegate all the interaction with the Maintainer to the DM gateway since the latter already knows the device's firmware version. If the firmware registered on Maintainer is different from the one in flash memory (i.e., step 12), the bootloader will start an update process (step 15). Via an HTTP GET request, the bootloader will retrieve the firmware new firmware.bin, which is stored in a directory of the Maintainer server. If the binary file new firmware.bin is not present in the directory or the connection to the remote Maintainer has failed, the bootloader notifies the DM gateway of this error, as in step 13. The DM gateway will then query the Maintainer via an HTTP GET request and retrieve the firmware to send it directly to the module, as in step 14. This principle takes example on web services to find driver updates for computers.

Similar steps can be applied to different communication protocols such as BLE, Zigbee, Z-wave and so one, by adding simply some adapters. In case of failure, the bootloader launches the present firmware which will be executed until the next attempt of the system. In addition, an alert to the DM gateway is sent in the background. The complete diagram is shown in Fig. 2. Moreover, in order to demonstrate the previous processes, a PoC has been implemented on top of the FreeRTOS OS for embedded systems, via two use cases in order to apply the firmware update: 1) a first one by using only WiFi and 2) a second use case of using BLE. This will be the main purpose of the next sections. Note that, since HTTP+JSON download can be heavy for a light loader. It is especially suitable for wifi only. The delegation of these tasks to a DM gateway for instance is a better alternative in order to offload and lighten the update process.

D. OTA firmware update via BLE / WiFi

Updating via BLE/Bluetooth is more complex than updating via WiFi. Indeed, the speed of Bluetooth (3 Mbit/s) and even more for BLE (1 Mbit/s) is much lower than that of WiFi (6-30 Mbit/s). Thus, the transfer time is extended and errors are more frequent. For some IoT devices, the manufacturer uses WiFi in order to transfer updated firmware, applications or just some module to an intermediary, which can be a smartphone or a gateway, and then the latter connects to constrained device via a more constrained communication protocols (e.g., BLE, Zigbee, Lora, etc.) and transfer the updated piece of code. In our use cases, the smartphone connects to the IoT device via BLE. The connected object is in server position and is waiting for a connection from a client (here the smartphone or other host). An android application was also implemented and used in order to scan the BLE/Bluetooth environment, to connect to the device, to send data via a GATT service. Using this application, data in text or binary form can be sent. Depending on the requests sent via the GATT protocol, the IoT will perform an actions.

The Fig. 4 summarizes the two update techniques that uses the loader in order to perform the firmware over the air update. The first technique in red, allows you to perform updates without using WiFi. This technique, limited by the problems related to bluetooth bitrate, makes it possible to update the modules containing only BLE or Bluetooth. This is interesting for devices such as smart watches which generally do not integrate an update process and Wi-Fi. The second, represented by the blue arrows, illustrates the method of sending WiFi passwords via BLE. Then the module will connect to the Gateway (e.g., smartphone) and the WiFi OTA will be engaged. This method, very often used, is only applicable if the module has a WiFi SoC and BLE. The last one in green, represents the update by WiFi without the need of a gateway, as is the case for a large segment of IoT devices directly connected to Internet such as IP camera.

VI. DISCUSSION

This work is a starting line toward a generic and secure firmware OTA updates for IoT devices, and in particular the most constrained ones. It consists of a first and important brick, since it determines the way the bootloader is conceived in order to receive the new firmware image, how it is downloaded and how it is installed. However, we argue that there are several drawback in the current proposition that requires further and deeper investigations in order to provide a generic, portable, robust and secure bootloader for IoT and in particular for the constrained ones. In this section, some of there drawbacks are discussed in particular the ones related to the security and the evaluations.

An important aspect that was not addressed in this paper, since it requires additional capabilities, is the security all along the bootloading process. This challenge is tightly related to the hardware capabilities in the SoC. We argue that it is very important to be able to at least perform some integrity and authenticity verification in order to make sure that the received firmware image was not altered and that it is coming from the right benign origin. The Fig. 3, shows the ideal bootloading process with these verifications in mind. In this process, it is important to have an integrity and authenticity verification right after the version verification in the IoT device, if the latter downloads directly the firmware from the maintainer. Furthermore, if the IoT device relay on a DM gateway in order to recover the firmware image from The IoT device, will again perform the integrity and authenticity checks and then install the firmware image if the checks passed. The second check need to be done in order to make sure that a MITM cannot alter the firmware since it is usually sent in clear via a short range protocol such as BLE. Finally, it is important to study the threats against the bootloader such as the Rollback attack, where the attacker can resend a valid but old firmware version to the devices [START_REF]A Firmware Update Architecture for Internet of Things[END_REF], and the Firmware reverse engineering, by reverse engineering the binaries into assembly in order to analyze the functionality and to get access to secret data [START_REF] Park | Using power clues to hack iot devices: The power side channel provides for instruction-level disassembly[END_REF] [6], and to prepare some countermeasures in order to counter them. Moreover, in order to make sure that the proposed solution is generic and secure enough, multiple tests and evaluations need to be done in order to study the impact of the additional footprint on the different classes of IoT devices, in particular on the most constrained one (e.g., with Cortex M0).

VII. CONCLUSION

This work presents a first step toward developing a generic bootloader for the different type of IoT devices, and in particular for the most constrained ones. The main objective is to be able to update different IoT devices from different sources in a simple way, and to simplify the task for developer. The solution has been also extended with a design of a secure update mechanism for the IoT that guarantees the integrity and the authenticity during the update process. However, multiple challenges still need to be solved such as the overhead of adding the security mechanism, the presence of different bootloader in the same IoT device, the scheduling of the firmware update (including the interruption of the devices tasks and the devices in the sleep mode).

Fig. 1 .

 1 Fig. 1. Typical IoT device stack

Fig. 2 .

 2 Fig. 2. Generic bootload process at the application level

Fig. 4 .

 4 Fig. 4. Over the Air firmware update architecture via WiFi and BLE

Fig. 3 .

 3 Fig. 3. Ideal secure and generic bootloading process at the application level

  Based on a Cortex M4 processor, the Hexiwear development kit is the result of a collaboration between NXP and MikroElektronika. • ESP32 WROVER KIT: Cortex M4 development module integrating a WiFi SOC and Bluetooth. The presence of an integrated LCD screen allows the development of graphical user interfaces. • Espressif ESP8266: is a microcontroller integrated circuit allowing a WiFi connection. Widely used for Arduino projects, it is also possible to use it under FreeRTOS or Lua OS. Moreover, NodeMCU, which is an open source firmware for IoT and uses only few Lua script lines, is deployed inside the ESP8266.

• STM32F411re Nucleo DIscovery and BLE Nucleo extension: this development kit, developed by STMicroelectronics, has a cortex M4 processor. The presence of an st-link, which is a programmer and debugger, allows the firmware to be flashed via USB. The X-NUCLEO-IDB05A1 BLE expansion board allows the board to be controlled via BLE. • Hexiwear: