SlideShare a Scribd company logo
1 of 13
Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 20XX (10 pt, Century Gothic)




    Implementation of Polynomial – ONB I Basis Conversion

     Marisa W. Paryasto#1, Budi Rahardjo#2, Intan Muchtadi-Alamsyah*3, M. Hafiz
                                         Khusyairi*4

              #
               School of Electrical Engineering, Institut Teknologi Bandung
                     Jl. Ganesha No. 10 Bandung 40132 - Indonesia
                                 1
                                 marisa@stei.itb.ac.id
                                  2br@paume.itb.ac.id

*
Algebra Research Group, Faculty of Mathematics and Natural Sciences, Institut Teknologi
                                     Bandung
                   Jl. Ganesha No. 10 Bandung 40132 - Indonesia
                                     3
                                     ntan@math.itb.ac.id
                             4
                              hafizkhusyairi@math.itb.ac.id




    Abstract. The theory of finite fields has important applications in coding

    theory and cryptography. Two type of basis of finite field G( n over
                                                               F )
                                                                2
     G( ) are of particular interest, polynomial basis and optimal normal
      F2
    basis (type I and II) of the form     { 2.. βn1 for some element
                                          β , ., p −
                                           ,β    ^
                                                    }                           α,
     β in G( n . Choosing between optimal normal basis and polinomial
           F )
            2
    basis depends on the application. This paper presents an implementation of
    an efficient method to convert from the representation of a field element in
    one basis to the representation of a field element in another basis. With this
    method, it is possible to extend an implementation in one basis so that it
    supports other choices of basis.

Keywords: finite fields, polynomial basis, normal basis, optimal normal basis,
basis conversion


1     Introduction

Cryptosystems in general are implemented over prime fields GF(p), or binary
fields GF(2n). Arithmetic in binary fields can be classified according to basis used.
Two of the most common basis used in binary fields are polynomial basis and
Author’s name, Title of paper (10 pt, Century Gothic, max. 1 line)



normal basis. Any basis in both can be used for cryptosystems; however, some
special cases such as trinomial basis, pentanomial basis and optimal normal basis
(ONB) are, in practice, used for the purpose of efficient operations. The ONB
especially are known to be more efficient for hardware implementation than
polynomial basis because the multiplication operation can be performed very
efficiently and inversion can be achieved by repeated multiplication typically using
the method of Itoh and Tsujii, and doubling can be executed by only one cyclic
shift operation.

When elliptic curve cryptosystems were first proposed, optimal normal basis
(ONB) were considered the fastest implementation method. At the present time
there are a few hardware devices that take advantage of this. Over the past few
years polynomial basis has been faster in software. A combination of both normal
basis and polynomial basis can take advantage of the strength of each for
maximum efficiency.

Consider the following scenario. An application runs mostly in software. When an
encryption is needed the process is delegated to a hardware co-processor which
uses ONB representation. The software needs to convert PB to ONB before
shipping the data to the co-processor. And when the encryption is done, an ONB-
PB conversion is then performed.

The mathematical symbols of optimal normal basis may seem overly complex, but
the implementation in computer hardware or software is very easy. Only AND,
XOR, and, ROTATE operations are needed. The fact that these are fastest
operation possible on any microprocessor is what makes optimal normal basis
(ONB) so attractive [1].

It is well known that it is possible to convert between two choices of basis for a
finite field; the general method involves a matrix multiplication. However, the
matrix is often too large. For instance, the change-of-basis matrix for GF(2n)
arithmetic will have n2 entries, requiring several thousand bytes or more of storage
in typical applications (e.g. n ≈ 155). Conversion of finite field elements from one
basis representation to another representation in a storage-efficient manner is
Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 20XX (10 pt, Century Gothic)



crucial if these techniques are to be carried out in hardware for cryptographic
applications.

Kaliski and Yin [2] describe algorithms for basis conversion between normal and
polynomial basis that involve primarily finite-field operations, rather than, for
instance, matrix multiplications. In this paper we propose some modifications from
the general algorithms for some specific cases, i.e. basis conversion between
polynomial basis and type I and type II optimal normal basis to gain more
computational efficiency, using the properties of type I and type II optimal normal
basis and field operations. We will show that in the change-of-basis matrix there
exists one row in which there exists only non-zero elements. For the case of binary
fields where the two bases have the same generator, we construct the algorithms
based on these non-zero elements. With the algorithms, it is possible to extend an
implementation in one basis so that it supports other choices of basis.

In [3] it was proposed some modifications of the general algorithm for certain
cases, for example PB to ONB-I or ONB-II conversion to optimize computation
efficiency, taking the advantage of type I and II basic features. It was proved that if
both basis have a same generator then there exists a unique row with exactly one
non-zero entry. In this case, an efficient algorithm has been constructed based on
the knowledge of the entry whereabouts. With the algorithm proposed, one basis
implementation can be done and make it possible to choose another basis.


2     Conversion Algorithm

The basis conversion is to compute the representation of an element of a finite field
in one basis, given its representation in another basis. The general solution is to
apply the change-of-basis matrix relating the two bases. Suppose that we are
converting from the representation B of w in the basis v0, v1, …, vn-1 to another
basis. The representation A of w in the second basis can be computed as the matrix
product At = MBt, where M is an n × n matrix whose columns are the representation
of vi in the second basis and we view A and B as row vectors of dimension n. We
can convert in the reverse direction by computing Bt = M-1At.
Author’s name, Title of paper (10 pt, Century Gothic, max. 1 line)



As the matrix M is potentially quite large, we aim to convert from one basis to
another without involving a large amount of storage or requiring a large number of
operations. Using the properties of type I and type II optimal normal basis and field
operations, new conversion algorithms from polynomial basis to type I and type II
optimal normal basis and vice versa are obtained.

2.1   PB to ONB-I
From now on let p = 2. We assume that both basis have same generators, i.e. {1, α,
α2,…, αn-1} is the polynomial basis and {α, α2, …, α2^n-1} is the optimal normal basis
I or II. In the following algorithms we perform the operation on polynomial basis.
Therefore, the squaring and multiplication      in the algorithms below would be
squaring and multiplication in polynomial basis.

Algorithm PB-ONBI converts from a polynomial basis representation to an optimal
normal basis I representation.     It computes one coefficient per iteration. By
[3,Proposition 3.2 (ii)] and [3,Lemma 3.4], B[n/2] = A[0]and B[i-(n/2)mod
n]=B’[i+1-(n/2)mod n]=…=Bn-i-1[n-1-(n/2)]=An-i[0] for all n ≥ i ≥ 1.

Input: A=(A[0],…,A[n-1]), the representation of an element in polynomial basis.
Output: B=(B[0],…,B[n-1]), the representation of the same element in ONB I.
FOR i = n downto 1 DO
        B[i-(n/2)mod n] ← A[0]
        A ← A2
ENDFOR

2.2   ONB-I to PB
We assume that both basis have same generators, i.e. {1, α, α2,…, αn-1} is the
polynomial basis and {α, α2, …, α2^n-1} is the optimal normal basis I. In the
following algorithms we perform the operation on ONB I. Therefore, the
multiplication in the algorithms below would performed in ONB I.           From [3,
Proposition 3.2 (i)], [3,Lemma 3.5], [3,Lemma 3.6] we get the following Algorithm
ONBI-PB which converts from an optimal normal basis I representation to a
polynomial basis representation.
Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 20XX (10 pt, Century Gothic)



