Léa Lévy

Thráinn Fridriksson

Nathaniel Findling

Bruno Lanson

Bernard Fraisse

Nicolas Marino

Benoit Gibert

Smectite quantification in hydrothermally altered volcanic rocks

à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Introduction

One of the challenges of geothermal exploration at volcanoes is to detect the presence of active hydrothermal circulations in fractures. Geo-electrical and electromagnetic measurements are commonly used to this aim because electrical resistivity contrasts can delineate zones of intense hydrothermal activity (e.g. [START_REF] Árnason | The resistivity structure of high-temperature geothermal systems in Iceland[END_REF][START_REF] Flóvenz | The role of electrical interface conduction in geothermal exploration[END_REF][START_REF] Flóvenz | 7.03 -Geothermal Energy Exploration Techniques[END_REF]. Electrical resistivity of volcanic rocks is particularly sensitive to the presence of secondary "alteration" minerals, often witnesses of hydrothermal circulations in fractures, such as clay minerals. The distribution of clay minerals can provide estimates of the temperature distribution in volcanic or sedimentary systems where their formation is controlled by the geothermal gradient [START_REF] Alt | Hydrothermal alteration of a 1 km section through the upper oceanic crust, Deep Sea 29 Drilling Project Hole 504B: Mineralogy, chemistry and evolution of seawaterbasalt interactions[END_REF][START_REF] Bourdelle | Clay minerals as geo-thermometer: A comparative study based on high spatial resolution analyses of illite and chlorite in Gulf Coast sandstones (Texas, U.S.A.)[END_REF][START_REF] Kristmannsdóttir | Zeolite zones in geothermal areas in Iceland[END_REF][START_REF] Kristmannsdottir | Alteration of basaltic rocks by hydrothermal activity at 100-300C[END_REF].

In active hydrothermal systems, the formation of smectite is not only controlled by the geothermal gradient, but also by the convective activity related to recent fault opening and causing boiling as well as chemical disequilibrium [START_REF] Beaufort | High-temperature smectites in active geothermal systems[END_REF][START_REF] Bril | Fluid-rock interaction in the geothermal field of Chipilapa (El Salvador): contribution of fluid-inclusion data[END_REF][START_REF] Patrier | Role of permeability versus temperature in the distribution of the fine (≤ 0.2 µ m) clay fraction in the Chipilapa geothermal system (El Salvador, Central America)[END_REF]. Compared to other clay minerals (e.g. illite, chlorite, kaolinite), smectite is much more conductive (e.g. [START_REF] Kaufhold | Comparison of three small-scale devices for the investigation of the electrical conductivity/resistivity of swelling and other clays[END_REF][START_REF] Kaufhold | Electrical conductivity of bentonites[END_REF] and contributes significantly to the electrical conductivity of rocks, through Electrical Double Layer mechanisms [START_REF] Flóvenz | Resistivity structure of the upper crust in Iceland[END_REF][START_REF] Pezard | Electrical properties of mid-ocean ridge basalt and implications for the structure of the upper oceanic crust in Hole 504B[END_REF][START_REF] Revil | Theory of ionic-surface electrical conduction in porous media[END_REF]Waxman and Smits, 1968) and interfoliar conduction [START_REF] Henry | 10. Relationship between porosity, electrical conductivity, and cation exchange capacity in Barbados wedge sediments[END_REF][START_REF] Lévy | The role of smectites in the electrical conductivity of active hydrothermal systems: electrical properties of core samples from Krafla volcano, Iceland[END_REF][START_REF] Maraqah | Ion transport in single crystals of the clay-like aluminosilicate, vermiculite[END_REF].

Smectite is also abundant in subduction zones [START_REF] Hyndman | The seismogenic zone of subduction thrust faults[END_REF] and in some major faults [START_REF] Chester | Structure and composition of the plate-boundary slip zone for the 2011 Tohoku-Oki earthquake[END_REF] and may play a role in the mechanical weakening of altered volcanic rocks [START_REF] Heap | Microstructural controls on the physical and mechanical properties of edifice-forming andesites at Volcán de Colima, Mexico[END_REF][START_REF] Kaufhold | Clay mineralogy and rock strength of a mid-German diabase: implications for improved quality control[END_REF][START_REF] Meller | Localization and Characterization of Hydrothermal Alteration Zones in a Geothermal Reservoir and Their Significance for Rock Mechanics[END_REF].

In order to study in the laboratory the influence of smectite on electrical conductivity and mecanical properties of volcanic rocks, the smectite content needs to be quantified first. Smectite content in drill-cuttings can also provide estimates of the porosity or permeability in a reservoir, by comparison with in-situ borehole resistivity logs [START_REF] Flóvenz | The role of electrical interface conduction in geothermal exploration[END_REF][START_REF] Pezard | Electrical properties of mid-ocean ridge basalt and implications for the structure of the upper oceanic crust in Hole 504B[END_REF][START_REF] Revil | Electrical conductivity in shaly sands with geophysical applications[END_REF][START_REF] Rink | Interface conductivity and its implications to electric logging[END_REF]Waxman and Smits, 1968).

The primary goal of our study is to provide geothermal industry with a simple method to quantify smectite content in hydrothermally altered volcanic rocks. Quantifying smectite in altered volcanic rocks is challenging because a large number of minerals often coexist in the same rock formation. Quantification of smectite by Rietveld-refinements of X-ray diffraction (XRD) patterns (e.g. Taut et al., 1998) is hampered when smectite-containing mixed layers coexist with smectite. Moreover, high-quality XRD scans are required for these quantifications, which can be time-consuming.

Due to its particular crystalline structure, smectite has a much larger Cation Exchange Capacity (CEC) than other clay minerals [START_REF] Bouchet | Minéraux argileux: structure cristalline, identification par diffraction de rayons X[END_REF]. This CEC is mainly located in smectite interlayers (Dohrmann, 2006a;[START_REF] Lagaly | Characterization of clays by organic compounds[END_REF]Vogt and Köster, 1978). [START_REF] Hower | The mineralogy of illites and mixed-layer illite/montmorillonites[END_REF] found a linear correlation between the CEC and the smectite fraction in a series of illite-smectite samples. [START_REF] Kaufhold | Beyond the Methylene Blue Method: Determination of the Smectite Content using the Cutriene Method[END_REF] also observed that the CEC measured by backtitration of the Copper-triethylenetetramine(II) "Cu-trien" [START_REF] Ammann | Determination of the cation exchange capacity of clays with copper complexes revisited[END_REF][START_REF] Bergaya | CEC of clays: Measurement by adsorption of a copper ethylenediamine complex[END_REF][START_REF] Meier | Determination of the Cation Exchange Capacity (CEC) of Clay Minerals Using the Complexes of Copper(II) Ion with Triethylenetetramine and Tetraethylenepentamine[END_REF] was proportional to the smectite content in bentonites, qualitatively measured using the methylene blue method.

Altered volcanic rocks contain a larger variety of minerals than bentonite or illite-smectite series, with often a large fraction of zeolites. Some zeolites, such as clinoptilolite and heulandite, have a higher CEC than smectite, up to 300 meq/100g, thanks to their wide solid solution of extraframework cations [START_REF] Fridriksson | Experimental determination of thermodynamic properties of ion-exchange in heulandite: binary ion-exchange experiments at 55 and 85 • C involving Ca2+, Sr2+, Na+ and K+[END_REF]. However, the CEC of clinoptilolite drops to 5 meq/100g when measured by the Cu-trien method [START_REF] Meier | Determination of the Cation Exchange Capacity (CEC) of Clay Minerals Using the Complexes of Copper(II) Ion with Triethylenetetramine and Tetraethylenepentamine[END_REF], because the channels where extraframework cations are located cannot expand, unlike smectite interlayers, so that only small cations (smaller than Cu-trien) can enter clinoptilolite channels. Therefore, the Cu-trien molecule appears to be adequate to quantify the smectite content in altered volcanic rocks. Our study tests this possibility by comparing CEC measurements to smectite quantifications based on Rietveld-refinements of XRD patterns, for samples where smectite is the only swelling clay mineral.

Since altered volcanic rocks contain lower and more variable smectite content than bentonite or illite-smectite series, the solid/solution ratio needs to be optimized for each sample, in order to minimize both the instrument uncertainty and systematic biases. The need for optimization of the reactants (exchange solution and sample) proportion was first addressed by [START_REF] Orsini | Utilisation du chlorure de cobaltihexamine pour la détermination simultanée de la capacité d'échange et des bases échangeables des sols[END_REF] for CEC measurements with the Cobalti-hexamine molecule, "Co-hex", on large masses of soil samples. [START_REF] Orsini | Utilisation du chlorure de cobaltihexamine pour la détermination simultanée de la capacité d'échange et des bases échangeables des sols[END_REF] pointed out that the exchange between Co-hex and soil samples could be considered as total only when the initial quantity of Co-hex was at least three times superior to the CEC. Yet, beyond eight times, the accuracy of the measurements would significantly decrease. Based on these observations, the authors recommended to carry out experiments where the initial ratio between Co-hex and rock sample (expressed in CEC units) represents 30% to 80% of the CEC, or equivalently where the fraction of Co-hex consumed during the experiments ranges between 15% and 30%. Further development of the Co-hex back-titration method [START_REF] Cieselski | A comparison between three methods for the determination of cation exchange capacity and exchangeable cations in soils[END_REF][START_REF] Ciesielski | Determination of cation exchange capacity and exchangeable cations in soils by means of cobalt hexamine trichloride. Effects of experimental conditions[END_REF] allows extending the interval of Co-hex consumed to 5%-35%. The need to optimize the solid/solution ratio by adjusting the initial mass of sample, for samples having a wide range of CEC values, is also discussed for the Cu-trien method by [START_REF] Dohrmann | Three new, quick CEC methods for determining the amounts of exchangeable calcium cations in calcareous clays[END_REF] and by Dohrmann (2006b) for the similar Ag-thiourea method.

Our study investigates the theoretical grounds for the observations of Dohrmann and [START_REF] Dohrmann | Three new, quick CEC methods for determining the amounts of exchangeable calcium cations in calcareous clays[END_REF] and the ranges suggested by [START_REF] Orsini | Utilisation du chlorure de cobaltihexamine pour la détermination simultanée de la capacité d'échange et des bases échangeables des sols[END_REF] and [START_REF] Ciesielski | Determination of cation exchange capacity and exchangeable cations in soils by means of cobalt hexamine trichloride. Effects of experimental conditions[END_REF] and presents a simple method for quantifying the smectite content of altered volcanic rocks through optimized CEC measurements using the Cu-trien exchange complex.

