HASH FUNCTION CONSTRUCTION BASED ON TIME AVERAGE MOIRÉ

An algorithm for the construction of Hash function based on optical time average moiré experimental technique is proposed in this paper. Algebraic structures of grayscale color functions and time average operators are constructed. Properties of time average operators and effects of digital image representation are explored. The fact that the inverse problem of identification of the original grayscale color function from its time averaged image is an ill-posed problem helps to construct an efficient algorithm for the construction of a new class of one-way collision free hash functions.

1. Introduction.Currently there are no technically mature techniques that provide the security service of non-repudiation in an open network environment, in the absence of trusted third parties, other than digital signature-based techniques [1].A digital signature is formed by applying a mathematical function to the electronic document [5].The recipient of the transmitted document decrypts the message digest with the originators public key, applies the same message hash function to the document, then compares the resulting digest with the transmitted version.If they are identical, then the recipient is assured that the message is unaltered and the identity of the signer is proven.
A hash function is a transformation that takes a digital input and returns a fixedsize string, which is called the hash value.Hash functions with just this property have a variety of general computational uses, but when employed in cryptography, the hash functions are usually chosen to have some additional properties: it must be relatively easy to compute hash values for any given inputs; hash functions must be one-way and collision-free [2], [15].A hash function is said to be one-way if it is hard to invert, where hard to invert means that given a hash value, it is computationally infeasible to find the input.A hash function is said to be collision-free if it is computationally infeasible to find any two different digital inputs which hash values coincide.
We will construct a hash function exploiting physical principles of optical digital image time averaging techniques.1008 M. RAGULSKIS AND Z. NAVICKAS 2. Optical Background.Geometric moiré [7], [9] is a classical optical experimental technique based on the analysis of visual patterns produced by superposition of two regular gratings that geometrically interfere.Examples of gratings are equispaced parallel lines, concentric circles, radial lines [4], [14], [8].The gratings can be superposed by double exposure photography, by reflection, by shadowing, or by direct contact [3], [6].Moiré patterns are used to measure variables such as displacements, rotations, curvature, and strain throughout the viewed area.
Double exposure geometric moiré techniques can be extended to time average geometric moir methods.Moiré grating is formed on the surface of elastic oscillating structure and time averaging techniques are used for the formation of patterns of fringes [11].Dynamic displacements can be estimated from the time average fringes, whereas the fringe order no longer represents the displacement by an integer number of pitches; the intensity of the time averaged moiré pattern is governed by mathematical relationships comprising zero order Bessel function of the first kind [12].
Moiré grating on the surface of a one-dimensional structure in the state of equilibrium can be interpreted as a harmonic function [7], [10]: where λ is the pitch of the grating.Such a continuous function is well applicable to digital image processing in virtual computational environments [10].Numerical value 0 of the function in this equation corresponds to black color; 1 -to white color; all intermediate values -to grayscale color intensity levels.The grating of a one-dimensional structure in a deformed state can be interpreted as follows [11]: where s defines the displacement from the state of equilibrium at a point x.Time averaging technique can be applied for the analysis of dynamic displacements of vibrating elastic one-dimensional structure.Then the carrier fringes are contrast modulated and the color intensity of the time average geometric moir image can be described by the following relationship [12]: where T is time of exposure; ω and ϕ are angular frequency and phase of structural vibrations around the state of equilibrium; J 0 is zero order Bessel function of the first kind.It can be noted that s now defines not static displacement, but the amplitude of dynamic displacement.Also, neither the angular frequency nor the phase has any effect on the formation of moiré fringes.Geometric moiré techniques have a general limitation associated with the fact that the displacements can be determined only in the direction orthogonal to the lines of the grating.Ability to exploit the natural microstructure of the surface as a stochastic grating eliminates this restraint.If the grayscale color intensity of a non-deformable one-dimensional body is F (x), then its time averaged grayscale intensity at a point x 0 is [13]: where s is the amplitude of harmonic oscillations of a non-deformable body.Technique for identification of parameters of in-plane vibrations presented in [13] is based on digital image processing and can be effectively exploited for the analysis of vibrating microstructures when the surface color in the steady state F (x) is known.
Inverse problems involving geometric moiré are characterized by the fact that the information of interest (e.g. the distribution of grayscale color intensity on the surface of a non-deformable body) is not directly available.The imaging device (the camera) provides measurements of a transformation of this information in the process of time averaging while the body oscillates harmonically.In practice, these measurements are both incomplete (sampling) and inaccurate (statistical noise) [13].This means that one must give up recovering the exact image.Indeed, aiming at full recovery of the information usually results in unstable solutions due to the fact that the reconstructed image is very sensitive to inevitable measurement errors.In other words, slightly different data would produce a significantly different image.In order to cope with these difficulties, the reconstructed image is usually defined as the solution of an optimization problem.Solution of the inverse problem for identification of F (x), when time average image is known, is computationally infeasible and this fact is the object of this paper.(i) f (x) is defined for all x ∈ R.
(ii) f (x) has only a finite number of discontinuity points.
Then the following functions can be constructed: where I(x) := 0, when x < 0 1, when x ≥ 0 is Heaviside step function.It is clear that dx < +∞, which can hold true even if both integrals in (ii) diverge.
Corollary 3.1.The following limits hold true for grayscale functions: If 0 corresponds to black color and 1 corresponds to white color, the "background" color at infinity is gray.
The set of all grayscale functions is denoted by Γ.It is clear that Γ ⊂ Φ.
Definition 3.3.Seminorm of a grayscale function is defined as follows: We will explain why F (x) is a seminorm but not a norm after we introduce algebraic structure of time average operators.It can be noted that Definition 3.5.Every function F (x) ∈ Γ has the opposite function F (x) which is defined as: It is clear that Definition 3.6.Arithmetic mean operator is defined for a finite set of grayscale functions F 1 (x), . . ., F n (x), n ≥ 1: Corollary 3.2.For all n ∈ N, and (ii) permutation of grayscale functions (in the square brackets) has no effect on the resulting arithmetic mean.
Corollary 3.3.The following statements are true for all α ∈ S and F (x) ∈ Γ: Proof.
Corollary 3.4.Let αα 1 , . . ., α n ∈ S and F 1 (x), . . ., F n (x) ∈ Γ.Then the following statements hold true for all n ∈ N: Corollary 3.5.Seminorm of a grayscale function possesses the following properties: Definition 3.10.Distance between any two grayscale functions F 1 (x) and F 2 (x) is defined as follows: Definition 3.10 is correct because: ; and the triangle inequality is in force: ). Definition 3.11.The set of grayscale functions Γ together with the operation of arithmetic mean [F 1 (x), . . ., F n (x)] n and operation of scalar multiplication α⊗F (x) forms an algebraic structure of grayscale functions and is denoted by It can be noted that < Γ; [. . .]] n |S; ⊗ > is the generalization of a linear functional space where the summation is replaced with the operation of arithmetic mean and the multiplication by a scalar is replaced with the generalized operation of multiplication ⊗.
for all F (x) ∈ Φ and s ≥ 0, s ∈ R; where t is time and s is the amplitude of harmonic oscillations.Proof.
Definition 4.3.Superposition of time averaging operators H s1 and H s2 is defined as: for all s 1 , s 2 ≥ 0 and F (x) ∈ Γ.
Corollary 4.4.The following relationships hold true, for all s 1 , s 2 , s 3 ≥ 0 and F (x) ∈ Γ: Lets define an operator H s1 • H s2 On the other hand,  Corollary 5.1.The following inequalities hold true: Theorem 5.1 provides insight into the process of time averaging and focuses on the quantity of grayscale color ("paint") on a surface.The paint is classified into "white paint" F (+) (x) (grayscale color intensity from 0.5 up to 1) and "black paint" F (−) (x) (from 0 up to 0.5).The quantity of pure paint is invariant -would the surface oscillate or not.But it turns out that if one zone of the surface is coated with "black paint" and another with "white paint", the time averaged image will not preserve the quantities of black and white paints invariant.Different paints will annihilate each other at appropriate rate which is dependent on the paint distribution and the amplitude s.
Example 5.3.The effect of annihilation is illustrated by eq. ( 3) and Fig. 3 -when 2π λ s is equal to a root of zero order Bessel function of the first kind, grayscale color intensity becomes equal to 0.5.It can be noted that 1  2 cos 2π λ x + 1 2 is an element of set Φ, but does not belong to set Γ. Instead, we operate with F 0 (x) = where s i = λ 2π r i , i = 1, 2, . . .and r i is the i-th root of zero order Bessel function of the first type.
The proof follows from Definition 3.2 (ii), Definition 3.1 (iv) and (v) and Theorem 5.1.From Corollary 5.4 it follows that if F 1 (x) = F 2 (x) then the following inequality holds true: 0 < [H s F 1 (x), H s F 2 (x)] 2 .This is an important conclusion which secures the collision free property of the constructed hash function.It can be noted that this property holds true when amplitude s is the same for both grayscale functions.Clearly, 0 = . Hash function must not be constructed exploiting unitary or zero operators.One has to choose some middle range of values of s instead of using extremities.That is discussed in more details in the following Section.