Input: B=(B[0],…,B[n-1]), the representation of an element in ONB I.
Output: A=(A[0],…,A[n-1]), the representation of the same element in polynomial
basis.
Constant: X-1 = (0,…,0,1,0,…,0), where 1 is on the (n/2+1)th position,
which is the representation of α-1 in ONB I.
FOR i = 0 to n-1 DO
         A[i] ← B[n/2]
         B ← B - (A[i],…, A[i])
         B ← B × X-1
ENDFOR


3     Implementation
The algorithm described above has been implemented in C. The algorithm uses the
squaring operator on polynomial basis for polynomial to ONB I conversion and the
multiplication operation on ONB I for the other way around. The simplest way of
doing these calculations is of course by implementing the squaring and
multiplication in general case. For example, the standard way of squaring in
polynomial basis is by polynomial squaring and then takes the remainder of the
result modulo the irreducible polynomial. However, note that the bases for both
operations are different while we usually assume that one processing unit only
implement operations on one basis. Also note that the squaring on polynomial basis
will be implemented a particular polynomial basis, that is the polynomial basis
which generator is also a generator of ONB I. Similarly, one may note that in the
conversion algorithm from ONB I to polynomial basis the multiplication is also
restricted to the multiplication of an element to the inverse of the generator.

Therefore, in implementing algorithms in [3] we avoid using generic operations
algorithm and proposing two new operations algorithms under the above
restrictions. Hence, one may choose one basis for one's implementation and adapt
one of our two specific operations algorithms in terms of the above restrictions for
the conversion. For example, one may want to implement ONB I for his processing
unit. In this case, the processing unit is assumed to only be able to do squaring in
ONB I. Therefore to use the algorithms that use squaring in polynomial basis, one
Author’s name, Title of paper (10 pt, Century Gothic, max. 1 line)



may want to adapt our specific algorithm to save space and time instead of
adapting the generic squaring algorithm.

These restrictions permit us to modify the algorithms as follows.

3.1     PB to ONB-I Conversion
The most difficult from this algorithm is squaring process. The implemented
algorithm takes an even n with same generator. As shown at the picture below, the
first step it to spread the lower half of A to digit 0 to (n/2 – 1), for the even
positions. Then add the middle bit to all positions. And the last step is to spread the
higher half A to the odd position, and add it to the previous result to get A 2.

It is also important to be noticed that the modulus operation can results in negative
numbers. Some tricks are needed to anticipate the problem.

3.1.1    Squaring




                               Fig. 1 Squaring process
Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 20XX (10 pt, Century Gothic)



Below is the coding implementation of squaring process. Variable A holds the
polynomial before squaring process and B acts as a buffer to holds the calculation
result. At the end the squaring result is stored in B.

This snippet spreads the lower half elements to elements in the odd position to
buffer variable B.

   j = 0;
        for (i = 0; i < n; i++){
            if (i%2 == 0){
                 B[i] = A[j];
                j++;
            }
        }



Add every element in B with the middle element of A. To make it efficient, the
content of A[mid] is checked and the XOR-ing operation is only executed when
A[mid] == 1:

        if (A[mid] == 1){
            for (i = 0; i < n; i++)
                 B[i] = B[i] ^ 1;
        }



B is added with the higher half element of A, spreaded to the elements in the even
positions in B.

        k = mid+1;


        for (i = 0; i < n; i++){
            if((i%2) != 0 && A[k] == 1){
                  B[i] = B[i] ^ 1;
Author’s name, Title of paper (10 pt, Century Gothic, max. 1 line)



                    k++;
            }
        }



3.2   ONB-I to PB Conversion
ONB-I to PB conversion is done in three steps. Calculating sigma is performed to
arrange the position of the elements in the vector, thus the process calculating
inverse is simply to rotate the vector to the left (or “shifting up”). The variable A
holds the original position while variable a hold the “ordered” position.

void calcSigma(int *A, int *idx){
        int i, j;
        int a[n];


        //initialization
        for (i = 0; i < n; i++){
                     a[i] = 0;
        }



//put the elements “in order”

        for (i = 0; i < n; i++){
                     j = idx[i];
                     a[j] = A[i];
        }


        for (i = 0; i < n; i++){
                     A[i] = a[i];
        }
}
Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 20XX (10 pt, Century Gothic)



Calculating inverse by “shifting up” the vector.

//shifting up to get x^-1
void shiftUp(int *A){
        int a[n];
        int i;


The variable a is used to store the data during the process.



        for (i = 0; i < n; i++){
            a[i] = A[i];
        }



There are two cases, when the first element of the vector to be calculated the invers
is 1, the vector has to splitted into two vectors. The first vector contains only the 1
in the first element and 0 for the rest elements. The other vector holds other
elements except the first element which is cleared to 0.

        if (A[0] == 1){
            //split into two vectors
            //the first vector
            a[0] = 0 ;
            for (i = 1; i < n; i++)
                 a[i] = A[i];


Then the process of shifting is only applied to the second vector.

            //the second vector, all 1s
            //now shift the first vector
            a[n-1] = 0;
            for (i = 0; i < n-1; i++)
                 a[i] = a[i+1];
Author’s name, Title of paper (10 pt, Century Gothic, max. 1 line)




After the shifting process, add both vectors.



        //now add both vectors, store it in a[]
            for (i = 0; i < n; i++)
                 a[i] ^= 1;
        }


If the first element of A is not 1, do shift without splitting up the vector.



        else{ //if A[0] == 0
            //shift without splitting the vector
            a[n-1] = 0;
            for (i = 0; i < n-1; i++)
                 a[i] = a[i+1];
        }


        for (i = 0; i < n; i++){
               A[i] = a[i];
        }
}



Arrange the elements of the vector to the original position after shifting it up to get
the inverse.




void calcSigmaInvers(int *A, int *idx){
        int i, j;
        int a[n];
Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 20XX (10 pt, Century Gothic)



         for (i = 0; i < n; i++){
                  j = idx[i];
                  a[i] = A[j];
         }


         for (i = 0; i < n; i++){
                  A[i] = a[i];
         }
}




4     Analysis




                                Fig 2. Conversion Performance



The result shows that execution time for both PB to ONB-I conversion and vice
versa increases exponentially as the number of bits increases.
Author’s name, Title of paper (10 pt, Century Gothic, max. 1 line)



In terms of area, compared to Basis Conversion shown in [4] Section A.7.4, where
the complexity is O(n2), our algorithm is significantly reduce the complexity to
O(n) so that the space will be significantly reduced.

In overall, in terms of time ONB-I to PB conversion takes a slight more time
because like what have explained in 3.2, the conversion needs multiplication and
inverse process because those operations take more resources than squaring in
ONB. The result is predictable since we focus on reducing space requirement.

Further improvement to the implementation can be done to speed up the
computation. For example before executing a certain part of the code, checking
some particular conditions (checking whether a variable is 1 before XOR-ing it
with other variable) can reduce the computation time. However, the shape of the
resulting graph will be similar to Fig.2.




