<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Methods of Crypto Protection of Color Image Pixels in Different Code Systems</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Nataliia Vozna</string-name>
          <email>nvozna@ukr.net</email>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yaroslav Nykolaichuk</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Orest Volynskyi</string-name>
          <email>orestsks@ukr.net</email>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Petro Humennyi</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrij Sydor</string-name>
        </contrib>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <fpage>1</fpage>
      <lpage>3</lpage>
      <abstract>
        <p>The relevance of the development of theoretical foundations, methods and algorithms for encoding color image pixels by the problem-oriented multifunctional data structuring and the representation of color image code pixels in Rademacher (R), Krestenson (K), Rademacher-Krestenson (RK), Haar-Krestenson (HK) and Galois (G) Systems is substantiated in this article. The purpose of the research is to increase the efficiency of the algorithms for digital image transforms, processing and recognition using modular arithmetic of extended Galois fields on the basis of mathematics of arithmetic operations of a non-positional residue number system.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>Successful development of modern computer technology,
microelectronics and telecommunication systems promotes
designing and mass production of color TV displays as well
as personal computers, mobile devices, camcorders, tablet PC
screens, industrial and large format color displays.</p>
      <p>The large-scale application of various types of video
equipment in all branches of industry and their wide-spread
personal use determines a high level of importance of the
solutions to theoretical and applied problems of increasing
and optimizing the efficiency of video image structuring
during the processes of creation, encoding, transformation,
crypto protection, transmission, archiving and access
receiving to color images as well as their use.</p>
      <p>The examples of setting and successful solving the
problems referring to this issue on the basis of the
mathematical foundations development, the implementation
of the algorithms and hardware and software tools for image
processing and recognition were thoroughly highlighted in
the works of scientific researches [1-5].</p>
      <p>Considerable attention is paid to solving research
problems in this field and creating algorithms of the image
structural properties and features.</p>
      <p>II. METHODS OF MULTIFUNCTIONAL
STRUCTURING OF COLOR IMAGE PIXELS IN THE</p>
      <p>SYSTEM OF EXTENDED GALOIS FIELDS</p>
      <p>The analysis of the mathematical foundations of the
existing algorithms for color image processing and
recognition was carried out by segmentation methods on the
basis of histogram thresholding and cumulative histograms. It
is analysis of the statistic estimates of the mean value,
dispersion, asymmetry and the degree of contrast of the
intensity histograms homogeneity taking into account the
dispersion of pixels coordinates of image fragments and
silhouettes, as well as image clustering methods [1-5].</p>
      <p>As a result, it was found that the main components of the
algorithms of the above-mentioned methods for image
processing are the following arithmetic operations:
summarizing ( ∑ xi ), division ( P(i) = ni / n0 ), absolute
difference ( xi − x j ), square ( xi2 ), multiplication ( xi × x j ),
square difference ( [xi − x j ]2 ), sum
of
multiplication
( ∑ xi x j ), which are commonly performed due to the
lowspeed arithmetic of the binary number system.</p>
      <p>III. THE METHOD FOR ENCODING RGB PIXELS
IN THE RADEMACHER AND KRESTENSON SYSTEMS</p>
      <p>According to the international RGB color model, colors
are presented as a combination of three main colors: red (R),
green (G) and blue (B) [4].</p>
      <p>In this case in the computer RGB system, the main color
has 256 gradations. Thus, the color code of the RGB system
is made up of three bytes, that is, 24 bits in the Rademacher
system.</p>
      <p>The colors of the Hamming distance pixels on a monitor,
given in Cartesian coordinates, can be coded in the Residue
Number System (K). This is implemented by introducing
three relatively simple modules ( P1, P2 , P3 ), which allow
encoding each pixel of the RGB system in the binary system
by forward integer transform of the residue number system
(RNS) according to the expression [6]:</p>
      <p>
        3
N k = res∑ bi ⋅ Bi (mod P0 ) (
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
      </p>
      <p>i=1
where B i - the orthogonal bases of RNS, which are
calculated according to diophantine equations:</p>
      <p>
        B1 = P2 ⋅ P3 ⋅ m1 ≡ 1(mod P1 ) ;
B2 = P1 ⋅ P3 ⋅ m2 ≡ 1(mod P2 ) ;
B3 = P1 ⋅ P2 ⋅ m3 ≡ 1(mod P3 ) ,
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        )
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
(
        <xref ref-type="bibr" rid="ref4">4</xref>
        )
where m1, m2 , m3 - inverse elements of the RNS [8];
      </p>
      <p>P0 = P1 ⋅ P2 ⋅ P3 - color image pixel encoding range with
