The document discusses block ciphers and stream ciphers. It defines block ciphers as encrypting data in fixed-size blocks using the same key for each block. Stream ciphers encrypt individual bits or characters, generating a unique key for each bit using a pseudorandom number generator. The document then focuses on stream ciphers, describing synchronous and self-synchronizing stream ciphers, linear feedback shift registers (LFSRs) used to generate keystreams, and how to determine a stream cipher's characteristic polynomial from its keystream bits.
By Tobias Grosser, Scalable Parallel Computing Laboratory
The COSMO climate and weather model delivers daily forecasts for Switzerland and many other nations. As a traditional HPC application it was developed with SIMD-CPUs in mind and large manual efforts were required to enable the 2016 move to GPU acceleration. As today's high-performance computer systems increasingly rely on accelerators to reach peak performance and manual translation to accelerators is both costly and difficult to maintain, we propose a fully automatic accelerator compiler for the automatic translation of scientific Fortran codes to CUDA GPU accelerated systems. Several challenges had to be overcome to make this reality: 1) improved scalability, 2) automatic data placement using unified memory, 3) loop rescheduling to expose coarse-grained parallelism, 4) inter-procedural loop optimization, and 5) plenty of performance tuning. Our evaluation shows that end-to-end automatic accelerator compilation is possible for non-trivial portions of the COSMO climate model, despite the lack of complete static information. Non-trivial loop optimizations previously implemented manually are performed fully automatically and memory management happens fully transparently using unified memory. Our preliminary results show notable performance improvements over sequential CPU code (40s to 8s reduction in execution time) and we are currently working on closing the remaining gap to hand-tuned GPU code. This talk is a status update on our most recent efforts and also intended to gather feedback on future research plans towards automatically mapping COSMO to FPGAs.
Tobias Grosser Bio
Tobias Grosser is a senior researcher in the Scalable Parallel Computing Laboratory (SPCL) of Torsten Hoefler at the Computer Science Department of ETH Zürich. Supported by a Google PhD Fellowship he received his doctoral degree from Universite Pierre et Marie Curie under the supervision of Albert Cohen. Tobias' research is taking place at the border of low-level compilers and high-level program transformations with the goal of enabling complex - but highly-beneficial - program transformations in a production compiler environment. He develops with the Polly loop optimizer a loop transformation framework which today is a community project supported throught the Polly Labs research laboratory. Tobias also developed advanced tiling schemes for the efficient execution of iterated stencils. Today Tobias leads the heterogeneous compute efforts in the Swiss University funded ComPASC project and is about to start a three year NSF Ambizione project on advancing automatic compilation and heterogenization techniques at ETH Zurich.
Email
bgerofi@riken.jp
For more info on The Linaro High Performance Computing (HPC) visit https://www.linaro.org/sig/hpc/
Rust
Why do you care about Rust? Who has the time to learn all these new languages? It seems like a new one is popping up every other week and this trend is growing at an exponential rate. Good news, a fair number of them are crafted really well and efficiently solve specific problems. Bad news, how do you keep up with all of this, let alone decide which languages to include in your companies technology portfolio.
Despite the challenges of all these new languages, a majority of developers are intrigued about the idea of becoming a polyglot, but don't know where to begin or don't have the time. In my polyglot travels, there is one language of late that is the sure-fire answer to the above questions, Rust.
In this talk I’ll explore the value behind becoming more polyglotic as a developer, how to pick languages to learn, and then dive deep in the the language of Rust. Which in my opinion, is hands down the best up and coming languages to learn.
About the Presenter
Anthony Broad-Crawford has been a developer since the year 2000 with a short side stint as a semi-professional poker player. Since his transition to software development Anthony has...
1. Built 8 patent receiving technologies
2. Founded two global companies
3. Been a CTO (3x), CPO (1x), and CEO (1x)
and is currently the CTO at Fooda where he manages product, user experience, and engineering. Fooda is predominantly web and mobile technology company focused on bringing great & healthy food from the best restaurant's to people while at the office.
Through his career, in production applications Anthony has used Ruby, Java, Jave (Android), Objective-C and Swift, .NET, Erlang, Scala, Node.JS, LISP, Smalltalk, and even assembly, with his recent favorite, Rust . No, not all at the same time in the same application.
Anthony now spends his time building great teams, that leverage great technology, to build great products, but still looks to codes every chance he can get :)
zkStudy Club: Subquadratic SNARGs in the Random Oracle ModelAlex Pruden
Slides for Eylon Yogev's (Bar-Ilan University) presentation at ZKStudyClub, covering his new work (co-authored w/ Alessandro Chiesa of UC Berkeley) about SNARGs in the random oracle model of sub- quadratic complexity.
Link to the original paper: https://eprint.iacr.org/2021/281.pdf
By Tobias Grosser, Scalable Parallel Computing Laboratory
The COSMO climate and weather model delivers daily forecasts for Switzerland and many other nations. As a traditional HPC application it was developed with SIMD-CPUs in mind and large manual efforts were required to enable the 2016 move to GPU acceleration. As today's high-performance computer systems increasingly rely on accelerators to reach peak performance and manual translation to accelerators is both costly and difficult to maintain, we propose a fully automatic accelerator compiler for the automatic translation of scientific Fortran codes to CUDA GPU accelerated systems. Several challenges had to be overcome to make this reality: 1) improved scalability, 2) automatic data placement using unified memory, 3) loop rescheduling to expose coarse-grained parallelism, 4) inter-procedural loop optimization, and 5) plenty of performance tuning. Our evaluation shows that end-to-end automatic accelerator compilation is possible for non-trivial portions of the COSMO climate model, despite the lack of complete static information. Non-trivial loop optimizations previously implemented manually are performed fully automatically and memory management happens fully transparently using unified memory. Our preliminary results show notable performance improvements over sequential CPU code (40s to 8s reduction in execution time) and we are currently working on closing the remaining gap to hand-tuned GPU code. This talk is a status update on our most recent efforts and also intended to gather feedback on future research plans towards automatically mapping COSMO to FPGAs.
Tobias Grosser Bio
Tobias Grosser is a senior researcher in the Scalable Parallel Computing Laboratory (SPCL) of Torsten Hoefler at the Computer Science Department of ETH Zürich. Supported by a Google PhD Fellowship he received his doctoral degree from Universite Pierre et Marie Curie under the supervision of Albert Cohen. Tobias' research is taking place at the border of low-level compilers and high-level program transformations with the goal of enabling complex - but highly-beneficial - program transformations in a production compiler environment. He develops with the Polly loop optimizer a loop transformation framework which today is a community project supported throught the Polly Labs research laboratory. Tobias also developed advanced tiling schemes for the efficient execution of iterated stencils. Today Tobias leads the heterogeneous compute efforts in the Swiss University funded ComPASC project and is about to start a three year NSF Ambizione project on advancing automatic compilation and heterogenization techniques at ETH Zurich.
Email
bgerofi@riken.jp
For more info on The Linaro High Performance Computing (HPC) visit https://www.linaro.org/sig/hpc/
Rust
Why do you care about Rust? Who has the time to learn all these new languages? It seems like a new one is popping up every other week and this trend is growing at an exponential rate. Good news, a fair number of them are crafted really well and efficiently solve specific problems. Bad news, how do you keep up with all of this, let alone decide which languages to include in your companies technology portfolio.
Despite the challenges of all these new languages, a majority of developers are intrigued about the idea of becoming a polyglot, but don't know where to begin or don't have the time. In my polyglot travels, there is one language of late that is the sure-fire answer to the above questions, Rust.
In this talk I’ll explore the value behind becoming more polyglotic as a developer, how to pick languages to learn, and then dive deep in the the language of Rust. Which in my opinion, is hands down the best up and coming languages to learn.
About the Presenter
Anthony Broad-Crawford has been a developer since the year 2000 with a short side stint as a semi-professional poker player. Since his transition to software development Anthony has...
1. Built 8 patent receiving technologies
2. Founded two global companies
3. Been a CTO (3x), CPO (1x), and CEO (1x)
and is currently the CTO at Fooda where he manages product, user experience, and engineering. Fooda is predominantly web and mobile technology company focused on bringing great & healthy food from the best restaurant's to people while at the office.
Through his career, in production applications Anthony has used Ruby, Java, Jave (Android), Objective-C and Swift, .NET, Erlang, Scala, Node.JS, LISP, Smalltalk, and even assembly, with his recent favorite, Rust . No, not all at the same time in the same application.
Anthony now spends his time building great teams, that leverage great technology, to build great products, but still looks to codes every chance he can get :)
zkStudy Club: Subquadratic SNARGs in the Random Oracle ModelAlex Pruden
Slides for Eylon Yogev's (Bar-Ilan University) presentation at ZKStudyClub, covering his new work (co-authored w/ Alessandro Chiesa of UC Berkeley) about SNARGs in the random oracle model of sub- quadratic complexity.
Link to the original paper: https://eprint.iacr.org/2021/281.pdf
EXPERT SYSTEMS AND SOLUTIONS
Project Center For Research in Power Electronics and Power Systems
IEEE 2010 , IEEE 2011 BASED PROJECTS FOR FINAL YEAR STUDENTS OF B.E
Email: expertsyssol@gmail.com,
Cell: +919952749533, +918608603634
www.researchprojects.info
OMR, CHENNAI
IEEE based Projects For
Final year students of B.E in
EEE, ECE, EIE,CSE
M.E (Power Systems)
M.E (Applied Electronics)
M.E (Power Electronics)
Ph.D Electrical and Electronics.
Training
Students can assemble their hardware in our Research labs. Experts will be guiding the projects.
EXPERT GUIDANCE IN POWER SYSTEMS POWER ELECTRONICS
We provide guidance and codes for the for the following power systems areas.
1. Deregulated Systems,
2. Wind power Generation and Grid connection
3. Unit commitment
4. Economic Dispatch using AI methods
5. Voltage stability
6. FLC Control
7. Transformer Fault Identifications
8. SCADA - Power system Automation
we provide guidance and codes for the for the following power Electronics areas.
1. Three phase inverter and converters
2. Buck Boost Converter
3. Matrix Converter
4. Inverter and converter topologies
5. Fuzzy based control of Electric Drives.
6. Optimal design of Electrical Machines
7. BLDC and SR motor Drives
Find the compact trigonometric Fourier series for the periodic signal.pdfarihantelectronics
Find the compact trigonometric Fourier series for the periodic signal x(t) and sketch the
amplitude and phase spectrum for first 4 frequency components. By inspection of the spectra,
sketch the exponential Fourier spectra. By inspection of spectra in part b), write the exponential
Fourier series for x(t)
Solution
ECE 3640 Lecture 4 – Fourier series: expansions of periodic functions. Objective: To build upon
the ideas from the previous lecture to learn about Fourier series, which are series representations
of periodic functions. Periodic signals and representations From the last lecture we learned how
functions can be represented as a series of other functions: f(t) = Xn k=1 ckik(t). We discussed
how certain classes of things can be built using certain kinds of basis functions. In this lecture we
will consider specifically functions that are periodic, and basic functions which are
trigonometric. Then the series is said to be a Fourier series. A signal f(t) is said to be periodic
with period T0 if f(t) = f(t + T0) for all t. Diagram on board. Note that this must be an everlasting
signal. Also note that, if we know one period of the signal we can find the rest of it by periodic
extension. The integral over a single period of the function is denoted by Z T0 f(t)dt. When
integrating over one period of a periodic function, it does not matter when we start. Usually it is
convenient to start at the beginning of a period. The building block functions that can be used to
build up periodic functions are themselves periodic: we will use the set of sinusoids. If the period
of f(t) is T0, let 0 = 2/T0. The frequency 0 is said to be the fundamental frequency; the
fundamental frequency is related to the period of the function. Furthermore, let F0 = 1/T0. We
will represent the function f(t) using the set of sinusoids i0(t) = cos(0t) = 1 i1(t) = cos(0t + 1)
i2(t) = cos(20t + 2) . . . Then, f(t) = C0 + X n=1 Cn cos(n0t + n) The frequency n0 is said to be
the nth harmonic of 0. Note that for each basis function associated with f(t) there are actually two
parameters: the amplitude Cn and the phase n. It will often turn out to be more useful to
represent the function using both sines and cosines. Note that we can write Cn cos(n0t + n) = Cn
cos(n) cos(n0t) Cn sin(n)sin(n0t). ECE 3640: Lecture 4 – Fourier series: expansions of periodic
functions. 2 Now let an = Cn cos n bn = Cn sin n Then Cn cos(n0t + n) = an cos(n0t) + bn
sin(n0t) Then the series representation can be f(t) = C0 + X n=1 Cn cos(n0t + n) = a0 + X n=1 an
cos(n0t) + bn sin(n0t) The first of these is the compact trigonometric Fourier series. The second
is the trigonometric Fourier series.. To go from one to the other use C0 = a0 Cn = p a 2 n + b 2 n
n = tan1 (bn/an). To complete the representation we must be able to compute the coefficients.
But this is the same sort of thing we did before. If we can show that the set of functions
{cos(n0t),sin(n0t)} is in fact an orthogonal set, then we can use the same.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Normal Labour/ Stages of Labour/ Mechanism of LabourWasim Ak
Normal labor is also termed spontaneous labor, defined as the natural physiological process through which the fetus, placenta, and membranes are expelled from the uterus through the birth canal at term (37 to 42 weeks
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
1. Block vs. Stream cipher
Idea of a block cipher: partition the text into relatively large (e.g.
128 bits) blocks and encode each block separately. The encoding of
each block generally depends on at most one of the previous blocks.
• the same “key” is used at each block.
Idea of a stream cipher: partition the text into small (e.g. 1 bit)
blocks and let the encoding of each block depend on many previous
blocks.
• for each block, a different “key” is generated.
2. Examples of stream ciphers
• One-time pad.
• Block cipher in OFB or CTR mode.
IV
y0
IV + 1
Ek
x1
y1
IV + 2
Ek
x2
y2
IV + 3
Ek
x3
y3
IV + 4
Ek
x4
y4
3. Synchronous stream ciphers
Definition 1. A stream cipher is synchronous if its key sequence does
not depend on the plain- and ciphertexts but only on the previous
elements of the key sequence and the initial key.
zi = f(zi−1, zi−2, . . . , zi−t, k),
yi = g(xi, zi).
replacements
k
z−1 z0 f z1 f z2 f z3
g y1 g y2 g y3
x1 x2 x3
4. Properties of the synchronous stream cipher
1. The encoder and decoder must be synchronized, i.e. the decoder
must always make sure that it applies the right element of the key
sequence to the given element of the ciphertext sequence.
2. If an element of the ciphertext sequence has been changed (but not
deleted) then only the corresponding plaintext element is affected.
One-time pad is a synchronous stream cipher.
Other synchronous stream ciphers could be called “pseudo one-time
pads”.
They are as secure as hard it is to distinguish (zi) from a truly random
sequence.
5. Self-synchronizing stream ciphers
Definition 2. A stream cipher is self-synchronizing if its keystream
depends on the plain- or ciphertext.
zi = f(yi−1, yi−2, . . . , yi−t, k),
yi = g(xi, zi).
k
f z1 f z2 f z3
y−1 y0
g y1 g y2 g y3
x1 x2 x3
6. Properties of a self-synchronizing stream cipher
1. If a ciphertext block is changed somehow (either randomly or adve-rently)
then only the decryptions of the next t blocks are affected.
Hence the decoding process synchronizes itself.
2. The rather quick reappearance of the correct decoding means that
the tampering of some ciphertext blocks may remain unnoticed.
3. As the cryptotext blocks depend on all preceeding plaintext blocks,
the statistical analysis of the cryptotext is hopefully more difficult.
7. Linear keystream generator
Let c1, . . . , ct ∈ {0, 1} certain fixed bits and z1, . . . , zt the initial keyst-ream
bits. The subsequent bits zi of the keystream (zn), where i > t,
are generated using the rule
zi = f(zi−1, zi−2, . . . , zi−t) =
= (c1 · zi−1 + c2 · zi−2 + . . . + ct · zi−t) mod 2.
Example: let t = 4, c1 = c2 = 0 ja c3 = c4 = 1 and (z1, z2, z3, z4) =
(0, 1, 0, 0). The output of the generator is then
0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, . . . .
8. Linear feedback shift register
(Lineaarse tagasisidega nihkeregister)
. . . is an electronic gadget for generating a linear keystream. The LFSR
corresponding to the previous example is
R4 R3 R2 R1 output
10. Periodic sequences
Definition 3. A sequence z1, z2, z3, . . . is periodic if there exists a
d ≥ 1, such that zi = zi+d for all i ≥ 1. The smallest such d is called
the period of that sequence.
If zi = zi+d holds only for all sufficiently large i-s, then z is called
eventually periodic.
Exercise. Show that the sequence of bits generated by any LFSR is
eventually periodic. Show that the period of a sequence generated by
a t-register LFSR is at most 2t − 1.
Exercise. Show that any (eventually) periodic sequence can be gene-rated
by an LFSR.
The linear complexity L(z) of a sequence z is the minimal number of
registers that a LFSR needs to output this sequence.
11. LFSR as a stream cipher
• P = C = {0, 1}∗.
• A key k ∈ K consists of
– t ∈ N;
– c1, . . . , ct ∈ {0, 1};
– z1, . . . , zt ∈ {0, 1}.
• To encode or decode x ∈ {0, 1}n: compute zi = c1zi−1+. . . ctzi−t mod
2 for t + 1 ≤ i ≤ n and output x ⊕ z.
A synchronous stream cipher. . . how difficult it is to distinguish (zi)
from a truly random sequence of bits?
I.e. if we know a part of the sequence (zi), how difficult it is to predict
the next element(s)?
12. If we know the linear complexity
Let L(z) = t.
We need to find out 2t consequtive keystream bits zr, . . . , zr+2t−1.
Known-plaintext attack can provide them.
The following equations hold:
zr+t−1 · c1 + zr+t−2 · c2 +· · ·+ zr · ct =zr+t
zr+t · c1 + zr+t−1 · c2 +· · ·+ zr+1 · ct =zr+t+1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
zr+2t−2 · c1 +zr+2t−3 · c2 +· · ·+zr+t−1 · ct =zr+2t−1
Solve this system over Z2 for (c1, . . . , ct).
It has a solution—the coefficients of the LFSR generating this sequence.
13. If we do not know the linear complexity
Then we must (over)estimate it. Let us know t ≥ L(z) = t′.
We need 2t consequtive keystream bits; solve the same system of equa-tions.
It has a solution: if (c′
1, . . . , c′
t′) are the coefficients of a minimal LFSR
generating z then
• ci = c′
i if 1 ≤ i ≤ t′;
• ci = 0 if t′ + 1 ≤ i ≤ t
is a solution to the system of equations.
There are other solutions as well.
We can even determine the linear compexity.
14. Polynomials over a ring R
Formally, a polynomial p is a mapping N → R (here N = {0, 1, 2, . . .})
with only finitely many non-zero entries. Denote p(i) by pi.
The values of p are called its coefficients.
p is usually written as p0 + p1x + p2x2 + · · · + pmxm where pm+1 =
pm+2 = · · · = 0.
Polynomials can be
• added, multiplied, divided (with remainder),
– division p/q is possible if the leading coefficient of q is invertible.
• multiplied with a scalar
• used as arguments to Euclid’s algorithm, giving their gcd.
The set of all polynomials over R, denoted R[x], is a ring.
15. Formal series over a ring R
A formal series f is a mapping N → R. The values of f are called its
coefficients. f is usually written as P∞
fixi.
i=0 Formal series can be added, multiplied, multiplied with a scalar:
(f + g)i = fi + gi (f · g)i =
i
Xj
=0
fj · gi−j (kf)i = k · fi
If f0 is invertible then f−1 exists and is given by
0 (f−1)i = −f−1
0 ·
(f−1)0 = f−1
i−1
Xj
=0
(f−1)jfi−j
The set of all formal series over R, denoted R[[x]], is a ring.
A sequence (zi) can also be seen as a formal series (over Z2).
16. Rational formal series
A formal series f is rational if it can be expressed as pq−1, where p
and q are polynomials. Then f0 = p0q−1
0 and
fi =
i
Xj
=0
0 pi −
pi−j(q−1)j = q−1
i
Xj
=1
j
X
k=1
pi−j(q−1)j−kqk =
q−1
0 pi−
i
X
k=1
qk
i
Xj
=k
pi−j(q−1)j−k = q−1
0 pi−
i
X
k=1
qk
i−k
Xj
=0
pi−k−j(q−1)j =
q−1
0 pi −
i
X
k=1
qkfi−k .
I.e. the coefficients of a rational formal series satisfy a linear recurrence.
If R is finite then the coefficients of f are eventually periodic.
17. Theorem 1. Let the coefficients of f ∈ R[[x]] be eventually periodic.
Then f is rational.
Proof. Let f0, . . . , fr−1 be the non-periodic part of f’s coefficients and
let fi = fi+t for all i ≥ r. Let
p(0) =
r−1
Xi
=0
fixi and p =
t−1
Xi
=0
fr+ixi .
Then
f = p(0)+p·xr+p·xr+t+p·xr+2t+· · · = p(0)+(1+xt+x2t+· · · )·p·xr =
p(0) + (1 − xt)−1 · p · xr =
p(0) · (1 − xt) + p · xr
1 − xt
Corollary. If f’s coefficients are periodic (i.e. r = 0) then f = p
q where
deg p deg q.
18. Rational formal series over Z2 vs. LFSRs
Let c1, . . . , ct and z1, . . . , zt be given. Compare:
fi = pi +
i
X
k=1
qkfi−k and zi =
t
X
k=1
ckzi−k
Take
• q0 = f0 = p0 = 1;
• deg q = t and qi = ci for 1 ≤ i ≤ t.
• pi = zi + ci +
i−1
Pk=1
ckzi−k for 1 ≤ i ≤ t.
Then f = z (except for the undefined z0).
q is the characteristic polynomial of the LFSR generating z.
If L(z) = t then q is the characteristic polynomial of z.
19. Finding the characteristic polynomial
Given: zr, . . . , zr+2t−1, such that t ≥ L(z). Assume r = 1.
• Compute c1, . . . , ct by solving a system of linear equations.
• Find q and p as in the previous slide.
• Return q/gcd(p, q).
20. LFSR-s with long periods
We know that an LFSR with t registers can output a sequence with a
period at most 2t − 1. How to achieve this upper bound?
Definition 4. A polynomial p ∈ R[x] is reducible if there exists a
polynomial q ∈ R[x], such that 1 ≤ deg q deg p and q | p. Otherwise
we call p irreducible.
21. Residue classes modulo polynomials
Given p ∈ R[x] with invertible leading coefficient we can consider the
set R[x]/p of all residue classes of R[x] modulo p. We can define addi-tion
and multiplication on this set.
• R[x]/p ≡ {q | q ∈ R[x], deg q deg p};
• q1 + q2 = q1 + q2;
• q1 · q2 = q1 · q2 mod p.
The structure (R[x]/p,+, ·) is a ring. If R is a field and p is irreducible
then R[x]/p is a field.
• Finding inverses in R[x]/p — just like in Zq, where q ∈ P.
– Main tool — Euclid’s algorithm.
22. Finite fields
• Let p be an irreducible polynomial of degree m over a finite field
K. Then K[x]/p is a field with pm elements.
• Up to isomorphism, there exists only one field with pm elements.
• If K is a finite field then K∗ is cyclic, i.e. it can be generated by a
single element of K∗.
Definition 5. A polynomial p ∈ K[x] is primitive if x is a generator
of (K[x]/p)∗.
Theorem 2. If a LFSR’s characteristic polynomial q is primitive then
the period of the sequence produced by this LFSR is 2deg q − 1 for any
non-zero initialization vector.
Proof follows. . .
23. LFSRs in Galois configuration
R1 R2 R3 R4 R5 R6
Normal; characteristic polynomial: 1 + x3 + x5 + x6
R0 R1 R2 R3 R4 R5
Galois configuration; char. polynomial: 1 + x + x3 + x6
Char. poly. of Galois conf: contains xi if there is extra input to Ri.
Also contains xt where t is the number of registers.
24. Evolution of state of a LFSR in Galois conf.
A state S of a t-register LFSR can be represented by a polynomial
p(S) = Pt−1
S(Ri)xi where S(Ri) is the contents of Ri in S.
i=0 The next state of LFSR in Galois conf. is then (x · p(S)) mod q where
q is the characteristic polynomial.
If q is primitive then the state of that LFSR in Galois conf. passes
through all 2t − 1 possible values.
We can define an isomorphism between the states of a normal LFSR
and its corresponding LFSR in Galois conf.
Hence the states of a LFSR pass through all 2t − 1 possible values if
the corresponding LFSR in Galois conf. has a primitive characteristic
polynomial. The period of the output sequence is then 2t − 1 as well.
25. Mirror images of polynomials
For a polynomial q = Pk
i=0 qixi with q06= 06= qk define its mirror
image by r(q) = Pk
i=0 qk−ixi.
If a (normal) LFSR has the characteristic polynomial q then the corres-ponding
LFSR in Galois conf. has the characteristic polynomial r(q).
r(q) · r(q′) = r(q · q′). Just compare the coefficients.
Hence q is irreducible iff r(q) is.
q (of degree k) is primitive iff r(q) is. Indeed, suppose an irreducible q is
not primitive, then xi ≡ 1 (mod q) for some i pk−1. I.e. there exists
a polynomial q′, such that xi−1 = qq′. Then also r(xi−1) = r(q)r(q′).
But r(xi − 1) = −(xi − 1). Hence r(q) · (−r(q′)) = xi − 1 and r(q) is
not primitive.
26. Testing irreducibility
Theorem 3. An irreducible polynomial m of d-th degree divides xpd
−x
in Zp[x].
Proof. Zp[x]/m is a field with pd elements. Hence pd
− = 0 in
Zp[x]/m for all ∈ Zp[x]/m (Fermat’s little theorem). The polynomial
x is also a member Zp[x]/m, hence xpd
− x ≡ 0 (mod m) in Zp[x].
Theorem 4. If an irreducible polynomial m of d-th degree divides
xpd′
− x then d | d′.
Proof. Let K be the field with pd′
elements; it contains exactly the roots
of xpd′
−x. K is a vector space over Zp with dimension d′. It contains
also the roots of m, let be a root of m. Let S = {Pd−1
i=0 ii | i ∈ Zp}.
Then S is a field. We have K ⊇ S ⊇ Zp, hence d′ = dimZp K =
(dimZp S) · (dimS K) = d · (dimS K) and d | d′.
27. Testing irreducibility
q ∈ Zp[x] is irreducible if gcd(q, xpi
− x) = 1 for all i ≤ (deg q)/2.
Here xpi
may be computed modulo q.
28. Testing primitiveness
For q ∈ Zp[x] to be primitive, it must first be irreducible. Let m =
deg q.
We must have xi6≡ 1 (mod q) for all i pm −1. It is sufficient to test
this only for the values i = (pm − 1)/p′ where p′ is a prime factor of
pm − 1.
29. Polynomials: exercise
Which of those polynomials are reducible, which are irreducible and
which are primitive over Z2?
1. x + 1,
2. x2,
3. x2 + 1,
4. x2 + x + 1
5. x3 + 1
6. x3 + x + 1,
7. x4 + x + 1,
8. x4 + x2 + 1.
30. Linear complexity: exercises
Exercise. Determine the linear complexities of the following sequences.
1. 1, 0, 1, 0, 1, 0, . . .
2. 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, . . .
3. 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, . . .
Exercise.
1. Construct a sequence with infinite linear complexity (i.e. a sequence
that is generated by no LFSR).
31. Shrinking generator
. . . is constructed from two LFSRs working synchronously. The shrin-king
generator produces up to one bit for each bit-pair generated by
these two LFSRs. It is defined as follows:
1. If the first LFSR outputs 1 then return the output of the second
LFSR.
2. If the first LFSR outputs 0 then return nothing (discard the output
of the second LFSR).
If the linear complexities of these two LFSR-s are L1 and L2 then the
linear complexity L of the shrinking generator satisfies
L2 · 2L1−2 L L2 · 2L1−1.