Effects caused by digital image representation.
It is quite natural that the time averaged grayscale color intensity distribution H s (F (x)) is calculated exploiting digital computational techniques.This leads to an immediate contradiction.It follows form Definition 4.1 that any time averaged grayscale function is a continuous function for s > 0. But it is clear that only grayscale functions with finite discontinuities at inter-pixel boundaries can be visualized exploiting digital visualization techniques.That is illustrated in Fig. 4. It is assumed that initially only 3 pixels have grayscale color intensities different from the background color (Fig. 4a).When the time average operator is applied to such a grayscale function and the amplitude s is equal to one and a half of pixel length, the theoretical color distribution in the time averaged image is presented in Fig. 4b.Unfortunately, pixel dimensions do not enable accurate reconstruction of the time averaged color intensity variation.Digital image representation implies that the image is constructed from pixels with appropriate grayscale color intensities.Fig. 4c presents digital time averaged image where color intensities are averaged at locations of the appropriate pixels.
Moreover, calculation of the definite integral in the process of time averaging (eq.6) is replaced with calculation of the limit sum.It can be noted that the step size of the limit sum is an important physical parameter [10].Time step π produces double exposure (stroboscopic) geometric moiré image.Naturally, the time step should be small for time average images.The relationship between the time step and the number of correctly reconstructed fringes is analyzed in [10].The time step (the number of discrete time moments in one half of the period of oscillation) can be one of the control (input) parameters of the hash function.Another important feature of digital image processing is the fact that only a limited number of discrete grayscale intensity levels are available (usually 256 levels from 0 up to 255). Figure 4 illustrates the transitions of time averaged images at increasing values of s.Only 16 different grayscale intensity levels (from 0 up to 15) and 3 pixels are selected for clearness.Though time averaged grayscale color distribution (different from the background color) occupies more than 3 pixels at s > 0, only the three central pixels are visualized in Fig. 5.In fact, the original grayscale levels of these 3 pixels correspond to the ones in Fig. 4a.
In general, two slightly different finite values of s can produce the same time averaged image, especially if the number of considered pixels and the number of different grayscale levels is small and s is large.Nevertheless, appropriate discrete meshing of s-axis can help to guarantee that the hash function algorithm is collisionfree.Meshing strategies depend from the number of pixels and the number of different grayscale levels and are out of scope of interest in this paper.
7. Description of the algorithm for construction of the Hash function.Many engineering problems are based on the reconstruction of parameters of time averaging operators.A typical example is presented in [13] where both the original grayscale function and its time averaged image are known.Then the amplitude s (and the direction of oscillations in a two-dimensional problem) can be determined solving the following optimization problem: Solution of the inverse problem when the grayscale function must be determined from its time averaged image turns out to be a much more complex problem.If the time averaging is performed experimentally, the problem is unsolvable due to extreme sensitivity to the inevitable measurement errors; only optimization techniques can be used for approximating F (x).Even if time averaging is performed using computational techniques, it is an ill-posed inverse problem and is practically unsolvable even if s is known.
Several considerations can be taken into account when constructing the Hash function.It is possible to eliminate even the theoretical possibility of reconstruction of the grayscale color invariant (Theorem 5.1).This feature would be important only if the static color distribution would fit into one of the intervals: 0 ≤ F (x) ≤ This algorithm is illustrated in Fig. 6 where an input set of natural numbers (Fig. 6a) is transformed to the output set (Fig. 6d).
8. Concluding remarks.One may question the definition of the grayscale function (Definition 3.2).We would like to note that the original assumption that O(x) = 1 2 has a strong physical motivation.The observation window in realistic physical experiments is finite and the areas of the analyzed body covered by the background color (if only such areas exist at all) are far away from the observation window.Then it is natural to expect that the time averaged image will be gray (if only the original static image is not very dark or very light).That is clearly demonstrated by experimental investigations where natural stochastic grayscale structure of the surface serves as a stochastic geometric moiré grating for time average analysis [13].
Alternative definition of the grayscale function could read