5     Conclusion
In this paper we have shown an implementation of a novel algorithm to perform
conversion from PB to ONB-I and vice versa. The implementation is done in C
language.

The implementation is aimed to use memory efficiently and leaves further research
for execution time-optimized implementation.




6     References

[1]    M.    Rosing,   Implementing Elliptic      Curve   Cryptography, Manning
       Publications Co., 1999.
[2]    B.S.K. Jr and Y.L. Yin, Storage-Efficient Finite Field Basis Conversion,
       RSA Laboratories, .
Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 20XX (10 pt, Century Gothic)



[3]   Intan Muchtadi-Alamsyah, Marisa W. Paryasto, Muhammad Hafiz
      Khusyairi, Finite Fields Basis Conversion, International Conference on
      Mathematics, Statistics and their Applications, June 2009.
[4]   IEEE P1363 / D13. Standard Specifications for Public Key Cryptography
      Annex A (Informative). Number-Theoretic Background.

More Related Content

What's hot

A mathematical model and a heuristic memory allocation problem
A mathematical model and a heuristic memory allocation problemA mathematical model and a heuristic memory allocation problem
A mathematical model and a heuristic memory allocation problemDiego Montero
 
The International Journal of Engineering and Science
The International Journal of Engineering and ScienceThe International Journal of Engineering and Science
The International Journal of Engineering and Sciencetheijes
 
Mining Algorithm for Weighted FP-Growth Frequent Item Sets based on Ordered F...
Mining Algorithm for Weighted FP-Growth Frequent Item Sets based on Ordered F...Mining Algorithm for Weighted FP-Growth Frequent Item Sets based on Ordered F...
Mining Algorithm for Weighted FP-Growth Frequent Item Sets based on Ordered F...Dr. Amarjeet Singh
 
Improvement in Traditional Set Partitioning in Hierarchical Trees (SPIHT) Alg...
Improvement in Traditional Set Partitioning in Hierarchical Trees (SPIHT) Alg...Improvement in Traditional Set Partitioning in Hierarchical Trees (SPIHT) Alg...
Improvement in Traditional Set Partitioning in Hierarchical Trees (SPIHT) Alg...AM Publications
 
Shape Matching and Object Recognition Using Shape Contexts
Shape Matching and Object Recognition Using Shape ContextsShape Matching and Object Recognition Using Shape Contexts
Shape Matching and Object Recognition Using Shape ContextsRatul Alahy
 
Lossless Data Compression Using Rice Algorithm Based On Curve Fitting Technique
Lossless Data Compression Using Rice Algorithm Based On Curve Fitting TechniqueLossless Data Compression Using Rice Algorithm Based On Curve Fitting Technique
Lossless Data Compression Using Rice Algorithm Based On Curve Fitting TechniqueIRJET Journal
 
Colfax-Winograd-Summary _final (1)
Colfax-Winograd-Summary _final (1)Colfax-Winograd-Summary _final (1)
Colfax-Winograd-Summary _final (1)Sangamesh Ragate
 
Parallel random projection using R high performance computing for planted mot...
Parallel random projection using R high performance computing for planted mot...Parallel random projection using R high performance computing for planted mot...
Parallel random projection using R high performance computing for planted mot...TELKOMNIKA JOURNAL
 
SPACE-EFFICIENT K-MER ALGORITHM FOR GENERALISED SUFFIX TREE
SPACE-EFFICIENT K-MER ALGORITHM FOR GENERALISED SUFFIX TREESPACE-EFFICIENT K-MER ALGORITHM FOR GENERALISED SUFFIX TREE
SPACE-EFFICIENT K-MER ALGORITHM FOR GENERALISED SUFFIX TREEijitcs
 
Mit203 analysis and design of algorithms
Mit203  analysis and design of algorithmsMit203  analysis and design of algorithms
Mit203 analysis and design of algorithmssmumbahelp
 
Random Features Strengthen Graph Neural Networks
Random Features Strengthen Graph Neural NetworksRandom Features Strengthen Graph Neural Networks
Random Features Strengthen Graph Neural Networksjoisino
 
Parallel Hardware Implementation of Convolution using Vedic Mathematics
Parallel Hardware Implementation of Convolution using Vedic MathematicsParallel Hardware Implementation of Convolution using Vedic Mathematics
Parallel Hardware Implementation of Convolution using Vedic MathematicsIOSR Journals
 
Coding and Indexing Shape Feature using Golomb-Rice Coding for CBIR Applications
Coding and Indexing Shape Feature using Golomb-Rice Coding for CBIR ApplicationsCoding and Indexing Shape Feature using Golomb-Rice Coding for CBIR Applications
Coding and Indexing Shape Feature using Golomb-Rice Coding for CBIR ApplicationsIJERDJOURNAL
 
Similarity-preserving hash for content-based audio retrieval using unsupervis...
Similarity-preserving hash for content-based audio retrieval using unsupervis...Similarity-preserving hash for content-based audio retrieval using unsupervis...
Similarity-preserving hash for content-based audio retrieval using unsupervis...IJECEIAES
 
A genetic algorithm to solve the
A genetic algorithm to solve theA genetic algorithm to solve the
A genetic algorithm to solve theIJCNCJournal
 

What's hot (18)

A mathematical model and a heuristic memory allocation problem
A mathematical model and a heuristic memory allocation problemA mathematical model and a heuristic memory allocation problem
A mathematical model and a heuristic memory allocation problem
 
The International Journal of Engineering and Science
The International Journal of Engineering and ScienceThe International Journal of Engineering and Science
The International Journal of Engineering and Science
 
Mining Algorithm for Weighted FP-Growth Frequent Item Sets based on Ordered F...
Mining Algorithm for Weighted FP-Growth Frequent Item Sets based on Ordered F...Mining Algorithm for Weighted FP-Growth Frequent Item Sets based on Ordered F...
Mining Algorithm for Weighted FP-Growth Frequent Item Sets based on Ordered F...
 
Jr3516691672
Jr3516691672Jr3516691672
Jr3516691672
 
Improvement in Traditional Set Partitioning in Hierarchical Trees (SPIHT) Alg...
Improvement in Traditional Set Partitioning in Hierarchical Trees (SPIHT) Alg...Improvement in Traditional Set Partitioning in Hierarchical Trees (SPIHT) Alg...
Improvement in Traditional Set Partitioning in Hierarchical Trees (SPIHT) Alg...
 
Shape Matching and Object Recognition Using Shape Contexts
Shape Matching and Object Recognition Using Shape ContextsShape Matching and Object Recognition Using Shape Contexts
Shape Matching and Object Recognition Using Shape Contexts
 
K010218188
K010218188K010218188
K010218188
 
Lossless Data Compression Using Rice Algorithm Based On Curve Fitting Technique
Lossless Data Compression Using Rice Algorithm Based On Curve Fitting TechniqueLossless Data Compression Using Rice Algorithm Based On Curve Fitting Technique
Lossless Data Compression Using Rice Algorithm Based On Curve Fitting Technique
 