color depth K 0 = Eˆ[log 2 P0 ] , Eˆ[•] - integer function with
rounding to a larger integer.</p>
      <p>RGB pixels encoding in the Rademacher-Krestenson
system is provided by selecting the following values of the
encoding range of bi remainders in the Rademacher system:
b1 = bR ;
b2 = bG ;
b3 = bB ;</p>
      <p>In addition, taking into account the coefficients m = 1.0 ,
n = 4.5907 , p = 0.0601 , in order to achieve the most
saturated green color, the range of its change can be set as
0 ≤ bG ≤ 254 that provides relevant simplicity of the
following modules: P1 = 256 , P2 = 255 , P3 = 257 .</p>
      <p>To verify the relevant simplicity of the selected modules
system, they are factorized into
multipliers: 256 = 28 , 255 = 5 * 51 , 257 - a prime number,
i.e. P0 = 16776960 , where P0 &lt; 224 = 16777216 . That is, the
condition for creating a 24-bit pixel code in the
RademacherKrestenson System is satisfied.</p>
      <p>In binary system module codes are represented as:
then, according to the inverse RNS transform, the remainder
of N k (G – color features) will be presented without
decoding it by eight low orders of N k , which is in the
Rademacher system.</p>
      <p>
        According to the Diophantine equations solution (
        <xref ref-type="bibr" rid="ref2 ref3 ref4">2-4</xref>
        ), the
following values of the inverse elements mi and basic
numbers Bi are received:
      </p>
      <p>The verification of the calculation accuracy of the RNS
transform is performed according to the equation:
N k = (bR ⋅ B1 + bG ⋅ B2 + bB ⋅ B3 ) ⋅ (mod P0 ) = 1
when
bR = 1 , bG = 1 , bB = 1 .</p>
      <p>That is,
N k = (1⋅16711425 +1⋅ 8421376 +1⋅ 8421120) ⋅ (mod P0 ) = 1 .</p>
      <p>For example, R = 10 , G = 200 , B = 100 .</p>
      <p>Then</p>
      <p>N k = (10 ⋅16711425 + 200 ⋅8421376 +100 ⋅ 8421120) ⋅
⋅ (mod16776960) = 9187850
which corresponds to the binary representation of the
RGB pixel in the Krestenson System
(1000110000110010000010102).</p>
      <p>Decoding of such representation is as follows:
ri = resN k (mod P1 ) ; gi = resN k (mod P2 ) ;
bi = resN k (mod P3 ) .</p>
      <p>IV. THE METHOD FOR COLOR IMAGE PIXELS
ENCODING IN THE RADEMACHER-KRESTENSON AND</p>
      <p>THE HAAR-KRESTENSON SYSTEMS</p>
      <p>The encoding of color image pixels according to the RGB
color model is carried out by the 24-bit binary code, when the
intensity of each of the colors is represented by the 8-bit
binary code of the Rademacher System:
r8−1

...</p>
      <p>
Rri
...

r0
;
g8−1

...</p>
      <p>
Gg i
...

g 0
;
b8−1

...</p>
      <p>
Bbi
...

b0
0 ≤ ri ≤ 255 ; 0 ≤ gi ≤ 255 0 ≤ bi ≤ 255 .</p>
      <p>Encoding of the color image RGB pixels in the
Rademacher-Krestenson (RK) and Haar-Krestenson (HK)
Systems is carried out by selecting relatively simple modules
system ( P1, P2 , P3 ), whose product exceeds the range of
quantization of the brightness values ( ri , gi , bi ).</p>
      <p>Such a condition can be satisfied by a different set of the
RNS discrete transformer modules, for
example, P1 = 5, P2 = 7, P3 = 8 , which provide encoding of ri ,
gi and bi brightness in P0 = 5* 7 *8 = 280 &gt; 255 range. The
following code structure is created in the R-K System, which
unambiguously represents the corresponding RGB-pixel
code:</p>
      <p>a2
R ∨ G ∨ Ba1 ;

a0
remainder according to the expressions: ai = res(ri mod P1 ) ;
ci = res(gi mod P2 ) , di = res(bi mod P3 ) .</p>
      <p>
        For a given set of modules, the inverse elements mi and
the basic numbers Bi are determined according to the
Diophantine equations solutions (
        <xref ref-type="bibr" rid="ref2 ref3 ref4">2-4</xref>
        ):
m1 = 1 , B1 = 56 , m2 = 3 , B2 = 120 , m3 = 3 ,
      </p>
      <p>
        Accuracy of the obtained mi and Bi values is verified
according to the expression (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ):
      </p>
      <p>N1 = (1⋅ 56 + 1⋅120 + 1⋅105) mod 280 = 1</p>
      <p>For example, the following values of color intensity of the