Materials and Methods

Rock samples

Thirty-eight samples from the Krafla high-temperature geothermal area are used in this study. Core samples are collected from four cored boreholes (KH1, KH3, KH5 and KH6) at varying depths. They represent a variety of lithologies and secondary minerals (Table 1). Cylindrical plugs (2-3 cm long and 2.5 cm diame-ter) are prepared from the original core samples for petrophysical measurements, presented by [START_REF] Lévy | The role of smectites in the electrical conductivity of active hydrothermal systems: electrical properties of core samples from Krafla volcano, Iceland[END_REF]. From the lateral faces of the plugs, thin sections and powders are prepared. Ten samples are used for optimization of CEC measurements, 24 samples for comparison between quantitative XRD analysis and CEC, 15 samples for chemical analysis by Electron Probe Micro Analysis (EPMA) and four samples for ICP analyses of exchangeable cations. Some samples are used for more than one type of analysis (Table 1). A first set of powders is used for the analysis of CEC uncertainty, carried out on 88 samples but presented here for 10 relevant samples. This set of powders is roughly grained to powder size, without any size control.

A second set of powders is used for XRD scans and associated mineral quantification by Rietveld-refinements. Powders from the first set are further ground for 10 minutes in ethanol, using an automatic grinder Retsch RM 200, dried and sieved before being prepared as randomly oriented mounts. For each sample, the exact same powder is used later on for independent CEC measurements that are later compared to XRD mineral quantification.

Mineral quantification by X-ray Diffraction

The powders are front-loaded onto the sample holder, using a razor blade to smooth out the surface, in order to minimize preferred orientation (PO) and shift of diffraction peaks [START_REF] Bish | Sample preparation for X-ray diffraction[END_REF] In samples containing a mixture of disordered clay phases (such as smectite and smectite-containing mixed layers and/or disordered 1:1 minerals), smectite content is difficult to quantify accurately by Rietveld-refinements, because of the strong correlation between parameters, including background (e.g. [START_REF] Raven | Outcomes of 12 years of the Reynolds Cup quantitative mineral analysis round robin[END_REF]. XRD patterns of samples containing both smectite and chlorite can be fitted (Figure 2) but the software adjusts both the chemical composition of chlorite and the relative quantity of chlorite and smectite to fit the relative intensities of the d(001) peak at 14-15Å and the d(002) peak at 7.2Å.

This results in the non-uniqueness of the model parameters related to chlorite chemistry and smectite and chlorite quantities. The chemistry of chlorite can be constrained (especially the relative abundance of Fe and Mg), based on independent chemical analyses, but this requires a large number of EPMA on polished thin sections, to obtain a representative chemical composition of chlorite for the sample, which is time-consuming and expensive. Moreover, assuming that the chemistry of chlorite can be properly constrained, the combined presence of smectite and chlorite often implies the presence of a chlorite-smectite phase.

This chlorite-smectite phase also contributes to the d( 001) peak at 14-15Å and its contribution can hardly be discriminated from that of pure smectite. As a result, the fitted amount of "smectite" corresponds in reality to a quantity of smectite + chlorite-smectite. Since only the quantity of smectite layers matters for the comparison to the CEC, not the quantitiy "smectite+ chlorite-smectite", this quantification is not appropriate. Therefore, only smectite quantifications for samples containing no other clay phase are used in this study for further comparison to CEC measurements. tailed structure files in Appendix B). An uncertainty on the smectite content is calculated based on the discrepancy between the two fits. For the other minerals, the uncertainty is calculated based on the variance of the model parameters given by the software.

CEC determination

The CEC of altered volcanic rocks is measured by back-titration of the Coppertriethylenetetramine (Cu-trien) molecule, as in the original protocol designed by [START_REF] Meier | Determination of the Cation Exchange Capacity (CEC) of Clay Minerals Using the Complexes of Copper(II) Ion with Triethylenetetramine and Tetraethylenepentamine[END_REF] to measure the CEC of pure clay samples. This molecule is also used, for example, by [START_REF] Kaufhold | Beyond the Methylene Blue Method: Determination of the Smectite Content using the Cutriene Method[END_REF] to measure the CEC of bentonites.

First, the sample is weighted in a beaker and then 50 ml of deionized water, measured with a volumetric flask, are added into the beaker. The few remaining water drops in the volumetric flask, after adding water to the beaker, represent an average of 0.6 ± 0.2. In order to reduce the uncertainty on the water volume, we measure the exact mass of water added to the beaker and adjust it by weight as close as possible to 50.00 g. Without this weight adjustment and measurement, the volume of water added is 49.4±0.2 ml. The beaker containing the water-rock mixture is then left in an ultrasonic bath for 5 minutes. Next, 10 ml of Cu-trien at about 1.10 -2 mol/L are added with a 5 ml pipette (two steps). Details about the preparation and characterization of the exchange Cu-trien solution at 1.10 -2 mol/L are given in Appendix C. The exchange is considered complete after 5 minutes of magnetic stirring. Since most of the exchange is expected to occur within interlayer spaces of swelling clay minerals (smectite), 5 minutes are considered sufficient. A test, carried out on sample L126, indicates that the difference in exchange yield after 5 and 60 minutes is within the instrument uncertainty, and thus not significant (see more details in Appendix C). If the CEC of higher charge clay minerals (e.g. vermiculite) were investigated, longer contact times might be needed (Von Reichenbach, 1968).

After the exchange reaction is completed, solid and liquid are separated by centrifugation. Finally, the absorbance of the supernatant solution is measured by a spectrophotometer at 578 nm. The absorbance of the Cu-trien solution before exchange, prepared independently by mixing 50 ml of deionized water and 10 ml of Cu-trien at 1.10 -2 mol/L, is also measured. The CEC (in meq/100g) is then calculated with Equation 1.