Colfax-Winograd-Summary _final (1)
Colfax-Winograd-Summary _final (1)Colfax-Winograd-Summary _final (1)
Colfax-Winograd-Summary _final (1)
 
Parallel random projection using R high performance computing for planted mot...
Parallel random projection using R high performance computing for planted mot...Parallel random projection using R high performance computing for planted mot...
Parallel random projection using R high performance computing for planted mot...
 
SPACE-EFFICIENT K-MER ALGORITHM FOR GENERALISED SUFFIX TREE
SPACE-EFFICIENT K-MER ALGORITHM FOR GENERALISED SUFFIX TREESPACE-EFFICIENT K-MER ALGORITHM FOR GENERALISED SUFFIX TREE
SPACE-EFFICIENT K-MER ALGORITHM FOR GENERALISED SUFFIX TREE
 
Mit203 analysis and design of algorithms
Mit203  analysis and design of algorithmsMit203  analysis and design of algorithms
Mit203 analysis and design of algorithms
 
Random Features Strengthen Graph Neural Networks
Random Features Strengthen Graph Neural NetworksRandom Features Strengthen Graph Neural Networks
Random Features Strengthen Graph Neural Networks
 
Parallel Hardware Implementation of Convolution using Vedic Mathematics
Parallel Hardware Implementation of Convolution using Vedic MathematicsParallel Hardware Implementation of Convolution using Vedic Mathematics
Parallel Hardware Implementation of Convolution using Vedic Mathematics
 
Coding and Indexing Shape Feature using Golomb-Rice Coding for CBIR Applications
Coding and Indexing Shape Feature using Golomb-Rice Coding for CBIR ApplicationsCoding and Indexing Shape Feature using Golomb-Rice Coding for CBIR Applications
Coding and Indexing Shape Feature using Golomb-Rice Coding for CBIR Applications
 
Similarity-preserving hash for content-based audio retrieval using unsupervis...
Similarity-preserving hash for content-based audio retrieval using unsupervis...Similarity-preserving hash for content-based audio retrieval using unsupervis...
Similarity-preserving hash for content-based audio retrieval using unsupervis...
 
L046056365
L046056365L046056365
L046056365
 
A genetic algorithm to solve the
A genetic algorithm to solve theA genetic algorithm to solve the
A genetic algorithm to solve the
 

Viewers also liked

Metode transportasi
Metode transportasiMetode transportasi
Metode transportasiFahmy Metala
 
Plagiarism dan Jurnal Ilmiah
Plagiarism dan Jurnal IlmiahPlagiarism dan Jurnal Ilmiah
Plagiarism dan Jurnal IlmiahYeffry Handoko
 
Tutorial Sebar iklan GRATIS
Tutorial Sebar iklan GRATISTutorial Sebar iklan GRATIS
Tutorial Sebar iklan GRATISFahmy Metala
 
Tugas basworo metpen finising
Tugas basworo metpen finisingTugas basworo metpen finising
Tugas basworo metpen finisingFahmy Metala
 
Manajemen keuangan
Manajemen keuanganManajemen keuangan
Manajemen keuanganFahmy Metala
 
Kisi Kisi UAS Bashasa Indonesia FEB UMS
Kisi Kisi UAS Bashasa Indonesia FEB UMSKisi Kisi UAS Bashasa Indonesia FEB UMS
Kisi Kisi UAS Bashasa Indonesia FEB UMSFahmy Metala
 
Makalah Makalah Manajemen Oprasional Kewirausahaan
Makalah Makalah Manajemen Oprasional KewirausahaanMakalah Makalah Manajemen Oprasional Kewirausahaan
Makalah Makalah Manajemen Oprasional KewirausahaanFahmy Metala
 
Latihan menulis daftar pustaka dan kutipan
Latihan menulis daftar pustaka dan kutipan Latihan menulis daftar pustaka dan kutipan
Latihan menulis daftar pustaka dan kutipan Fahmy Metala
 
Makalah otonomi daerah
Makalah otonomi daerahMakalah otonomi daerah
Makalah otonomi daerahFahmy Metala
 
Pedoman penulisan jurnal ilmiah
Pedoman penulisan jurnal ilmiahPedoman penulisan jurnal ilmiah
Pedoman penulisan jurnal ilmiahأبو راكع
 
Kumpulan Jurnal dan Karya Ilmiah
Kumpulan Jurnal dan Karya IlmiahKumpulan Jurnal dan Karya Ilmiah
Kumpulan Jurnal dan Karya IlmiahFahmy Metala
 

Viewers also liked (12)

Metode transportasi
Metode transportasiMetode transportasi
Metode transportasi
 
Kewirausahaan
KewirausahaanKewirausahaan
Kewirausahaan
 
Plagiarism dan Jurnal Ilmiah
Plagiarism dan Jurnal IlmiahPlagiarism dan Jurnal Ilmiah
Plagiarism dan Jurnal Ilmiah
 
Tutorial Sebar iklan GRATIS
Tutorial Sebar iklan GRATISTutorial Sebar iklan GRATIS
Tutorial Sebar iklan GRATIS
 
Tugas basworo metpen finising
Tugas basworo metpen finisingTugas basworo metpen finising
Tugas basworo metpen finising
 
Manajemen keuangan
Manajemen keuanganManajemen keuangan
Manajemen keuangan
 
Kisi Kisi UAS Bashasa Indonesia FEB UMS
Kisi Kisi UAS Bashasa Indonesia FEB UMSKisi Kisi UAS Bashasa Indonesia FEB UMS
Kisi Kisi UAS Bashasa Indonesia FEB UMS
 
Makalah Makalah Manajemen Oprasional Kewirausahaan
Makalah Makalah Manajemen Oprasional KewirausahaanMakalah Makalah Manajemen Oprasional Kewirausahaan
Makalah Makalah Manajemen Oprasional Kewirausahaan
 
Latihan menulis daftar pustaka dan kutipan
Latihan menulis daftar pustaka dan kutipan Latihan menulis daftar pustaka dan kutipan
Latihan menulis daftar pustaka dan kutipan
 
Makalah otonomi daerah
Makalah otonomi daerahMakalah otonomi daerah
Makalah otonomi daerah
 
Pedoman penulisan jurnal ilmiah
Pedoman penulisan jurnal ilmiahPedoman penulisan jurnal ilmiah
Pedoman penulisan jurnal ilmiah
 
Kumpulan Jurnal dan Karya Ilmiah
Kumpulan Jurnal dan Karya IlmiahKumpulan Jurnal dan Karya Ilmiah
Kumpulan Jurnal dan Karya Ilmiah
 

Similar to Implementation of Polynomial – ONB I Basis Conversion - Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 2009

Iceei2011 marisa br_fajar_intan_kuspriyanto revision 1
Iceei2011 marisa br_fajar_intan_kuspriyanto revision 1Iceei2011 marisa br_fajar_intan_kuspriyanto revision 1
Iceei2011 marisa br_fajar_intan_kuspriyanto revision 1Marisa Paryasto
 
An Effectively Modified Firefly Algorithm for Economic Load Dispatch Problem
An Effectively Modified Firefly Algorithm for Economic Load Dispatch ProblemAn Effectively Modified Firefly Algorithm for Economic Load Dispatch Problem
An Effectively Modified Firefly Algorithm for Economic Load Dispatch ProblemTELKOMNIKA JOURNAL
 