RGB-pixel are set as: ri = 10 , gi = 100 , bi = 37 .</p>
      <p>
        Then, RGB-pixel codes are received in the Rademacher
System:
P1 P2 P3 P1 P2 P3
ri = (000011101)(
        <xref ref-type="bibr" rid="ref5 ref7 ref8">5,7,8</xref>
        ) ; gi = (000010010)(
        <xref ref-type="bibr" rid="ref5 ref7 ref8">5,7,8</xref>
        ) ;
      </p>
      <p>
        P1 P2 P3
bi = (010010101)(
        <xref ref-type="bibr" rid="ref5 ref7 ref8">5,7,8</xref>
        ) .
      </p>
      <p>Representation of the RGB pixel code for each ri , gi and
bi intensity value in the Haar-Krestenson System is made
according to the structure:
aP1−1

....</p>
      <p>
R ∨ G ∨ Bai</p>
      <p>;
....
a0</p>
      <p>The representation of ri , gi and bi color brightness
digital values in different systems leads, correspondingly, to
different code length according to the expressions:
1. K R = log 2 28 = 8 bits in the Rademacher System (R).</p>
      <p>3
2. K R−C = ∑ [Eˆ (log 2 Pi − 1)] = 3 + 3 + 3 = 9 bits in
i−1
the Rademacher-Krestenson system (R-K).</p>
      <p>n
3. K H −C = ∑ Pi = 5 + 7 + 8 = 20 bits in the
Haari=1
Krestenson System (H-K).</p>
      <p>V. STRUCTURE DEVELOPMENT AND</p>
      <p>EXPERIMENTAL STUDIES OF STRUCTURAL, TIME
AND HARDWARE COMPLEXITY OF ADC WITH THE</p>
      <p>R AND H-K OUTPUT CODES.</p>
      <p>It is expedient to make multifunctional encoding of RGB
pixels in the R-K and H-K systems at the level of
analog-todigital conversion of the analog signals intensity of the RGB
sensors. Such a principle of multifunctional data structuring
in color formation is implemented by parallel ADC, the
structure of which is shown in Fig 1.</p>
      <p>ADC consists of 1 – input analogue bus; 2 – paraphase
comparators; 3 – input reference bus; 4– exemplary
resistors; 5 – the first logic elements "AND-NOT"; 6 – the
second logic elements "AND-NOT", 7 – output ADC bus.</p>
      <p>ADC efficiency is determined according to the
expression:
where τ k2 = 2υ
τ ADC 2 = τ k2 +τ LE2 +τ LE3 ,</p>
      <p>- switching time for paraphase
comparator;</p>
      <p>τ LE2 = 1υ - switching time for two-input logic element
"AND-NOT";
τ LE3 = 1υ</p>
      <p>switching time for multi-input logic
element (LE) "AND-NOT";</p>
      <p>That is, the efficiency of ADC is determined by the total
delay of signals:</p>
      <p>τ ADC2 = (2 +1+1)υ = 4 micro cycles.</p>
      <p>When calculating the time complexity of the ADC
components, it is taken into account that the switching
time of the paraphase comparator is 2.5 times less in
comparison with the single-phase comparator due to
positive trigger feedback between the direct and inverse
outputs.</p>
      <p>VI. THE METHOD OF CRYPTO PROTECTION OF</p>
      <p>COLOR IMAGE RGB PIXELS.</p>
      <p>Crypto protection of the RGB image pixels is
performed in order to restrict unauthorized access to color
images that are generated in real time. It's encoded in
different number systems, transmitted via communication
channels, recorded in database storage, and displayed on
the user monitors. There are different methods for
encrypting files containing color image data and data
arrays, which include a certain amount of color images. In
this case, information systems use standard algorithms for
data arrays protection from unauthorized access on the
basis of hashing, symmetric and asymmetric RSA
algorithms, elliptic curves, etc. [7, 8].</p>
      <p>The method for encryption of color images RGB pixels,
which are represented by R, R-K and H-K codes of the
described methods, is proposed. In this case, structured
RK and H-K codes are problem-oriented to increasing the
efficiency of the image transform, processing and
recognition in accordance with the modular arithmetic of
the Residue Number System.</p>
      <p>It is expedient to apply an effective method based on
hashing of certain code positions and logic combination of
bits of generated Galois sequences [9] according to the
following graphs as the main method of crypto protection
of RGB pixel codes:
,
where ai - bits of R-K or H-K pixel codes; 1 – hashing
procedure ( bi := b j , i ≠ j, i ∈ 0, n ), Pi , i ∈ 0, n - created
code of crypto protected pixel PX .</p>
      <p>Bits of Galois {Gi }codes are generated according to
