Context : The measurement of the anisotropies in the cosmic infrared background ( CIB ) is a powerful means of studying the evolution of galaxies and large-scale structures . These anisotropies have been measured by a number of experiments , from the far-infrared to the millimeter . One of the main impediments to an accurate measurement on large scales ( \lesssim 1 degree ) is the contamination of the foreground signal by Galactic dust emission . Aims : Our goal is to show that we can remove the Galactic cirrus contamination using Hi data , and thus accurately measure the clustering of starburst galaxies in the CIB . Methods : We use observations of the so-called extragalactic ELAIS N1 field at far-infrared ( 100 and 160 \mu m ) and radio ( 21 cm ) wavelengths . We compute the correlation between dust emission , traced by far-infrared observations , and Hi gas traced by 21 cm observations , and derive dust emissivities that enable us to subtract the cirrus emission from the far-infrared maps . We then derive the power spectrum of the cosmic infrared background anisotropies , as well as its mean level at 100 \mu m and 160 \mu m . Results : We compute dust emissivities for each of the Hi -velocity components ( local , intermediate , and high velocity ) . Using IRIS/IRAS data at 100 \mu m , we demonstrate that we can use the measured emissivities to determine and remove the cirrus contribution to the power spectrum of the cosmic infrared background on large angular scales where the cirrus contribution dominates.We then apply this method to Spitzer/MIPS data for 160 \mu m. We measure correlated anisotropies at 160 \mu m , and for the first time at 100 \mu m. We also combine the Hi data and Spitzer total power mode absolute measurements to determine the cosmic infrared background mean level at 160 \mu m. We find B _ { 160 } = 0.77 \pm 0.04 \pm 0.12 MJy/sr , where the first error is statistical and the second one systematic . Combining this measurement with the B _ { 100 } / B _ { 160 } color of the correlated anisotropies , we also derive the cosmic infrared background mean at 100 \mu m , B _ { 100 } = 0.24 \pm 0.08 \pm 0.04 MJy/sr . This measurement is in line with values obtained with recent models of infrared galaxy evolution and Herschel/PACS data , but is much smaller than the previous DIRBE measurements . Conclusions : The use of high-angular resolution Hi data is mandatory to accurately differentiate the cirrus from the cosmic infrared background emission . The 100 \mu m IRAS map ( and thus the map developed by Schlegel and collaborators ) in such extragalactic fields is highly contaminated by the cosmic infrared background anisotropies and hence can not be used as a Galactic cirrus tracer .