Spatial Approximate String Keyword content Query processing
Spatial Approximate String Keyword content Query processingSpatial Approximate String Keyword content Query processing
Spatial Approximate String Keyword content Query processinginventionjournals
 
A binary particle swarm optimization approach for power system security enha...
A binary particle swarm optimization approach for power  system security enha...A binary particle swarm optimization approach for power  system security enha...
A binary particle swarm optimization approach for power system security enha...IJECEIAES
 
AN OPTIMAL FUZZY LOGIC SYSTEM FOR A NONLINEAR DYNAMIC SYSTEM USING A FUZZY BA...
AN OPTIMAL FUZZY LOGIC SYSTEM FOR A NONLINEAR DYNAMIC SYSTEM USING A FUZZY BA...AN OPTIMAL FUZZY LOGIC SYSTEM FOR A NONLINEAR DYNAMIC SYSTEM USING A FUZZY BA...
AN OPTIMAL FUZZY LOGIC SYSTEM FOR A NONLINEAR DYNAMIC SYSTEM USING A FUZZY BA...IJCNCJournal
 
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001Casiano Rodriguez-leon
 
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001Casiano Rodriguez-leon
 
Transformer_tutorial.pdf
Transformer_tutorial.pdfTransformer_tutorial.pdf
Transformer_tutorial.pdffikki11
 
COLOURED ALGEBRAS AND BIOLOGICAL RESPONSE IN QUANTUM BIOLOGICAL COMPUTING ARC...
COLOURED ALGEBRAS AND BIOLOGICAL RESPONSE IN QUANTUM BIOLOGICAL COMPUTING ARC...COLOURED ALGEBRAS AND BIOLOGICAL RESPONSE IN QUANTUM BIOLOGICAL COMPUTING ARC...
COLOURED ALGEBRAS AND BIOLOGICAL RESPONSE IN QUANTUM BIOLOGICAL COMPUTING ARC...ijcsit
 
Coloured Algebras and Biological Response in Quantum Biological Computing Arc...
Coloured Algebras and Biological Response in Quantum Biological Computing Arc...Coloured Algebras and Biological Response in Quantum Biological Computing Arc...
Coloured Algebras and Biological Response in Quantum Biological Computing Arc...AIRCC Publishing Corporation
 
IRJET- Low Complexity Pipelined FFT Design for High Throughput and Low Densit...
IRJET- Low Complexity Pipelined FFT Design for High Throughput and Low Densit...IRJET- Low Complexity Pipelined FFT Design for High Throughput and Low Densit...
IRJET- Low Complexity Pipelined FFT Design for High Throughput and Low Densit...IRJET Journal
 
Efficient methods for accurately calculating thermoelectric properties – elec...
Efficient methods for accurately calculating thermoelectric properties – elec...Efficient methods for accurately calculating thermoelectric properties – elec...
Efficient methods for accurately calculating thermoelectric properties – elec...Anubhav Jain
 
Analysis of dual core hexagonal pcf based polarization beam splitter
Analysis of dual core hexagonal pcf based polarization beam splitterAnalysis of dual core hexagonal pcf based polarization beam splitter
Analysis of dual core hexagonal pcf based polarization beam splitterAlexander Decker
 
Compressing the dependent elements of multiset
Compressing the dependent elements of multisetCompressing the dependent elements of multiset
Compressing the dependent elements of multisetIRJET Journal
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...ijceronline
 
An Extended Approach for Online Testing of Reversible Circuits
An Extended Approach for Online Testing of Reversible CircuitsAn Extended Approach for Online Testing of Reversible Circuits
An Extended Approach for Online Testing of Reversible CircuitsIOSR Journals
 
COUPLED FPGA/ASIC IMPLEMENTATION OF ELLIPTIC CURVE CRYPTO-PROCESSOR
COUPLED FPGA/ASIC IMPLEMENTATION OF ELLIPTIC CURVE CRYPTO-PROCESSORCOUPLED FPGA/ASIC IMPLEMENTATION OF ELLIPTIC CURVE CRYPTO-PROCESSOR
COUPLED FPGA/ASIC IMPLEMENTATION OF ELLIPTIC CURVE CRYPTO-PROCESSORIJNSA Journal
 

Similar to Implementation of Polynomial – ONB I Basis Conversion - Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 2009 (20)

Iceei2011 marisa br_fajar_intan_kuspriyanto revision 1
Iceei2011 marisa br_fajar_intan_kuspriyanto revision 1Iceei2011 marisa br_fajar_intan_kuspriyanto revision 1
Iceei2011 marisa br_fajar_intan_kuspriyanto revision 1
 
An Effectively Modified Firefly Algorithm for Economic Load Dispatch Problem
An Effectively Modified Firefly Algorithm for Economic Load Dispatch ProblemAn Effectively Modified Firefly Algorithm for Economic Load Dispatch Problem
An Effectively Modified Firefly Algorithm for Economic Load Dispatch Problem
 
Spatial Approximate String Keyword content Query processing
Spatial Approximate String Keyword content Query processingSpatial Approximate String Keyword content Query processing
Spatial Approximate String Keyword content Query processing
 
Ba26343346
Ba26343346Ba26343346
Ba26343346
 
A binary particle swarm optimization approach for power system security enha...
A binary particle swarm optimization approach for power  system security enha...A binary particle swarm optimization approach for power  system security enha...
A binary particle swarm optimization approach for power system security enha...
 
Assessment and linear programming under fuzzy conditions
Assessment and linear programming under fuzzy conditionsAssessment and linear programming under fuzzy conditions
Assessment and linear programming under fuzzy conditions
 
AN OPTIMAL FUZZY LOGIC SYSTEM FOR A NONLINEAR DYNAMIC SYSTEM USING A FUZZY BA...
AN OPTIMAL FUZZY LOGIC SYSTEM FOR A NONLINEAR DYNAMIC SYSTEM USING A FUZZY BA...AN OPTIMAL FUZZY LOGIC SYSTEM FOR A NONLINEAR DYNAMIC SYSTEM USING A FUZZY BA...
AN OPTIMAL FUZZY LOGIC SYSTEM FOR A NONLINEAR DYNAMIC SYSTEM USING A FUZZY BA...
 
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
 
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
 
Ijsea04031014
Ijsea04031014Ijsea04031014
Ijsea04031014
 
Transformer_tutorial.pdf
Transformer_tutorial.pdfTransformer_tutorial.pdf
Transformer_tutorial.pdf
 
COLOURED ALGEBRAS AND BIOLOGICAL RESPONSE IN QUANTUM BIOLOGICAL COMPUTING ARC...
COLOURED ALGEBRAS AND BIOLOGICAL RESPONSE IN QUANTUM BIOLOGICAL COMPUTING ARC...COLOURED ALGEBRAS AND BIOLOGICAL RESPONSE IN QUANTUM BIOLOGICAL COMPUTING ARC...
COLOURED ALGEBRAS AND BIOLOGICAL RESPONSE IN QUANTUM BIOLOGICAL COMPUTING ARC...
 