secret keys.</p>
    </sec>
    <sec id="sec-2">
      <title>VII. CONCLUSIONS</title>
      <p>The relevance of the development of the theory,
methods and algorithms for encoding color image pixels
and their representation in different systems has been
substantiated. This allows to increase the efficiency of
algorithms for digital image transform, processing and
recognition on the basis of the mathematics of arithmetic
operations of the non-positional Residue Number System.</p>
      <p>The analysis of the mathematical foundations of
existing algorithms for color image processing and
recognition was carried out by segmentation methods on
the basis of histogram thresholding and cumulative
histograms, statistic estimates of the mean value,
dispersion, asymmetry and the degree of contrast of the
intensity of histograms. This is exemple homogeneity
taking into account the dispersion of pixels coordinates of
image fragments and silhouettes, as well as image
clustering methods.</p>
      <p>It is proposed to carry out structured encoding of color
image pixels by the codes of non-positional number
systems of R-K, H-K and G. This allows to increase the
efficiency of algorithms for image processing by 2-3
orders.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Otsu</surname>
            <given-names>N.</given-names>
          </string-name>
          ,
          <article-title>A threshold selection method from grey level histograms</article-title>
          ,
          <source>IEEE Trans. Systems Man Cybernet, No.9</source>
          , pp.
          <fpage>62</fpage>
          -
          <lpage>66</lpage>
          ,
          <year>1979</year>
          ..
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Zhang</given-names>
            <surname>Yudong</surname>
          </string-name>
          and
          <string-name>
            <given-names>Wu</given-names>
            <surname>Lenan</surname>
          </string-name>
          .,
          <source>Fast Document Image Binarization Based on an Improved Adaptive Otsu`s Method and Destination Word Accumulation, Jornal of Computational Information Systems, No.6</source>
          , pp.
          <fpage>1886</fpage>
          -
          <lpage>1892</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>U.</given-names>
            <surname>Ramer</surname>
          </string-name>
          , “
          <article-title>An Iterative Procedure for the Polygonal Approximation of Plane Curves,”</article-title>
          <source>Computer Graphics Image Processing</source>
          , Vol.
          <volume>1</volume>
          , No.
          <issue>3</issue>
          , pp.
          <fpage>244</fpage>
          -
          <lpage>256</lpage>
          ,
          <year>1972</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>R.</given-names>
            <surname>Melnyk</surname>
          </string-name>
          <article-title>Algorithms and methods for image processing: Teaching manual</article-title>
          .,
          <source>Lviv: Lviv Politechnika Publishing House</source>
          ,
          <volume>220</volume>
          pp.,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>N.</given-names>
            <surname>Lotoshynska</surname>
          </string-name>
          .
          <article-title>Theory of color and color formation: Teaching manual</article-title>
          , Lviv: Lviv Politechnika Publishing House,
          <year>204p</year>
          .,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>N.</given-names>
            <surname>Vozna</surname>
          </string-name>
          .,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Nykolaichuk</surname>
          </string-name>
          and
          <string-name>
            <given-names>N.</given-names>
            <surname>Shyrmovska</surname>
          </string-name>
          , “
          <article-title>Method of formation of structured data of quasistationary objects on the basis of the Residue Number System of the Krestenson basis”</article-title>
          ,
          <source>Scientific and Technical Journal "Exploration and Development of Oil and Gas Fields</source>
          , No.
          <volume>3</volume>
          (
          <issue>40</issue>
          ), pp.
          <fpage>62</fpage>
          -
          <lpage>65</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Ya. Nykolaychuk</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Kasianchuk</surname>
            and
            <given-names>I.Yakymenko</given-names>
          </string-name>
          , “
          <article-title>Theoretical Foundations for the Analytical Computation of Coefficients of Basic Numbers of Krestenson's Transformation”</article-title>
          ,
          <source>Cybernetics and Systems Analysis</source>
          , Volume
          <volume>50</volume>
          , Issue 5, pp.
          <fpage>649</fpage>
          -
          <lpage>654</lpage>
          , September,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Ya. Nykolaychuk</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Kasianchuk</surname>
            and
            <given-names>I.Yakymenko</given-names>
          </string-name>
          , “
          <article-title>Theoretical Foundations of the Modified Perfect form of Residue Number System”, Cybernetics and Systems Analysis</article-title>
          , Volume
          <volume>52</volume>
          , Issue 2, pp.
          <fpage>219</fpage>
          -
          <lpage>223</lpage>
          , March,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Nykolaichuk</surname>
          </string-name>
          ,
          <source>Galois Field Codes: Theory and Application</source>
          , Ternopil: Ltd.: Terno-graf,
          <volume>576</volume>
          pp.,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>