CEC lab = 2(C i -C f )V m ( 1
)
where V is the total volume of the solution (60 ml), m is the rock mass in The rock mass suggested by [START_REF] Meier | Determination of the Cation Exchange Capacity (CEC) of Clay Minerals Using the Complexes of Copper(II) Ion with Triethylenetetramine and Tetraethylenepentamine[END_REF] is 200 mg but is a key parameter to be adjusted: m varies between 100 and 1000 mg in our experiments (see e.g. Dohrmann, 2006b;[START_REF] Dohrmann | Three new, quick CEC methods for determining the amounts of exchangeable calcium cations in calcareous clays[END_REF]

Analysis of exchangeable cations in smectite

Chemical analyses of clay minerals are carried out on 15 polished thin sections at Géosciences Montpellier, using a CAMECA SX100 electron microprobe (22 keV, 10 nA). The 15 samples used for these measurements are indicated in Table 1.

Inductively Coupled Plasma Atomic Emission Spectroscopy (ICP-AES) analyses are carried out at ÍSOR to characterize the main cations exchanged after reaction with Cu-trien. Magnesium, calcium and sodium concentrations are measured at the wavelengths 279.079, 373.690 and 589.592 nm, respectively.

The exchangeable cations of four samples are investigated by this method: L119, L96, 31 and L99. Solutions are analysed at three steps of the reaction for each sample: after mixing rock and water, after ultra-sonic bath and after exchange with Cu-trien. This allows not taking into account cations coming from basic water-rock interaction (e.g. dissolution of glass or minerals).

Results and Discussion

Estimation of the laboratory uncertainty

We calculate the total uncertainty on the CEC measurements, u tot , by taking into account measurement dispersion, u disp , and instrument resolution, u instr .

The general formula, based on the rule of error propagation by Taylor expansions, is presented in Equation 2 (e.g. Joint Committee for Guides in Metrology (JCGM), 2008; [START_REF] Ku | Notes on the use of propagation of error formulas[END_REF].

u tot (CEC) = u instr (CEC) 2 + u disp (CEC) 2 u disp (CEC) = 1 n(n -1) n i=1 (CEC i -CEC avg ) 2 u instr (CEC) CEC = ( u(V ) V ) 2 + ( u(m) m ) 2 + ( u(C i -C f ) C i -C f ) 2 (2)
where n is the number of measurements for each sample, usually two or three, and CEC avg the average of the n measurements. u(V) and u(m) are the uncer-tainties on volume and mass, respectively, and u(C i -C f ) the uncertainty on the difference between initial and final concentrations. We explain below how these three terms are calculated.

The uncertainty on rock weighting is estimated to u(m) = 0.5 mg, based on the variations of the last digit of the scale.

The uncertainty on the total volume (60 ml) measurement is calculated by propagating the uncertainty of the three measured volumes (see Equation 3).

V = V wat + 2V pip u(V ) = u(V wat ) 2 + 2u(V pip ) 2 (3)
where u(V wat ) is the uncertainty on the 50 mL of water and u(V pip ) is the uncertainty on the 5 ml of Cu-trien (measured twice with a 5 ml micropipette to obtain 10 ml). u(V pip ) is estimated to 0.02 mL (by pipetting step). u(V wat )

is reduced from 0.20 to 0.01 ml when the exact mass of water added to the rock is measured. This results in a total volume uncertainty u(V ) = 0.03 ml, while it amounts to u(V ) = 0.20 ml when the water is direcly added from the volumetric flask without further verification.

The calculation of the uncertainty on the concentration difference is presented in Equation 4.

A i -A f = L(C i -C f ) ( u(C i -C f ) C i -C f ) 2 = ( u(A i -A f ) A i -A f ) 2 + ( u(L) L ) 2 = u(A i ) 2 + u(A f ) 2 (A i -A f ) 2 + ( u(L) L ) 2 (4)
where A i and A f are the initial and final absorbance, respectively, and u(A The uncertainty on the absorbance measured by the spectrophotometer is considered to be 0.001, based on the dispersion observed for repeated measurements of the same solution, as well as the spectrophotometer resolution provided by the manufacturer.

The total instrument relative uncertainty is given by Equation 5.

u instr (CEC) CEC = u(V f lask ) 2 + 2u(V pip ) 2 V 2 + u(m) 2 m 2 + 2u(A i ) 2 (A i -A f ) 2 + u(L) 2 L 2
(5)

Increasing the rock mass decreases the laboratory uncertainty for low-CEC rocks

Based on Equation 5, we calculate, for six samples, the instrument uncertainty of CEC measurements using two different initial rock masses and the same initial Cu-trien solution. We show that the relative uncertainty decreases from up to 70% to less than 5% when increasing the rock mass from the 200 mg, as recommendend for example by [START_REF] Meier | Determination of the Cation Exchange Capacity (CEC) of Clay Minerals Using the Complexes of Copper(II) Ion with Triethylenetetramine and Tetraethylenepentamine[END_REF], to 1000 mg (Figure 3).

In the present case, increasing the rock mass from 200 to 1000 mg increases the fraction of Cu-trien consumed from less than 1% to about 13% (Sample L114

in Figure 3). and u (m) m are very small compared to the third term. This is particularly true 300 for samples with CEC lower than 5 meq/100g, i.e. with low smectite content.

301

This effect is due to the limited number of digits, which can be read on the 302 spectrophotometer (only three digits, with values always ≤ 1). For high-CEC samples, we observe that the measured CEC can decrease by up 306 to 50% when the rock mass is increased, for fixed initial volume and concen-307 tration of Cu-trien (Figure 4). [START_REF] Dohrmann | Three new, quick CEC methods for determining the amounts of exchangeable calcium cations in calcareous clays[END_REF] suggest that 308 an unsuitably small solution/solid ratio may result in a reduced selectivity of 309 the index cation (Cu-trien in their case) and thus in an incomplete exchange of 310 interlayer cations. A similar observation is mentioned in [START_REF] Cieselski | A comparison between three methods for the determination of cation exchange capacity and exchangeable cations in soils[END_REF] for CEC measured by the Co-hex index cation and attributed to a reduced yield of the exchange reaction when the fraction of Co-hex consumed exceeds a threshold.

Here, we investigate the mathematical expression of these empirical observations, in order to predict the yield of the exchange reaction between Cu-trien and the rock sample and determine an acceptable threshold of Cu-trien consumption at the end of the reaction. The yield of the exchange reaction is taken as the relative difference between the apparent measured CEC, CEC app = CEC lab , and the maximum CEC, CEC 0 . We first write the theoretical relationship between CEC app and CEC 0 . Figure 4: Measured CEC with different initial ratios of reactants (Cu-trien and rocks) for four samples (blue filled circles): L99, L9, L6 and L119. The initial concentration of Cu-trien is about constant ((1.6 ± 0.1) • 10 -3 mol/L) but the mass of rock varies between 100 and 1000 mg (top x-axes). The fraction of Cu-trien consumed at the end of the reaction is marked aside each measurement. The laboratory (instrument) uncertainty is smaller than the symbols. The model predictions for four values of the thermodynamic constant K are also displayed as plain lines with a warm colorscale. The values of K are chosen on a trial-error basis, assuming K ≥ 1. The value of CEC 0 used for these predictions is marked together with the name of the sample, and corresponds to the measured CEC for the highest initial ratios. The values of CEC 0 may differ from the values given in Table 1 because a different set of powder is used for these measurements than for the measurements related to the correlation with XRD refinements.

For simplification purposes, we consider only one bivalent exchange reaction, between the Cu-trien(II) cations and Ca 2+ cations filling the exchange sites in the rock samples. According to chemical analyses of the smectite grains carried out by EPMA, there is at least twice as much Ca 2+ filling the interlayer spaces than N a + . There is an overall abundance of M g 2+ in the structural formula of these saponites but EPMA does not allow differentiating M g 2+ in the crystal lattice from M g 2+ in the interlayer space. The concentration of Mg, Ca and Na, measured by ICP in the solutions after exchange with Cu-trien for four samples, indicate that no Na has been exchanged and that exchanged-Ca and exchanged-Mg represent 72-94% and 8-13% of the total cation exchange capacity, respectively. These two types of result confirm that bivalent cations represent the majority of interlayer cations and the exchange ratio with Cutrien(II) will be mostly 1:1 (Figure 5).

The chemical exchange reaction, considering a majority of Ca 2+ in the initial state, is written in Equation 6.

Cu aq + Ca ads ----Ca aq + Cu ads (6)

The thermodynamic constant K of this exchange reaction is defined in Equation 7. K = X Cu,eq a Ca,eq X Ca,eq a Cu,eq

where the subscript "eq" indicates that a chemical equilibrium is reached. X Cu,eq and X Ca,eq are the dimensionless chemical activities of cations Cu-trien(II) and

Ca 2+ filling sites in the rock at the end of the exchange reaction, respectively, and a Cu,eq and a Ca,eq are the dimensionless chemical activities of cations Cutrien(II) and Ca 2+ in the aqueous solution at the end of the exchange reaction, respectively. Chemical activities are defined in Equation 8, where the subscript "eq" is removed for clarity purposes, but we assume the thermodynamic equi- The sodium concentration in the solutions after exchange is not significantly higher than in the solutions before exchange (both before and after ultra-sonic bath) for any of the samples. Both types of measurements are available for two samples (L31 and L99).

Depth (m) 0.3 0% 20% 40% 60% 80% 100% 120% L119 L95 L31 L99 / N O I T A C D E G N A H C X E C E C L A T O T Mg Ca
librium is reached. 9.

346                  a Cu = [Cu] aq a Ca = [Ca] aq X Cu = meq(Cu) mCEC0 X Ca = meq(Ca) mCEC0 (
                 Cu aq = C f Ca aq = C i -C f meq(Cu) = mCEC app meq(Ca) = m(CEC 0 -CEC app ) (9)
Combining Equations 7, 8 and 9, the thermodynamic constant, K, can be written as in Equation 10.

K = meq(Cu) meq(Ca) × C i -C f C f = CEC app CEC 0 -CEC app × C i -C f C f (10)
Given that CEC app = CEC lab and following Equations 1,9 and 10,meq(Cu) and meq(Ca) can also be written, as in Equation 11.

     meq(Cu) = 2V (C i -C f ) meq(Ca) = meq(Cu)(Ci-C f ) KC f = 2V (Ci-C f ) 2 KC f (11)
Assuming that all exchange sites are filled with either Cu-trien(II) or Ca 2+

at the end of the reaction, the total CEC, CEC 0 , is described in Equation 12.

CEC 0 m = meq(Cu) + meq(Ca)

⇐⇒ CEC 0 = 2(C i -C f )V m (1 + (C i -C f ) KC f ) ⇐⇒ KC f CEC 0 = CEC app (KC f + C i -C f ) = CEC app [(K -1)C f + C i ] ⇐⇒ C f = C i × CEC app KCEC 0 + (1 -K)CEC app (12)
By writing C f as a function of C i , m, V and CEC a pp (Equation 1), Equation 12gives Equation 13.

C i - mCEC app 2V = C i × CEC app KCEC 0 + (1 -K)CEC app ⇐⇒ (KCEC 0 + (1 -K)CEC app ) × (2V C i -mCEC app ) = 2V C i CEC app (13)
Equation 13 can be re-written as a second-order equation of the variable Y = CEC app (Equation 14).

(

-K)Y 2 + (KCEC 0 + 2V KC i m )Y - 2V KC i CEC 0 m = 0 ⇐⇒ aY 2 + bY + c = 0                  a = 1 -K < 0 b = KCEC 0 + 2V KCi m c = -2V KCiCEC0 m ∆ = b 2 -4ac 1
with a < 0 because K > 1 (otherwise no exchange would occur). By solving the second-order equation ( 14) and keeping only the positive solution (which remains positive even if K < 1), we obtain an explicit function for CEC app (Equation 15).

Y = CEC app = -b + √ ∆ 2a = -(α + X) + (α + X) 2 + 2αβX β            X = 2V Ci m α = CEC 0 β = 2 1-K K < 0 (15)
The function of X presented in Equation 15increases monotoneously with X and reaches asymptotically the value of CEC 0 . Since X is inversely proportional to m, the sequence of equations presented here predicts that an increase of rock mass (all other things being equal) will increase the difference between CEC app and its asymptote CEC 0 , which is equivalent to reducing the yield of the exchange reaction.

This model based on simple assumptions predicts the observations of Dohrmann and [START_REF] Dohrmann | Three new, quick CEC methods for determining the amounts of exchangeable calcium cations in calcareous clays[END_REF] and [START_REF] Cieselski | A comparison between three methods for the determination of cation exchange capacity and exchangeable cations in soils[END_REF] that the sample mass is the determining factor for optimum precision of the CEC and exchangeable cations, if the same volume of solution is used. The function presented in Equation 15can also predict our experimental observations on samples with large smectite volume, provided that CEC 0 is chosen accordingly (Figure 4). Values of K in the range 10-100 are consistent with the observations but the value of K does not affect much the predictions. Given the limited sensitivity of the model to the value of K, we do not attempt here to evaluate precisely this constan. We only suggest that the range 20-50 is appropriate to describe the reaction taking place in the samples shown in Figure 4. In reality, K depends not only on the exchanged cation but also on the type of minerals and of sites involved in the exchange (Tertre, 2014;[START_REF] Reinoso-Maset | Sorption of uranium (VI) and radium (II) at trace level onto kaolinite and montmorillonite[END_REF][START_REF] Durrant | Cesium sorption reversibility and kinetics on illite, montmorillonite, and kaolinite[END_REF][START_REF] Robin | Ion exchange reactions of major inorganic cations (H+, Na+, Ca2+, Mg2+ and K+) on beidellite: Experimental results and new thermodynamic database. Toward a better prediction of contaminant mobility in natural environments[END_REF][START_REF] Robin | Experimental data and assessment of predictive modeling for radium ion-PARAM=pb=0.6_0 . 5 ^0 . 8 PARAM=pc =0[END_REF].

Optimization of the CEC measurements

Equations 16 and 17 describe the "partial exchange" systematic error and "instrument" uncertainty, as a function of the fraction x =

Ci-C f Ci of Cu-trien consumed after the reaction, based on Equations 12 and 5, respectively.

Err partial = CEC 0 -CEC app CEC app = (C i -C f ) KC f = x K(1 -x) (16)
u instr (CEC) CEC = u(V f lask ) 2 + 2u(V pip ) 2 V 2 + u(m) 2 m 2 + 2u(A i ) 2 (A i -A f ) 2 + u(L) 2 L 2 = u(V f lask ) 2 + 2u(V pip ) 2 V 2 + u(m) 2 m 2 + 2u(A i ) 2 x 2 A i 2 + u(L) 2 L 2 (17)
Depending on the value of the thermodynamic constant, K, the optimal fraction of Cu-trien consumed to minimize both the instrument uncertainty and the partial exchange systematic error is somewhere between 30% and 80% (Figure 6), as suggested empirically for CEC measurements with Co-hex on soils by [START_REF] Orsini | Utilisation du chlorure de cobaltihexamine pour la détermination simultanée de la capacité d'échange et des bases échangeables des sols[END_REF]. Since it is not possible to determine K with these simple measurements, we consider most resonable to aim at 30% consumption (most pessimistic value for K) because the decrease of u instr (CEC) beyond 30% is less important.

Quantification of smectite weight fraction in altered volcanic rocks

A linear correlation is found between the smectite weight fraction and the CEC of altered volcanic rocks, where the only swelling clay mineral is smectite (Figure 7). Due to the complexity of Rietveld refinements in whole rock samples when several types of clays are involved, only samples where a satisfying fit is obtained using only the clay phase "Smectite tri-octahedral with interlayers filled with Ca and 2 water layers" are reported in this figure. In samples where a peak at 7- 7.5Å is observed (typical of chlorite and chlorite-smectite), the smectite quantity derived from the fit is considered irrelevant for a quantitative comparison with the CEC. An uncertainty on the quantification is calculated by fitting the same diffraction patterns with a different smectite phase: "Saponite with interlayers filled with undetermined cations and 2 water layers". The quantities derived from the fit with the less constrained saponite are systematically lower. The linear fit to the observations shown in Figure 7 has a slope CEC smec = 90 ± 5 meq/100g and a regression coefficient R 2 = 0.945. The slope is consistent with the known range of CEC for smectite, 80-120 meq/100g, caused by the permanent negative charge of the crystal lattice, in the range 0.3-0.6 per half unit cell Si 4 O 10 (OH) 2 , that is compensated for hydrated interlayer cations (e.g. [START_REF] Bouchet | Minéraux argileux: structure cristalline, identification par diffraction de rayons X[END_REF]. A slope of CEC smec,105 • C = 94 ± 5 meq/100g, with a regression coefficient of 0.952, is found when CEC values are corrected for the water loss at 105 • C (Appendix D). The contribution of other minerals to the measured CEC is also investigated, in particular zeolites, illite and chlorite. Zeolites can be divided into two groups:

0% 20% 40% 60% 80% 100% Fraction of Cu-trien consumed [(C i -C f )/C i ]
(i) "rigid" zeolites (e.g. laumontite, mesolite, analcime, natrolite and scolecite), whose chemical formula is well-defined and in which extra-framework (other than Al and Si) cations cannot be exchanged and only the water content can vary and (ii) "flexible" zeolites (e.g. heulandite, chabazite and clinoptilolite), which exhibit a wide and continuous range of extra-framework cation compositions. Although, CEC of heulandite and clinoptilolite can reach up to 300 meq/100 g [START_REF] Fridriksson | Experimental determination of thermodynamic properties of ion-exchange in heulandite: binary ion-exchange experiments at 55 and 85 • C involving Ca2+, Sr2+, Na+ and K+[END_REF], CEC measurements by the method de-veloped here result in CEC values in the range 0.5-1.5 meq/100g [START_REF] Lévy | The role of smectites in the electrical conductivity of active hydrothermal systems: electrical properties of core samples from Krafla volcano, Iceland[END_REF]. Therefore, the contribution of zeolites to the CEC measured by Cu-trien in altered volcanic samples is negligible.

The CEC of pure illite [Beavers Bend illite - [START_REF] Mankin | Proposed reference illite from the Ouachita Mountains of southeastern Oklahoma[END_REF]] is also measured using the same method (back-titration by Cu-trien), yielding 4 meq/100g, which confirms the quasi-absence of non-mica layers in the illite sample [START_REF] Mankin | Proposed reference illite from the Ouachita Mountains of southeastern Oklahoma[END_REF] and the negligible CEC of pure illite compared to pure smectite [START_REF] Hower | The mineralogy of illites and mixed-layer illite/montmorillonites[END_REF]. Moreover, the CEC of samples containing large amounts of chlorite, as well as in some cases wairakite and other "high-temperature" alteration minerals (epidote, actinolite), but no hint of smectite, is always lower than 0.5 meq/100g, when measured by this method [START_REF] Lévy | The role of smectites in the electrical conductivity of active hydrothermal systems: electrical properties of core samples from Krafla volcano, Iceland[END_REF]. We conclude that the linear trend presented in Figure 7 can be used to estimate the weight fraction of smectite in altered volcanic samples containing wide range of minerals. This weight fraction also includes smectite layers in mixed-layer chlorite-smectite or illite-smectite.

As mentioned in Section 2, the grain size of rock powders used for measurements presented in Figure 7 is strictly below 250 µm. This is a requirement to transform the CEC measurement into absolute smectite weight fraction. The presence of larger grains (e.g. millimetric size) have less surface exposed during the exchange reaction, which might result in reduced smectite accessibility by the exchange solution and thus smaller measured CEC [START_REF] Kaufhold | Clay mineralogy and rock strength of a mid-German diabase: implications for improved quality control[END_REF].

We do observe a discrepancy of 20% for a high-CEC sample, L99, between the CEC measured with the same initial and optimal conditions but ground to two different sizes. These two measurements were carried out by the Institut National de Recherche en Agronomie in Arras (France), which performs accredited measurements of CEC on soil: (i) using their standard size (≤ 2 mm) and (ii) using a smaller size (≤ 250 µm) on our request.

Finally, heterogeneity of core samples from geothermal areas may cause significantly different CEC values depending on which lateral face of the cylindrical plug is used for the powder. Therefore, crushing and mixing together as much rock sample as possible (e.g. from the two lateral faces) is recommended.

Conclusions

In this study, we suggest a modified protocol to minimize the uncertainty of CEC measurements with the Cu-trien method and thus to quantify the smectite content in altered volcanic rocks. We observe that using a fixed mass of sample for rocks covering a wide range of smectite content may cause a relative uncertainty of up to 70% for samples with low smectite content. We also show that XRD on randomly oriented powders is not sufficient for smectite quantification in samples containing other disordered clay minerals (including smectite-bearing mixed-layers) and/or chlorite. We establish that the fraction of Cu-trien consumed at the end of the reaction needs to be optimized in order to minimize the total uncertainty of the CEC measurement. Instrument uncertainty and systematic "partial exchange" error are anti-correlated with varying fraction of Cu-trien consumed. We suggest that a value of 30% for this fraction is optimal, as a rule. Finally, we show a linear correlation between the CEC, measured with an adequate Cu-trien consumption, and the smectite weight fraction determined by XRD, for 24 samples containing smectite as the only swelling clay mineral.

Our study provides the geothermal industry with a simple method to quantify the smectite weight fraction (pure smectite or expandable layers in mixed-layer clays) of powders from all kinds of altered volcanic rocks. Different spectrophotometric back-titration methods, using for example the Cobalti-hexamine (III) molecule, can be used in the same manner for smectite quantification, since a whole range of thermodynamic constants are considered for the cation exchange reaction.

exchange on beidellite, a swelling clay mineral with a tetrahedral charge".

In: Applied Geochemistry 85, pp. 1-9. Stanjek, H. and Künkel, D. (2016). "CEC determination with Cutriethylenetetramine: recommendations for improving reproducibility and accuracy". In:

Clay Minerals 51. A Effect of preferred orientation on X-ray diffraction patterns: the case of heulandite

The effect on XRD patterns of preferred orientation when samples are backloaded onto sample holders, is illustrated in Figure A.1. The relative intensity of the heulandite peak at low angle (about 10 • 2θ), compared to the other peaks, is much higher when sample is back-loaded. The residuals at the end of refinement (gray signal under each pattern) are also higher in this case. // s q u a r e d l o r e n t z i a n ( Gauss-l i k e ) b r o a d e n i n g B2=c a t (R2==s q r ( h/A)+ s q r ( k/B) , Z2==max( s q r ( sk )-R2 , 0 ) , o r i e n t i e r u n g 2==Z2/ s q r ( sk ) , i f t h e n e l s e ( and ( eq ( h , 0 ) , eq ( k , 0 ) ) , K2l * s q r ( sk ) , K20 * s q r ( sk )+ b r e i t 2 * o r i e n t i e r u n g 2 ) )

// // s c a l i n g o f c l a s s e s ( 0 0 l und h k l ) and removal o f redundant 00 l r e f l e c t i o n s GEWICHT [START_REF]PARAM=pFE=0.06_0^0 . 3 pAL=(1-pMG-pFE) -and t -vacancy[END_REF] =GEWICHT * i f t h e n e l s e ( and ( eq ( h , 0 ) , eq ( k , 0 ) ) , s e t (ECA, 0 , 0 , 0 ) // c a t i o n i n t h e middle o f t h e i n t e r l a y e r s e t (EOZ1, 0 , 0 ,dCAO) // O above s e t (EOZ2,0 ,0 , -dCAO) // O below s e t (EOZ3 ,dCAO, 0 , 0 ) s e t (EOZ4,-dCAO, 0 , 0 ) s e t (EOZ5, 0 ,dCAO, 0 ) s e t (EOZ6,0 , -dCAO, 0 ) xx =0.7 // s h i f t i n g parameter o f t h e i n t e r l a y e r complex i n x yy =0.2 // s h i f t i n g parameter o f t h e i n t e r l a y e r complex i n y // t h e f i r s t two E u l e r i a n a n g l e s f o r r o t a t i o n o f t h e i n t e r l a y e r complex , // f i x e d

  Description of the 38 samples used in this study (ID = sample name). The borehole (BH) and depth (in meters) from which the samples are extracted are indicated in Columns 2 and 3. The type of analysis for which the samples are used are indicated in Columns 4 to 6, where Opt CEC corresponds to the optimization of CEC measurements. The CEC (in meq/100g) and the smectite weight per cent measured by XRD are given in Columns 7 and 8. The lithology (Litho) is given in Column 9: hyalo = hyaloclastite; v. lava = vesicular lava; d. lava = dense lava; ignimb. = ignimbrite. The presence of secondary minerals (if more than 1% as quantified by XRD quantification) is indicated in Columns 10 to 17. Sm = smectite; Chl = chlorite; Heu = heulandite (zeolite); Qtz = quartz; Clc = calcite; Pyr = pyrite; Tit = titanite; Oth. = other; Laum = laumontite (zeolite); Act = actinolite; Ep = epidote; Wai = wairakite; Ana = anatase; Jad = jadeite; Sid = siderite.

Figure 2 :

 2 Figure2: XRD quantitative analysis, using the BGMN software, for a sample containing smectite, chlorite and mixed layer chlorite-smectite.

  mg and C i and C f are the Cu-trien concentrations in the initial and final solutions, respectively, in mol/L. C i and C f are calculated based on the absorbance measurements and the calibration curve presented in Appendix C.

  i ) = u(A f ) their respective uncertainty. L is the slope of the calibration curve (ab-sorbance versus concentration, see Appendix C) and u(L) is calculated using the error propagation rule presented above, with an expression of L based on the two extreme calibration points and their respective uncertainty (Joint Committee for Guides in Metrology (JCGM), 2008).

Figure 3 Figure 3 :

 33 Figure3shows that the instrument uncertainty exponentially decreases with the fraction of Cu-trien consumed. This is consistent with Equation5, where the denominator (A i -A f ) 2 controls the overall value of u(CEC) because u(V ) V

3033. 3

 3 Increasing the rock mass decreases the yield of the 304 exchange reaction for high-CEC rocks 305

Figure 5 :

 5 Figure5: Number of exchangeable Ca-ions compared, to Na-ion and Mg-ion in the interlayer spaces of smectites. The relative number of exchangeable Ca versus Na is shown as a function of sampling depth. Sixteen samples, where chemical analyses by electron probe are carried out, are reported on this figure: L04 to L31 from KH1, L40-L58 from KH5 and L81-L99 from KH6. The error bar indicates the range of values found for the different smectite grains measured in each thin section. The histogram at the center shows the distribution of exchangeable Mg and Ca in four samples, as measured by ICP in the exchange solutions after reaction with Cu-trien. The sodium concentration in the solutions after exchange is not significantly higher than in the solutions before exchange (both before and after ultra-sonic bath) for any of the samples. Both types of measurements are available for two samples (L31 and L99).

  8)where[Cu] aq and[Ca] aq are the chemical concentrations of cations (Cu-347 trien(II) and Ca 2+ , respectively) in the aqueous solution, in mol/L, and meq(Cu) 348 and meq(Ca) are the quantities of cations (Cu-trien(II) and Ca 2+ , respectively) filling sites in the rock, in millimol equivalent "meq". Each mmol of Cu-trien(II) or Ca 2+ corresponds to 2 meq, given the double positive charge carried by each cation. a Cu and a Ca are normalized by an "infinite" theroretical concentration of 1 mol/L. With CEC 0 being the total CEC of the rock, in meq/g, and m the mass of rock considered in the experiment, in g, mCEC 0 is the total number of exchange sites available in the rock, in meq. According to these definition,[Cu] aq , [Ca] aq , meq(Cu) and meq(Cu) are given in Equation

Figure 6 :

 6 Figure 6: Laboratory uncertainty and "partial exchange" systematic error, as a function of the fraction of Cu-trien consumed.

Figure 7 :

 7 Figure 7: CEC measurements versus smectite quantification by Rietveld refinements of XRD patterns, for samples where smectite is the only swelling clay mineral. The slope and regression coefficient of the fitting line is given in the legend. CEC measurements and XRD scans are carried out on the exact same powders. The same figure, using CEC values corrected for taking the water content into account in each sample, is presented in Appendix D.

Figure A. 1 :(PARAM=K20=0

 1 Figure A.1: Effect of preferred orientation on X-ray diffraction pattern for a sample (L02) containing a large amount of heulandite (zeolite). The upper pannel shows the diffraction pattern when the powder is carefully grained and front-loaded. The lower pannel shows the diffraction pattern for the exact same powder but back-loaded. The diffraction peak of heulandite at angle 10 • 2θ is four times higher in the lower panel and cannot be correctly fitted.

  r i g i d body o f t h e i n t e r l a y e r complex ===================== // c a t i o n , s q u a r e d s u r r o u n d e d by 4 oxygen ( water ) // d e f i n i t i o n o f t h e p o s i t i o n s i n c a r t e s i a n co-o r d i n a t e a t i o n i n t h e middle o f t h e i n t e r l a y e r // a j o u t de EOZ1 e t EOZ2 comme dans n o n t r o n i t e 69 // s h i f t i n g parameter o f t h e i n t e r l a y e r complex i n x , f i x e d yy =0.21 // s h i f t i n g parameter o f t h e i n t e r l a y e r complex i n y , f i x e d f i 1 =0 // t h e 3 E u l e r i a n a n g l e s f o r r o t a t i o n o f t h e i n t e r l a y e r complex , f i x , yy , 0 . 5 * c0 * s i n ( p i * BETA/ 1 8 0 ) , f i 1 , f i 2 , f i 3 ,ECA, EOZ1 , EOZ2 , EOZ3 , EOZ4 , EOZ5 , EOZ6) // // ==== r i g i d body o f t h e i n t e r l a y e r complex ===================== // c a t i o n , o c t a h e d r a l l y s u rr o u n d e d by 6 oxygen ( water ) // d e f i n i t i o n o f t h e p o s i t i o n s i n c a r t e s i a n co-o r d i n a t

f i 1

 1 =45f i 2 =180 * a c o s ( 1 / s q r t ( 3 ) ) / p i // f i 3 ( 3 th e u l e r i a n a n g l e ) i s a r o t a t i o n around t h e c a r t e s i a n z-a x i s // which i s p e r p e n d i c u l a r t o t h e xy-p l a n e f i 3 =-20 T( xx , yy , 0 . 5 * c0 * s i n ( p i * BETA/ 1 8 0 ) , f i 1 , f i 2 , f i 3 ,ECA, EOZ1 , EOZ2 , EOZ3 , EOZ4 , EOZ5 , EOZ6) // s h i f t i n g and r o t a t i o n o f t h e r i g i d body // // ---i s o t r o p i c t e m p e r a t u r e f a c t o r s (nm^2 ) , e s t i m a t e d --------------------------

Figure D. 1 :

 1 Figure D.1: Smectite content versus CEC, after correction of the CEC value for the water content, based on the water loss at 105 • C. The slope and regression coefficient are indicated on the figure.

Table

Table D .

 D 1: Water loss at 105 • C and correction of the CEC values to take into account the water content.

	ID	Water content CEC (no correction) CEC corrected
		wt.%	meq/100g (room T) meq/100g (105 • C)
	L02	3.1%	13.5	14.0
	L04	2.4%	17.6	18.0
	L05	1.0%	6.1	6.2
	L06	2.6%	7.2	7.4
	L09	6.0%	25.9	27.6
	L10	3.9%	15.6	16.3
	L11	2.1%	24.9	25.5
	L12	1.3%	2.7	2.7
	L14	3.6%	33.2	34.4
	L15	1.8%	15.0	15.3
	L16	1.6%	4.5	4.6
	L19	2.0%	15.1	15.4
	L21	2.9%	19.2	19.8
	L22	2.4%	21.2	21.7
	L26	0.9%	12.8	12.9
	L28	2.7%	13.0	13.4
	L29	1.5%	9.4	9.6
	L30	1.3%	7.2	7.3
	L31	2.4%	20.0	20.5
	L119 7.2%	45.7	49.2
	L40	0.5%	10.9	10.9
	L58	0.4%	3.5	3.5
	L112 1.5%	6.2	6.3
	L113 1.0%	3.5	3.5
	L114 0.7%	2.6	2.6
	L81 L82	1.0% 0.3% 0%	16.0 5.8 20% Smectite weight fraction by Rietveld refinements of XRD patterns 16.2 10% 30% 40% 50% 60% 5.8	70%
	L87	0.6%	5.6	5.6
	L91	0.5%	8.4	8.4
	L93	0.6%	1.9	1.9
	L99	4.1%	34.0	35.5
	L100 4.8%	27.7	29.1
	L80	1.2%	4.8	4.9
	L86	1.1%	6.3	6.4
	L89	1.2%	5.0	5.0
	L95	5.1%	39.6	41.7
	L126 7.4%	53.4	57.7
	L149 3.6%	19.5	20.2
			51

5 Acknowledgments L.L. thanks Sigurdur Sveinn Jónsson, Helga Margrét Helgadóttir and Bjarni Gautason for their help with identifying primary and alteration minerals in XRD patterns, thin sections and microscopic observations. L.L. thanks Heimir Ingimarsson, Christina Guenther and Ester Inga Eyjólfsdóttir for their help with the CEC measurements, as well as Iwona Monika Galezka and Kristinn I. Gudmundsson for ICP measurements and discussion of the results. The authors thank Christophe Nevado, Doriane Delmas and Khaled Oubellouch for high-quality polished thin sections and Jacinthe Caillaud for electron probe data collection and analysis. The authors are also grateful to Landsvirkjun, and especially Ásgrímur Gudmundsson, for providing rock samples used in this work. Finally, the authors thank editor Halldor Armansson, as well as Reiner Dohrmann and another anonymous reviewer for their remarks and suggestions, which very much helped improve the manuscript. Funding: this work was supported by the IMAGE FP7 EC project (Integrated Methods for Advanced Geothermal Exploration, grant agreement No. 608553) and by a PhD grant from Paris Sciences et Lettres granted to Léa Lévy. Data availability: the .xrdml files (X-ray diffraction patterns) used for Rietveld quantitative analysis are available as Supplementary Material.

// s h i f t i n g and r o t a t i o n o f t h e r i g i d body // // ---i s o t r o p i c t e m p e r a t u r e f a c t o r s (nm^2 ) , e s t i m a t e d --------------------------// t d s i n t =0.01 tdsH2O =0.02 18.

where m CuSO4 and m trien are the masses of CuSO 4 and "trien", in g, M CuSO4

and M trien are the molar masses of CuSO 4 and "trien", in g/mol and V tot is the total volume of the solution, in L. The masses of CuSO 4 and "trien" are calculated to obtain a final concentration of 0.01 M Cu-trien (e.g. m CuSO4 = 1.6114 g (anhydrous) and m trien = 1.4941 g).

The complex "Cu-trien" is formed by stoichiometric reaction between the two compounds, so that the quantity of Cu-trien formed (in mol) corresponds to the quantity of the compound initially present in lesser quantity, the "limiting reactant". According to Stanjek and Künkel (2016), one has to avoid using an excess of "trien" in the preparation, due to a possible complexation of trien with the interlayer cations of smectite (e.g. Ca, Mg) that would prevent a later exchange with Cu-trien. Since the "trien" compound (from Sigma-Aldrich) has a purity of ≥ 97 % (see also [START_REF] Ammann | Cation exchange and adsorption on clays and clay minerals[END_REF]Stanjek and Künkel, 2016), and the masses are calculated as if trien were 100% pure, CuSO 4 is theoretically in excess in our preparation. caries between -4% and 4% (Table C.1). This indicates that no systematic error in the Cu concentration (due to possible rehydration and thus increase of the molar mass) shall be taken into account in the calculations.

Four independent Cu-trien stock solutions and respective dilutions are used for calibrating the spectrophotometer. This set of solutions includes the Cutrien solutions whose Cu concentration is measured by ICP (Table C.1). It also includes two Cu-trien solutions directly prepared with the two CuSO 4 solutions measured by ICP beforehand. In these cases, the mass of solution is weighted and a mass of "trien" corresponding to a stoechiometric ratio between Cu and trien is mixed with deionized water and added to the copper sulphate solution in a 1 L volumetric flask.

The corresponding calibration curve, presented in

C.2 Contact time with Cu-trien

A test is carried out on sample L126 to evaluate whether longer contact times with Cu-trien might lead to increased exchange. The CEC measured after 5 and 60 minutes are 53.4 ± 0.7 meq/100g and 53.1 ± 0.7 meq/100g, respectively.

We consider the difference between these two numbers not signficant, which confirms that 5 minutes is a sufficient time for this type of samples.

D Water content and CEC correction

CEC measurements are carried out on rock samples dried at room temperature. The CEC values presented in this study do not include a correction for the water content in the samples. In particular, the slope presented in Figure 7 corresponds to the average CEC of smectite in samples dried at room temperature, i.e. containing up to 7% of bound water molecules. We present in


Bruno Martin
email: bruno.martin@unice.fr

Mixing Compression and CA Encryption

Keywords: pseudo-random sequences, compression, one-time pad, cellular automata

We consider the enciphering of a data stream while it is being compressed by a dictionary algorithm. This scheme has to be compared to the classical encryption after compression methods used in classical security protocols. Actually, most cryptanalysis techniques exploit patterns found in the plaintext to crack the cipher and compression techniques reduce these attacks. Our scheme is based on a LZ compression algorithm in which a Vernam cipher has been included. We first present an experiment with a pseudo-random sequence generated by a simple linear feedback shift register before considering pseudo-random sequences generated by cellular automata. We make some remarks on the security by trying to measure the randomness of our method with some statistical tests. Such a scheme could be employed to increase the speed of some security protocols and to decrease the computing power for mobile devices.

Introduction

Information security is currently one of the main challenges in the area of computer networks. In the emergent communication paradigm where wireless and wired networks are interoperating, security issues become crucial. Traditional technologies are every day more inadequate and existing standards should be improved for use in resource restricted environments. We aim to develop a secure algorithm for confidentiality, but cheaper in terms of bandwidth, speed and computing power.

In many security protocols, a compression algorithm is run prior encrypting the data to increase the security and the bandwidth. These algorithms are run on the original stream. They all stem from research by Lempel and Ziv who have designed two compression algorithms: LZ77 and LZ78. After compression, if the tradeoff between security and speed is taken into account, the compressed data is enciphered with the use of a stream cipher like for instance RC4 (let us recall that RC4 is 15 times quicker than a 3DES and is used in protocols like WEP and SSL [START_REF] Rescorla | SSL and TLS: Designing and Building Secure Systems[END_REF]). We assume the reader familiar with classical compression algorithms and with secret key cryptography for which good introductions are [START_REF] Martin | Codage, cryptologie et applications[END_REF][START_REF] Salomon | Data compression, the complete reference[END_REF][START_REF] Stallings | Cryptography and Network Security[END_REF].

In the present paper, we propose to scramble (encipher) a data stream while it is being compressed by a lossless dictionary algorithm. The basic idea which motivates this proposition is that a compressed stream is almost pseudo-random and a good candidate to be combined with a simple Vernam cipher. This comes from the notion of incompressibility introduced by Kolmogorov complexity. Kolmogorov [START_REF] Kolmogorov | Three approaches to the quantitative definition of information[END_REF] has proposed a complexity which speaks about objects rather than the usual classes of languages addressed by classical complexity. Informally, Kolmogorov complexity corresponds to the size of the smallest program p (denoted by ♯p) which can print out on its standard output the object x. If ♯p < ♯x, we say that x is compressible, otherwise incompressible. It provides a modern notion of randomness dealing with the quantity of information in individual objects. It says that object x is random if it cannot be represented by a shorter program p whose output is x or, in other words, if x is incompressible [START_REF] Salomon | Data compression, the complete reference[END_REF][START_REF] Li | An introduction to Kolmogorov complexity and its applications[END_REF]. From this point of view, the output of a compression algorithm is close to a pseudo-random sequence, although highly reversible.

We then consider two mechanisms for generating the pseudo-random sequences which are used as keys for the Vernam cipher. We have made a first experiment with a linear feedback shift register. This test has been implemented and we have measured the quality of the output. We have obtained output sequences which are apparently random although further testing with a χ 2 test was a little bit too weak. Thus, in order to improve the pseudo-randomness quality and to try to obtain a high rate generator, we consider in a second time pseudo-random sequences generated by cellular automata.

The paper is organized as follows: Section 2 recalls the definition of pseudo-random sequences. Section 3 presents our method with the test implementation. We use a compression algorithm from the Lempel-Ziv family and a pseudo-random sequence generated by a simple linear feedback shift register. Some statistical tests have been made and are presented in Section 3.4. In Section 4, we propose to increase the quality of the pseudo-random sequence. Instead of using a simple linear feedback shift register, we propose to replace it by a pseudo-random generator based on a cellular automaton, as proposed by Wolfram in [START_REF] Wolfram | Cryptography with cellular automata[END_REF].

Generating (pseudo-)randomness

This section recalls the classical definitions of pseudo-randomness. We first give an intuitive statement which gives the difference between real randomness and pseudo-randomness. We then introduce more formal definition of pseudo-randomness coming from complexity theory.

In the book A New Kind of Science, Wolfram describes three mechanisms responsible for random behavior in systems:

• Randomness coming from the environment (e.g., brownian motion, also hardware random number generators);

• Randomness coming from the initial conditions. This aspect is studied by chaos theory, and is observed in systems whose behavior is very sensitive to small variations in initial conditions (such as pachinko machines, lottery, dices ...);

• Randomness intrinsically generated by the system. Also called pseudo-randomness; it is the kind of randomness used in pseudo-random sequences generators. Many algorithms (based on arithmetics or cellular automata) generate pseudo-random sequences. The behavior of the system is fully determined by knowing the seed and the algorithm used. They are quicker methods than getting "true" randomness from the environment, inaccessible for computers.

The applications of randomness have led to many different methods for generating random data. These methods may vary as to how unpredictable or statistically random they are, and how quickly they can generate random sequences. Before the advent of computational pseudo-random sequences, generating large amount of sufficiently random numbers (important in statistics and physical experimentation) required a lot of work. Results would sometimes be collected and distributed as random number tables or even CD iso-images.

More formally, a pseudo-random sequence can be defined as:

Definition 1 A sequence is pseudo-random if it cannot be distinguished from a truly random sequence by any efficient (polynomial time) procedure or circuit.

Theorem 1 ([BM84]) A sequence is pseudo-random if and only if it is next-bit unpredictable.

Theorem 1 claims that for pseudo-random sequences, even if we know all the previous terms of a sequence, we don't have any information on the next bit. Theorem 1 was proved equivalent to: Theorem 2 ([Yao82]) A pseudo-random sequence generator G passes Yao's test if, for any family of circuits F with a polynomial number of gates for computing a statistical test, G passes F.

A first experiment

In this section we discuss our method which combines a Lempel Ziv compression algorithm together with a Vernam cipher which uses as key a pseudo-random sequence generated by a linear feedback shift register. We start with the description of two relevant ideas.

Related work

Actually, there are two methods sharing the same idea but in a slightly different way. The first one is called concryption and has been patented by Security Dynamics under US Patent #5479512. It is a method for the integrated compression and encryption (concryption) of clear data. For concryption, the clear data and an encryption key are obtained, at least one compression step is carried out and at least one encryption step is performed utilizing the encryption key. The encryption step is preferably performed on the final or intermediate results of a compression step, with compression being a multistep operation.

The second method is called comcryption and is due to Crandall [START_REF] Crandall | Comcryption[END_REF] when he was Apple's Chief Cryptographer. Roughly speaking, his idea is to index a great number of entropy compression algorithms by a secret key. He then gets a holistic (one-pass) compress/encrypt algorithm. This method is currently used for enciphering the passwords in the keychain application starting with Mac OS 9 and still used in Mac OS X from Apple Inc. It is recorded under US Patent #6154542, "Method and apparatus for simultaneously encrypting and compressing data".

The proposed scheme

We use the mode of operation of LZ 78 which uses a growing dictionary [START_REF] Salomon | Data compression, the complete reference[END_REF]. It starts with 2 9 = 512 entries (with the first 256 entries already filled up, eventually after an initial permutation). While this dictionary is in use, 9 bit pointers are written onto the output stream and directly encrypted by a Vernam cipher. When the original dictionary is filled up, its size is doubled to 1024 entries and 10 bit pointers are then used (and encrypted as well) until the pointer size reaches a maximum value set by the user. When the large dictionary is filled up, the program continues without changes to the dictionary but with monitoring the compression ratio. If this ratio falls down a predefined threshold, the dictionary is deleted and a new 512 entries dictionary is started.

The difference with concryption is that we use a single pass compression algorithm while concryption requires the compression to be a multistep operation. Our method is not based on an entropy compression algorithm used in the comcryption method, although an entropy compression algorithm could be added to shorten the mostly used pointers which are returned by the algorithm.

Compared with the classical compression prior encryption used by the classical security protocols, ours does not need to wait until the compression process stops (which is a costly operation) to start the encryption. To take an example, in the SSL protocol, the compression is devoted to a higher level protocol which slows down the process.

Next section presents the algorithm of our scheme. The implementation was just made as a proof-of-concept in C++ and using the LEDA library † which provides a sizable collection of data types and algorithms in a form which allows them to be used by nonexperts. We have denoted by PRS a pseudo-random (Boolean) sequence. Though a plot of the output (see Figure 1) is rather encouraging, we were deceived while testing outputs with a χ 2 test for which the results were a little bit too weak. This may be explained by the rather bad choice of a "toy" linear feedback shift register for generating the PRS (just a polynomial of degree 7). We expect the result to be improved with the use of better pseudo-random generators like those we present in Section 4.

Implementation

Analysis

With the latter, further testing should be made according to the FIPS 140-2 standard [Tec97] which requires a pseudo-random generator to pass a number of statistical tests or the Marsaglia tests, a set of 23 very strong tests of randomness implemented in the Diehard program ‡ .

Changing the pseudo-random sequence

In this section, we will focus on the pseudo-random sequences generated by cellular automata. We first recall the definition of binary cellular automata and their advantages for pseudo-random generation. We then explore the set of all the cellular automata rules to find out the most suitable for our purpose. As we will see in Section 4.2, pseudo-random sequences generated by binary cellular automata are not so good. So, we propose two different tracks to improve the quality of the sequences.

First of all, why do we consider cellular automata? One of their great interest is their intrinsic parallelism which permits to handle high rate pseudo-random generation. Cellular automata are also suitable for a programmable hardware implementation. Their target hardware model is the Field Programmable Gate Arrays (popularly known as FPGAs). FPGAs are now a popular implementation style for digital logic systems and subsystems. These devices consist of an array of uncommitted logic gates whose function and interconnection is determined by downloading information to the device. When the programming configuration is held in static RAM, the logic function implemented by those FPGAs can be dynamically reconfigured in fractions of a second by rewriting the SRAM configuration memory contents [START_REF] Porter | Evolving FPGA based cellular automata[END_REF]. Thus, the use of FPGAs can speed up the computation done by the cellular automata. Putting both remarks all together allows high-rate pseudo-random generation.

Secondly, the relationships between cellular automata and secret key cryptography is not new: in the context of symmetric key systems, cellular automata were first studied by [START_REF] Wolfram | Cryptography with cellular automata[END_REF]. Unfortunately, as we will see in Section 4.2, elementary cellular automata are not suitable for cryptographic purpose. Different approaches were proposed later by Habutsu et al. [START_REF] Habutsu | A secret key cryptosystem by iterating a chaotic map[END_REF], Nandi et al. [START_REF] Nandi | Theory and applications of cellular automata in cryptography[END_REF] and Gutowitz [START_REF] Gutowitz | Cryptography with dynamical systems[END_REF]. With a slight modification of the model of cellular automata, one can get more promising results; it is the approach of Sipper et al. [START_REF] Sipper | Co-evolving parallel random number generators[END_REF] and, more recently, of Seredynski et al. [START_REF] Seredynski | Cellular automata computations and secret key cryptography[END_REF].

Cellular automata

In this section, we briefly recall the definition of cellular automata. We focus on the so called elementary cellular automata rules (also called Wolfram rules).

A cellular automaton (CA for short) is generally a bi-infinite array of identical cells which evolve synchronously and in parallel according to a local transition function. The cells communicate with their nearest neighbors. Here, we consider a ring of N cells which are indexed by Z N . All the cells are identical finite state machines with a finite number of states and a transition function which gives the new state of a cell according to its current state and the current states of its nearest neighbors.

Definition 2 A cellular automaton is a finite array of identical cells indexed by Z N . Each cell is a finite state machine C = (Q, f ) where Q is a finite set of states and f a mapping f :

Q × Q × Q → Q.
The mapping f , called local transition function, has the following meaning: the state of cell i at time t + 1 (denoted by x t+1 i ) depends upon the state of cells i -1, i and i + 1 at time t (the neighborhood of cell i of radius 1). Figure 2 illustrates one transition of a cellular automaton on a ring with 8 cells. We have the following equality which rules the dynamics of the cellular automaton:

x t+1 i = f (x t i-1 , x t i , x t i+1 ) 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 t=0 t=1 neighborhood 0 1 7
Fig. 2: Transition of cell 3 with rule 30 depicted.

For a fixed t, the sequence of all the values x t i for i ∈ Z N , is the configuration at time t. It is a mapping c : Z N → Q which assigns a state of Q to each cell of the cellular automaton. The sequence of configurations as pictured by Figure 3 is called a time-space diagram. Figure 3 depicts the evolution of a ring with N = 8 cells. On the top of Figure 3, we have depicted rule 30 with each transition illustrated by three adjacent squares representing the different preimages of f and on the bottom, their image by f . A 0 is painted white while a 1 is painted grey. On the bottom of Figure 3, we see the time-space diagram of the cellular automaton from the initial configuration at time t = 0 to time t = 7.

We will restrict ourselves to the case where Q = F 2 and f is a Boolean predicate with 3 variables, also called an elementary rule. These cellular automata have been widely considered by Wolfram in [START_REF] Wolfram | Theory and applications of cellular automata[END_REF]: he considers the 256 different binary cellular automata and associates a natural number to each rule as follows:

(x t i-1 x t i x t i+1 ) 111 110 101 100 011 010 001 000

x t+1 i 0 0 0 1 1 1 1 0
The top line gives all possible preimages for f while the bottom line gives the images by f of the three binary values. Thus, f is fully specified by the 8-bit number written on the bottom line (00011110 in our example) which can be translated in basis 10 and then called the rule of the cellular automaton (as rule number 30 here). Equivalently, this rule can be considered as a Boolean function with (at most) 3 variables. Taking rule 30 again, its corresponding Boolean function is:

x t+1 i = x t i-1 ⊕ (x t i ∨ x t i+1 )
with ⊕ denoting the Boolean XOR function and ∨ the classical Boolean OR function. Its equivalent formulation in arithmetic modulo 2 is:

x t+1 i = x t i-1 + x t i + x t i+1 + x t i x t i+1 mod 2 t=0 0 0 0 1 1 1 1 0
Fig. 3: Evolution of CA30 on a ring with N = 8 cells.

Equivalent rules

Since we will be dealing with pseudo-random generators, some rules are equivalent from this point of view by three transformations. To define the transformations, just recall that a transition is f (x) = y with x ∈ F 3 2 and y ∈ F 2 .

In the sequel, we denote by w the mirror image of word w = w 1 . . . w n , w = w n . . . w 1 and by w the word obtained from w by exchanging the 0's by 1's (and conversely) w = w 1 . . . w n .

The first transformation is called the conjunctive transformation which takes as an input rule r written in binary and returns r. For instance, the conjunctive transformation turns rule 30 into rule 135.

The second transformation, called reflexive just changes the order of the x's by:

y i = f ( xi ) for i ∈ [[0, 7]].
As an example, with reflexive transformation, rule 30 is changed into rule 86.

Last transformation combines both and is called conjunctive-reflexive:

y i = f ( xi ) for i ∈ [[0, 7
]] and it changes rule 30 into rule 149.

All these transformations keep the spectral values of the cellular automata dynamics and are thus statistically equivalent.

Next section describes how Wolfram proposed to generate pseudo-random sequences with cellular automata.

Pseudo-random generation with CA

More specifically in [START_REF] Wolfram | Cryptography with cellular automata[END_REF][START_REF] Wolfram | Random sequence generation by cellular automata[END_REF], Wolfram uses a one-dimensional cellular automaton for pseudorandom bit generation by selecting the values taken by a single cell when iterating the computation of rule 30 from an initial finite configuration where the cells are arranged on a ring of N cells (see Figure 4). Mathematically, Wolfram claims the sequence {x t i } t≥0 is pseudo-random for a given i. Wolfram studied this particular rule extensively, demonstrating its suitability as a high performance randomizer which can be efficiently implemented in parallel; indeed, this is one of the pseudo-random generators which was shipped with the connection machine CM2. Wolfram used classical randomness testing procedure from [START_REF] Knuth | Seminumerical Algorithms[END_REF]. In each case, the basic method consists in comparing an observed distribution with that calculated for a purely probabilistic sequence. He has been considering the block frequency distribution test for deciding whether all of the 2 n possible n-blocks should occur equally; the gap length distribution to compare with a binomial distribution. Wolfram also considered the distinct blocks distribution, the block accumulation distribution, the permutation frequency distribution, the monotone sequence length distribution and the maxima distribution. The pseudo-random sequence generated by rule 30 passed all of these tests. Next section introduces the Walsh transform which is useful for studying the quality of the pseudorandom sequence generated.

Walsh transform

Walsh transform allows to compute the correlation between the inputs and the outputs of the iterations of a cellular automaton. One of the great interest of the Walsh transform is that its computation is even faster than computing a FFT (see [START_REF] Elliott | Fast transforms, algorithms, analysis, applications[END_REF] for instance).

Let us denote by f (x) the value of function f at x = (x 0 , x 1 , x 2 , . . . , x n-1 ) ∈ F n 2 or, equivalently, f (x), the value of f at x = ∑ n-1 i=0 x i .2 i , the decimal value corresponding to x. Analogously, let ω = (ω 0 , . . . , ω n-1 ) ∈ F n 2 and ω its corresponding decimal value. The Walsh transform of f is defined by:

S f (ω) = 2 n -1 ∑ x=0 f (x) × (-1) x•ω
with x • ω = ∑ n-1 i=0 x i .ω i denoting the Cartesian product of the two binary vectors. From the spectral values of the Walsh transform, one can recover the function f with the inverse Walsh transform:

f (x) = 2 -n 2 n -1 ∑ ω=0 S f (ω) × (-1) x•ω
The Walsh transform has some interesting statistical properties. For instance, the value of the transform at point 0 equals the mean value of the function: S f (0) = E[ f (x)] = 2 n-1 (with E denoting the expected value). This property permits to test whether f is balanced (the number of 0's equals the number of 1's in the image domain of f ).

In addition, Walsh transform is the main tool to study the correlation-immunity of a function. Tab. 1: "Good" rules after selection and their equivalent rules.

Definition 3 A function f : F n 2 → F 2 is k-th order correlation-immune if, given n independant binary random variables X 0 , X 1 , • • • , X n-1 such that Pr[X i = 0] = Pr[X i = 1] = 1 2 for i ∈ [[0, n -1]], then the random variable Z = f (X 0 , X 1 , • • • , X n-1 ) is independent from any random vector (X i 1 , X i 2 , • • • , X i k ), 0 ≤ i 1 < • • • < i k < n.
Xiao and Massey [START_REF] Xiao | A spectral characterization of correlation-immune combining functions[END_REF] have characterized (k-th order) correlation-immunity with the Walsh transform. We recall this result in Theorem 3 in which the Hamming weight just counts the number of non-zero values in a vector.

Theorem 3 ([XM88]) A function f : F n 2 → F 2 is k-th order correlation-immune if and only if S f (ω) = 0 for all ω = (ω 0 , ω 2 , • • • , ω n-1 ) = 0 whose Hamming weight is at most k.
For readers interested in a proof of Theorem 3, one can refer to [START_REF] Zémor | Cours de cryptographie[END_REF].

Actually, the idea of using Walsh transform to test pseudo-random generators comes from [START_REF] Yuen | Testing random number generators by Walsh transform[END_REF]. In this paper, Yuen observed that a truly random sequence has an asymptotically flat Walsh power spectrum. This observation was used to devise a new test for randomness of the output of pseudo-random generators. It was an improvement of the tests described in Knuth [START_REF] Knuth | Seminumerical Algorithms[END_REF] who do not deal with cryptographic pseudorandom generation.

We have implemented this test for studying the set of all the 256 elementary cellular automata.

No correlation-immune elementary CA rule

We have used in [START_REF] Martin | A Walsh exploration of Wolfram CA rules[END_REF] a Walsh transform to study all the 256 elementary CA rules in order to find the best (non-linear) rules for generating pseudo-random sequences.

After removing all non-balanced rules by computing their Walsh transfom, we select rules f for which S f (0) = 4; there are only 70 remaining balanced rules. Among those 70 rules f i , we compute the maximum absolute value of the Walsh transform of the t th -iterate of f i at all the points ω of Hamming weight 1 and we select the rules with a minimum spectral value. That is, we select rules f i such that:

min f i max ω=2 ℓ |S f (t) i (ω)|
where t denotes the iteration number and ω is the binary expansion of 2 ℓ for ℓ ∈ [[0, 2t + 1]], all the t bit vectors of Hamming weight one. Equivalently, we just test if, among the 70 balanced rules, there are some which are first order correlation-immune. After this, there are only the 12 remaining rules listed in Table 1 still containing linear rules which we recall in Table 2 in which the binary value encoding Wolfram's rule is written with the most significant bit on the rightmost part.

Boolean function binary decimal

x i ⊕ x i+1 00111100 60 x i-1 ⊕ x i 01100110 102 x i-1 ⊕ x i+1 01011010 90 x i-1 ⊕ x i ⊕ x i+1 01101001 150 x i-1 ⊕ x i 10011001 153 x i ⊕ x i+1 11000011 195 x i-1 ⊕ x i+1 10100101 165 x i-1 ⊕ x i ⊕ x i+1 10010110 105
Tab. 2: Linear rules and their corresponding Boolean functions.

Finally, if we remove the 8 linear rules, the best remaining rules are 30, 135, 86 and 149 which are all together equivalent by conjunctive, reflexive and conjunctive-reflexive transformations. None of them is first order correlation-immune nor correlation-immune as well. Thus, we state that:

Theorem 4 There is no non-linear correlation-immune elementary cellular automaton.

And, according to Theorem 2, we can state that:

Corollary 1 There is no elementary cellular automaton which can serve as pseudo-random sequence generator.

That is the reason why pseudo-random sequences generated in this way can be reversed by a correlation attack like the one proposed in [START_REF] Meier | Analysis of pseudo random sequences generated by cellular automata[END_REF], although pseudo-random sequences generated by rule 30 (or, equivalently by rules 86, 135 and 149) passed classical statistical tests like those proposed in [START_REF] Knuth | Seminumerical Algorithms[END_REF]. The attack proposed by Meier and Staffelbach in [START_REF] Meier | Analysis of pseudo random sequences generated by cellular automata[END_REF] is simple. It suffices to write the way to obtain the sequence generated by rule 30:

x t+1 i = x t i-1 ⊕ (x t i ∨ x t i+1 ) (1)
and to use the partial linearity to rewrite equation 1 as:

x t i-1 = x t+1 i ⊕ (x t i ∨ x t i+1 ) (2)
From equation (1), the cell values corresponding to the pseudo-random sequence are built from a triangle in the time-space diagram. And, from equation (2), one can guess the values of the leftmost part of the triangle (or equivalent partial configurations) and then find randomly an initial configuration for generating the pseudo-random sequence, exploiting the correlation.

Despite these weaknesses, we propose to improve the sequences generated by cellular automata to combine it with the LZ 78 compression process.

Improving the randomness

So, does Theorem 4 annihilate any hope to design a good pseudo-random generator by the means of cellular automata? Not necessarily. In this section, we will propose two different approaches. One is designed to counter Meier and Staffelbach attack and the second one changes the way pseudo-random sequences are generated.

Countering the attack

An idea to prevent the attack on the pseudo-random sequence proposed by Meier and Staffelbach is simply to change the way we extract the pseudo-random sequence from the sequence of configurations generated by the cellular automaton. Instead of taking the sequence {x t i } t≥0 as proposed by Wolfram, we select a time-constructible function f and we consider the sequence {x t f (i) } t≥0 for a suitable f . Such functions, in the field of cellular automata are called signals and have been widely studied by Mazoyer and Terrier, see [START_REF] Mazoyer | Signals in one-dimensional cellular automata[END_REF] for example. Just to fix the ideas, we have proposed in Figure 5 to take the cells values with a function f which moves to the right, one cell at a time. It is one of the simplest signal which can be defined on cellular automata.

Next section proposes a completely different approach. The idea is to use a set of rules for the cellular automaton dynamics instead of a single rule as in the original uniform model.

The cellular programming approach

Tomassini and Sipper [START_REF] Sipper | Co-evolving parallel random number generators[END_REF] proposed to use non-uniform cellular automata for generating better pseudorandom sequences. In this model, each cell may contain a different rule (the cellular automaton becomes then non-uniform) and the rules are obtained by an evolutionary approach (by a genetic algorithm). They have designed a cellular programming algorithm for cellular automata to perform computations, and have applied it to the evolution of pseudo-random sequence generators. Their genetic algorithm uses Koza's entropy E h . E h measures the entropy for the set of k h probabilities of the k h possible subsequences of length h. It is defined by:

E h = - k h ∑ j=1 p h j log 2 p h j
where k denotes the number of possible values per sequence position (in our case, the cellular automata states), h a subsequence length and p h j is a measured probability of occurrence of a sequence h j in a pseudo-random sequence. The entropy achieves its maximal value E h = h when the probabilities of the k h possible sequences of length h are all equal to 1/ℓ h , where ℓ h denotes a number of possible states of each sequence.

Tomassini and Sipper have selected four rules of radius 1 for use in non-uniform cellular automata. The best rules selected by the genetic algorithm were rules 90, 105, 150 and 165 (which are all linear, a drawback for certain attacks).

A series of tests (including χ 2 test, serial correlation coefficient, entropy and Monte Carlo, but no correlation-immunity analysis) were made with good results, showing that co-evolving generators are at least as good as the best available CA randomizer. The drawback here is that the authors also use elementary rules which we proved to be not correlation-immune. This was further investigated in [START_REF] Seredynski | Cellular automata computations and secret key cryptography[END_REF].

Following the same kind of approach, Seredynski et al. in [START_REF] Seredynski | Cellular automata computations and secret key cryptography[END_REF] have generalized the selection process to radius 2 rules. They use then both radius 1 and radius 2 rules in non-uniform cellular automata. The rules selected by their genetic algorithm were 30, 86, 101 and 869020563, 1047380370, 1436194405, 1436965290, 1705400746, 1815843780, 2084275140 and 2592765285.

Their new set of rules was tested by a number of statistical tests required by the FIPS 140-2 standard [START_REF]Security requirements for cryptographic modules[END_REF] and the Marsaglia tests implemented in the Diehard program but no correlation-immunity analysis was made. And, for both approaches, it is recalled in [START_REF] Zémor | Cours de cryptographie[END_REF] that it can be dangerous to combine "bad rules".

Although not truly pseudo-random (but this is also not a pseudo-random generator), the output of our compression and encryption scheme is encouraging if we look at the typical output depicted by Figure 1. Further study should be made with the help of a better pseudo-random generator based on cellular automata with classical tests and a fine tuning of all the parameters. In order to avoid correlated cellular automata, the best thing may be to combine the cellular programming approach and to consider the sequence of cells selected by a time-constructible function. The implementation has been started but is not yet completed.

The use of compression and encryption mixed together should increase the bandwidth, decrease the latency as well as it also might decrease the energy consumption required for the same purpose when using encryption after compression for mobile devices or RFID.

Last but not least, there is currently a great challenge in the use of a good pseudo-random generators; not only for use as a key for a Vernam-type cipher but also for computing a cryptographic hash function. Actually, from the collision attacks on MD5 and other hash function (see [START_REF] Klima | Finding MD5 collisions -a toy for a notebook[END_REF] and [START_REF] Wang | How to break MD5 and other hash functions[END_REF]), one could use the improvements proposed by [START_REF] Daemen | A framework for the design of one-way hash functions including cryptanalysis of Damgård's one-way function based on a cellular automaton[END_REF] and later by [START_REF] Mihaljevic | A cellular automaton based fast one-way hash function suitable for hardware implementation[END_REF] of the hash function based on cellular automata which was originally suggested by Damgård in [START_REF] Damgård | A design principle for hash functions[END_REF]. And, in order to design a secure cryptographic hash function, we need to have a robust pseudo-random generator.

Index = 256 ;

 256 Length = 9; Word = null; Limit = 12; Initialise 256 inputs in the dictionary (eventually after a permutation) //(a+b stands for concatenation) REPEAT Read a symbol from the stream (read S) IF Word+S is already in the dictionary THEN Word = Word+S; Emit = false ELSE Output the (index of Word) XOR (PRS) // Vernam cipher Index of (Word+S) = Index; Index++ IF Length = Limit THEN Re-initialise the dictionary (Index=256, Length=9) ENDIF IF Index = 2 * Length THEN Length++ ENDIF Word = S; Emit = true ENDIF UNTIL no data found IF Emit = false THEN Output the (index of Word) XOR (PRS) // Vernam cipher ENDIF

Fig. 1 :

 1 Fig. 1: Probabilities of the output of the scheme,

t=0 cell 4 Fig. 4 :

 44 Fig. 4: Values taken by cell 4: 11011100.

t=0Fig. 5 :

 5 Fig. 5: Values taken by the cells according to f (represented with a thick line): 00101101.

† Avaible from http://www.mpi-sb.mpg.de/LEDA. ‡ Avaible from http://diehard.darwinports.com.