Coloured Algebras and Biological Response in Quantum Biological Computing Arc...
Coloured Algebras and Biological Response in Quantum Biological Computing Arc...Coloured Algebras and Biological Response in Quantum Biological Computing Arc...
Coloured Algebras and Biological Response in Quantum Biological Computing Arc...
 
IRJET- Low Complexity Pipelined FFT Design for High Throughput and Low Densit...
IRJET- Low Complexity Pipelined FFT Design for High Throughput and Low Densit...IRJET- Low Complexity Pipelined FFT Design for High Throughput and Low Densit...
IRJET- Low Complexity Pipelined FFT Design for High Throughput and Low Densit...
 
Efficient methods for accurately calculating thermoelectric properties – elec...
Efficient methods for accurately calculating thermoelectric properties – elec...Efficient methods for accurately calculating thermoelectric properties – elec...
Efficient methods for accurately calculating thermoelectric properties – elec...
 
Analysis of dual core hexagonal pcf based polarization beam splitter
Analysis of dual core hexagonal pcf based polarization beam splitterAnalysis of dual core hexagonal pcf based polarization beam splitter
Analysis of dual core hexagonal pcf based polarization beam splitter
 
Compressing the dependent elements of multiset
Compressing the dependent elements of multisetCompressing the dependent elements of multiset
Compressing the dependent elements of multiset
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 
An Extended Approach for Online Testing of Reversible Circuits
An Extended Approach for Online Testing of Reversible CircuitsAn Extended Approach for Online Testing of Reversible Circuits
An Extended Approach for Online Testing of Reversible Circuits
 
COUPLED FPGA/ASIC IMPLEMENTATION OF ELLIPTIC CURVE CRYPTO-PROCESSOR
COUPLED FPGA/ASIC IMPLEMENTATION OF ELLIPTIC CURVE CRYPTO-PROCESSORCOUPLED FPGA/ASIC IMPLEMENTATION OF ELLIPTIC CURVE CRYPTO-PROCESSOR
COUPLED FPGA/ASIC IMPLEMENTATION OF ELLIPTIC CURVE CRYPTO-PROCESSOR
 

More from Marisa Paryasto

Marisa - Coding and IoT for Kids - RIoT 2017
Marisa - Coding and IoT for Kids - RIoT 2017Marisa - Coding and IoT for Kids - RIoT 2017
Marisa - Coding and IoT for Kids - RIoT 2017Marisa Paryasto
 
Why i need to learn so much math for my phd research
Why i need to learn so much math for my phd researchWhy i need to learn so much math for my phd research
Why i need to learn so much math for my phd researchMarisa Paryasto
 
Marisa e-learning history and success story
Marisa   e-learning history and success storyMarisa   e-learning history and success story
Marisa e-learning history and success storyMarisa Paryasto
 
Chika -java_tutorial_general_ver_3.7
Chika  -java_tutorial_general_ver_3.7Chika  -java_tutorial_general_ver_3.7
Chika -java_tutorial_general_ver_3.7Marisa Paryasto
 
Chika tutorial c++ - ver 3 2009 2
Chika   tutorial c++ - ver 3 2009 2Chika   tutorial c++ - ver 3 2009 2
Chika tutorial c++ - ver 3 2009 2Marisa Paryasto
 
Composite Field Multiplier based on Look-Up Table for Elliptic Curve Cryptogr...
Composite Field Multiplier based on Look-Up Table for Elliptic Curve Cryptogr...Composite Field Multiplier based on Look-Up Table for Elliptic Curve Cryptogr...
Composite Field Multiplier based on Look-Up Table for Elliptic Curve Cryptogr...Marisa Paryasto
 
Marisa paryasto rancangan unit aritmetika finite field berbasis composite fie...
Marisa paryasto rancangan unit aritmetika finite field berbasis composite fie...Marisa paryasto rancangan unit aritmetika finite field berbasis composite fie...
Marisa paryasto rancangan unit aritmetika finite field berbasis composite fie...Marisa Paryasto
 
Issues in Elliptic Curve Cryptography Implementation - Internetworking Indone...
Issues in Elliptic Curve Cryptography Implementation - Internetworking Indone...Issues in Elliptic Curve Cryptography Implementation - Internetworking Indone...
Issues in Elliptic Curve Cryptography Implementation - Internetworking Indone...Marisa Paryasto
 
Marisa sidang terbuka ver 0.3
Marisa   sidang terbuka ver 0.3Marisa   sidang terbuka ver 0.3
Marisa sidang terbuka ver 0.3Marisa Paryasto
 

More from Marisa Paryasto (11)

Marisa - Coding and IoT for Kids - RIoT 2017
Marisa - Coding and IoT for Kids - RIoT 2017Marisa - Coding and IoT for Kids - RIoT 2017
Marisa - Coding and IoT for Kids - RIoT 2017
 
Why i need to learn so much math for my phd research
Why i need to learn so much math for my phd researchWhy i need to learn so much math for my phd research
Why i need to learn so much math for my phd research
 
Marisa e-learning history and success story
Marisa   e-learning history and success storyMarisa   e-learning history and success story
Marisa e-learning history and success story
 
Chika -java_tutorial_general_ver_3.7
Chika  -java_tutorial_general_ver_3.7Chika  -java_tutorial_general_ver_3.7
Chika -java_tutorial_general_ver_3.7
 
Chika tutorial c++ - ver 3 2009 2
Chika   tutorial c++ - ver 3 2009 2Chika   tutorial c++ - ver 3 2009 2
Chika tutorial c++ - ver 3 2009 2
 
Ecc intro oct 2011
Ecc intro oct 2011Ecc intro oct 2011
Ecc intro oct 2011
 
Programming language
Programming languageProgramming language
Programming language
 
Composite Field Multiplier based on Look-Up Table for Elliptic Curve Cryptogr...
Composite Field Multiplier based on Look-Up Table for Elliptic Curve Cryptogr...Composite Field Multiplier based on Look-Up Table for Elliptic Curve Cryptogr...
Composite Field Multiplier based on Look-Up Table for Elliptic Curve Cryptogr...
 
Marisa paryasto rancangan unit aritmetika finite field berbasis composite fie...
Marisa paryasto rancangan unit aritmetika finite field berbasis composite fie...Marisa paryasto rancangan unit aritmetika finite field berbasis composite fie...
Marisa paryasto rancangan unit aritmetika finite field berbasis composite fie...
 
Issues in Elliptic Curve Cryptography Implementation - Internetworking Indone...
Issues in Elliptic Curve Cryptography Implementation - Internetworking Indone...Issues in Elliptic Curve Cryptography Implementation - Internetworking Indone...
Issues in Elliptic Curve Cryptography Implementation - Internetworking Indone...
 
Marisa sidang terbuka ver 0.3
Marisa   sidang terbuka ver 0.3Marisa   sidang terbuka ver 0.3
Marisa sidang terbuka ver 0.3
 