4 .
Algebraic Structure of Time Average Operators.Definition 4.1.Time average operator H s is defined as:

1 2 cos 2π λ x + 1 2 ,
when 1 ≤ x ≤ 9 0.5, otherwise ; F 0 (x) ∈ Γ.The effect of color annihilation can be observed at the centers of time averaged interference fringes.Nevertheless, H si F 0 (x) = O(x) as time averaged riddles are formed around interval endpoints; F 2 (x) are no coincident.

Figure 4 .
Figure 4. Discretisation of the time averaged function: a) initial color distribution; b) theoretical distribution of time averaged color (s = 0.75); c) discretised color distribution.

Figure 5 .
Figure 5. Transformation of grayscale color intensities at increasing amplitude s.

1 2 or 1 2
≤ F (x) ≤ 1 (what in fact is not likely).Stretching of the time averaged grayscale intensity scale to min-max color range would eliminate even this possibility.One may also exploit the fact that H s1 • H s2 = H s1+s2 .Double (sequential) time averaging can be applied what can be considered as the next step of algorithmic safety.The algorithm for construction of the hash function comprises three main parts: a) Acquisition of input data: function F (x) represented as grayscale color intensities at appropriate pixels and the amplitude s. b) Production of the intermediate result: H s (F (x)) (time averaged grayscale intensities at appropriate pixels).c) Delivery of output data: time averaged grayscale function stretched to min-max intensity levels.

Figure 6 .
Figure 6.Illustration of the algorithm: a) original grayscale color distribution (width of the pixels is 0.4); b) time averaged grayscale color distribution at s = 0.2; c) time averaged intensity distribution averaged at appropriate pixels; d) averaged grayscale color distribution stretched to min-max levels.