Implementation of Polynomial – ONB I Basis Conversion - Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 2009

  • 1. Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 20XX (10 pt, Century Gothic) Implementation of Polynomial – ONB I Basis Conversion Marisa W. Paryasto#1, Budi Rahardjo#2, Intan Muchtadi-Alamsyah*3, M. Hafiz Khusyairi*4 # School of Electrical Engineering, Institut Teknologi Bandung Jl. Ganesha No. 10 Bandung 40132 - Indonesia 1 marisa@stei.itb.ac.id 2br@paume.itb.ac.id * Algebra Research Group, Faculty of Mathematics and Natural Sciences, Institut Teknologi Bandung Jl. Ganesha No. 10 Bandung 40132 - Indonesia 3 ntan@math.itb.ac.id 4 hafizkhusyairi@math.itb.ac.id Abstract. The theory of finite fields has important applications in coding theory and cryptography. Two type of basis of finite field G( n over F ) 2 G( ) are of particular interest, polynomial basis and optimal normal F2 basis (type I and II) of the form { 2.. βn1 for some element β , ., p − ,β ^ } α, β in G( n . Choosing between optimal normal basis and polinomial F ) 2 basis depends on the application. This paper presents an implementation of an efficient method to convert from the representation of a field element in one basis to the representation of a field element in another basis. With this method, it is possible to extend an implementation in one basis so that it supports other choices of basis. Keywords: finite fields, polynomial basis, normal basis, optimal normal basis, basis conversion 1 Introduction Cryptosystems in general are implemented over prime fields GF(p), or binary fields GF(2n). Arithmetic in binary fields can be classified according to basis used. Two of the most common basis used in binary fields are polynomial basis and
  • 2. Author’s name, Title of paper (10 pt, Century Gothic, max. 1 line) normal basis. Any basis in both can be used for cryptosystems; however, some special cases such as trinomial basis, pentanomial basis and optimal normal basis (ONB) are, in practice, used for the purpose of efficient operations. The ONB especially are known to be more efficient for hardware implementation than polynomial basis because the multiplication operation can be performed very efficiently and inversion can be achieved by repeated multiplication typically using the method of Itoh and Tsujii, and doubling can be executed by only one cyclic shift operation. When elliptic curve cryptosystems were first proposed, optimal normal basis (ONB) were considered the fastest implementation method. At the present time there are a few hardware devices that take advantage of this. Over the past few years polynomial basis has been faster in software. A combination of both normal basis and polynomial basis can take advantage of the strength of each for maximum efficiency. Consider the following scenario. An application runs mostly in software. When an encryption is needed the process is delegated to a hardware co-processor which uses ONB representation. The software needs to convert PB to ONB before shipping the data to the co-processor. And when the encryption is done, an ONB- PB conversion is then performed. The mathematical symbols of optimal normal basis may seem overly complex, but the implementation in computer hardware or software is very easy. Only AND, XOR, and, ROTATE operations are needed. The fact that these are fastest operation possible on any microprocessor is what makes optimal normal basis (ONB) so attractive [1]. It is well known that it is possible to convert between two choices of basis for a finite field; the general method involves a matrix multiplication. However, the matrix is often too large. For instance, the change-of-basis matrix for GF(2n) arithmetic will have n2 entries, requiring several thousand bytes or more of storage in typical applications (e.g. n ≈ 155). Conversion of finite field elements from one basis representation to another representation in a storage-efficient manner is
  • 3. Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 20XX (10 pt, Century Gothic) crucial if these techniques are to be carried out in hardware for cryptographic applications. Kaliski and Yin [2] describe algorithms for basis conversion between normal and polynomial basis that involve primarily finite-field operations, rather than, for instance, matrix multiplications. In this paper we propose some modifications from the general algorithms for some specific cases, i.e. basis conversion between polynomial basis and type I and type II optimal normal basis to gain more computational efficiency, using the properties of type I and type II optimal normal basis and field operations. We will show that in the change-of-basis matrix there exists one row in which there exists only non-zero elements. For the case of binary fields where the two bases have the same generator, we construct the algorithms based on these non-zero elements. With the algorithms, it is possible to extend an implementation in one basis so that it supports other choices of basis. In [3] it was proposed some modifications of the general algorithm for certain cases, for example PB to ONB-I or ONB-II conversion to optimize computation efficiency, taking the advantage of type I and II basic features. It was proved that if both basis have a same generator then there exists a unique row with exactly one non-zero entry. In this case, an efficient algorithm has been constructed based on the knowledge of the entry whereabouts. With the algorithm proposed, one basis implementation can be done and make it possible to choose another basis. 2 Conversion Algorithm The basis conversion is to compute the representation of an element of a finite field in one basis, given its representation in another basis. The general solution is to apply the change-of-basis matrix relating the two bases. Suppose that we are converting from the representation B of w in the basis v0, v1, …, vn-1 to another basis. The representation A of w in the second basis can be computed as the matrix product At = MBt, where M is an n × n matrix whose columns are the representation of vi in the second basis and we view A and B as row vectors of dimension n. We can convert in the reverse direction by computing Bt = M-1At.
  • 4. Author’s name, Title of paper (10 pt, Century Gothic, max. 1 line) As the matrix M is potentially quite large, we aim to convert from one basis to another without involving a large amount of storage or requiring a large number of operations. Using the properties of type I and type II optimal normal basis and field operations, new conversion algorithms from polynomial basis to type I and type II optimal normal basis and vice versa are obtained. 2.1 PB to ONB-I From now on let p = 2. We assume that both basis have same generators, i.e. {1, α, α2,…, αn-1} is the polynomial basis and {α, α2, …, α2^n-1} is the optimal normal basis I or II. In the following algorithms we perform the operation on polynomial basis. Therefore, the squaring and multiplication in the algorithms below would be squaring and multiplication in polynomial basis. Algorithm PB-ONBI converts from a polynomial basis representation to an optimal normal basis I representation. It computes one coefficient per iteration. By [3,Proposition 3.2 (ii)] and [3,Lemma 3.4], B[n/2] = A[0]and B[i-(n/2)mod n]=B’[i+1-(n/2)mod n]=…=Bn-i-1[n-1-(n/2)]=An-i[0] for all n ≥ i ≥ 1. Input: A=(A[0],…,A[n-1]), the representation of an element in polynomial basis. Output: B=(B[0],…,B[n-1]), the representation of the same element in ONB I. FOR i = n downto 1 DO B[i-(n/2)mod n] ← A[0] A ← A2 ENDFOR 2.2 ONB-I to PB We assume that both basis have same generators, i.e. {1, α, α2,…, αn-1} is the polynomial basis and {α, α2, …, α2^n-1} is the optimal normal basis I. In the following algorithms we perform the operation on ONB I. Therefore, the multiplication in the algorithms below would performed in ONB I. From [3, Proposition 3.2 (i)], [3,Lemma 3.5], [3,Lemma 3.6] we get the following Algorithm ONBI-PB which converts from an optimal normal basis I representation to a polynomial basis representation.
  • 5. Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 20XX (10 pt, Century Gothic) Input: B=(B[0],…,B[n-1]), the representation of an element in ONB I. Output: A=(A[0],…,A[n-1]), the representation of the same element in polynomial basis. Constant: X-1 = (0,…,0,1,0,…,0), where 1 is on the (n/2+1)th position, which is the representation of α-1 in ONB I. FOR i = 0 to n-1 DO A[i] ← B[n/2] B ← B - (A[i],…, A[i]) B ← B × X-1 ENDFOR 3 Implementation The algorithm described above has been implemented in C. The algorithm uses the squaring operator on polynomial basis for polynomial to ONB I conversion and the multiplication operation on ONB I for the other way around. The simplest way of doing these calculations is of course by implementing the squaring and multiplication in general case. For example, the standard way of squaring in polynomial basis is by polynomial squaring and then takes the remainder of the result modulo the irreducible polynomial. However, note that the bases for both operations are different while we usually assume that one processing unit only implement operations on one basis. Also note that the squaring on polynomial basis will be implemented a particular polynomial basis, that is the polynomial basis which generator is also a generator of ONB I. Similarly, one may note that in the conversion algorithm from ONB I to polynomial basis the multiplication is also restricted to the multiplication of an element to the inverse of the generator. Therefore, in implementing algorithms in [3] we avoid using generic operations algorithm and proposing two new operations algorithms under the above restrictions. Hence, one may choose one basis for one's implementation and adapt one of our two specific operations algorithms in terms of the above restrictions for the conversion. For example, one may want to implement ONB I for his processing unit. In this case, the processing unit is assumed to only be able to do squaring in ONB I. Therefore to use the algorithms that use squaring in polynomial basis, one
  • 6. Author’s name, Title of paper (10 pt, Century Gothic, max. 1 line) may want to adapt our specific algorithm to save space and time instead of adapting the generic squaring algorithm. These restrictions permit us to modify the algorithms as follows. 3.1 PB to ONB-I Conversion The most difficult from this algorithm is squaring process. The implemented algorithm takes an even n with same generator. As shown at the picture below, the first step it to spread the lower half of A to digit 0 to (n/2 – 1), for the even positions. Then add the middle bit to all positions. And the last step is to spread the higher half A to the odd position, and add it to the previous result to get A 2. It is also important to be noticed that the modulus operation can results in negative numbers. Some tricks are needed to anticipate the problem. 3.1.1 Squaring Fig. 1 Squaring process
  • 7. Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 20XX (10 pt, Century Gothic) Below is the coding implementation of squaring process. Variable A holds the polynomial before squaring process and B acts as a buffer to holds the calculation result. At the end the squaring result is stored in B. This snippet spreads the lower half elements to elements in the odd position to buffer variable B. j = 0; for (i = 0; i < n; i++){ if (i%2 == 0){ B[i] = A[j]; j++; } } Add every element in B with the middle element of A. To make it efficient, the content of A[mid] is checked and the XOR-ing operation is only executed when A[mid] == 1: if (A[mid] == 1){ for (i = 0; i < n; i++) B[i] = B[i] ^ 1; } B is added with the higher half element of A, spreaded to the elements in the even positions in B. k = mid+1; for (i = 0; i < n; i++){ if((i%2) != 0 && A[k] == 1){ B[i] = B[i] ^ 1;
  • 8. Author’s name, Title of paper (10 pt, Century Gothic, max. 1 line) k++; } } 3.2 ONB-I to PB Conversion ONB-I to PB conversion is done in three steps. Calculating sigma is performed to arrange the position of the elements in the vector, thus the process calculating inverse is simply to rotate the vector to the left (or “shifting up”). The variable A holds the original position while variable a hold the “ordered” position. void calcSigma(int *A, int *idx){ int i, j; int a[n]; //initialization for (i = 0; i < n; i++){ a[i] = 0; } //put the elements “in order” for (i = 0; i < n; i++){ j = idx[i]; a[j] = A[i]; } for (i = 0; i < n; i++){ A[i] = a[i]; } }
  • 9. Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 20XX (10 pt, Century Gothic) Calculating inverse by “shifting up” the vector. //shifting up to get x^-1 void shiftUp(int *A){ int a[n]; int i; The variable a is used to store the data during the process. for (i = 0; i < n; i++){ a[i] = A[i]; } There are two cases, when the first element of the vector to be calculated the invers is 1, the vector has to splitted into two vectors. The first vector contains only the 1 in the first element and 0 for the rest elements. The other vector holds other elements except the first element which is cleared to 0. if (A[0] == 1){ //split into two vectors //the first vector a[0] = 0 ; for (i = 1; i < n; i++) a[i] = A[i]; Then the process of shifting is only applied to the second vector. //the second vector, all 1s //now shift the first vector a[n-1] = 0; for (i = 0; i < n-1; i++) a[i] = a[i+1];
  • 10. Author’s name, Title of paper (10 pt, Century Gothic, max. 1 line) After the shifting process, add both vectors. //now add both vectors, store it in a[] for (i = 0; i < n; i++) a[i] ^= 1; } If the first element of A is not 1, do shift without splitting up the vector. else{ //if A[0] == 0 //shift without splitting the vector a[n-1] = 0; for (i = 0; i < n-1; i++) a[i] = a[i+1]; } for (i = 0; i < n; i++){ A[i] = a[i]; } } Arrange the elements of the vector to the original position after shifting it up to get the inverse. void calcSigmaInvers(int *A, int *idx){ int i, j; int a[n];
  • 11. Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 20XX (10 pt, Century Gothic) for (i = 0; i < n; i++){ j = idx[i]; a[i] = A[j]; } for (i = 0; i < n; i++){ A[i] = a[i]; } } 4 Analysis Fig 2. Conversion Performance The result shows that execution time for both PB to ONB-I conversion and vice versa increases exponentially as the number of bits increases.
  • 12. Author’s name, Title of paper (10 pt, Century Gothic, max. 1 line) In terms of area, compared to Basis Conversion shown in [4] Section A.7.4, where the complexity is O(n2), our algorithm is significantly reduce the complexity to O(n) so that the space will be significantly reduced. In overall, in terms of time ONB-I to PB conversion takes a slight more time because like what have explained in 3.2, the conversion needs multiplication and inverse process because those operations take more resources than squaring in ONB. The result is predictable since we focus on reducing space requirement. Further improvement to the implementation can be done to speed up the computation. For example before executing a certain part of the code, checking some particular conditions (checking whether a variable is 1 before XOR-ing it with other variable) can reduce the computation time. However, the shape of the resulting graph will be similar to Fig.2. 5 Conclusion In this paper we have shown an implementation of a novel algorithm to perform conversion from PB to ONB-I and vice versa. The implementation is done in C language. The implementation is aimed to use memory efficiently and leaves further research for execution time-optimized implementation. 6 References [1] M. Rosing, Implementing Elliptic Curve Cryptography, Manning Publications Co., 1999. [2] B.S.K. Jr and Y.L. Yin, Storage-Efficient Finite Field Basis Conversion, RSA Laboratories, .
  • 13. Jurnal Ilmiah Teknik Komputer, Vol. X, No. X, 20XX (10 pt, Century Gothic) [3] Intan Muchtadi-Alamsyah, Marisa W. Paryasto, Muhammad Hafiz Khusyairi, Finite Fields Basis Conversion, International Conference on Mathematics, Statistics and their Applications, June 2009. [4] IEEE P1363 / D13. Standard Specifications for Public Key Cryptography Annex A (Informative). Number-Theoretic Background.