Zum Hauptinhalt springen
Artikel Open Access

On integer sequences in cryptography

  • ORCID logo EMAIL logo und ORCID logo
Veröffentlicht/Copyright: 12. März 2026

Abstract

Integer sequences play a pivotal role in cryptography, acting as foundational elements for numerous cryptographic algorithms. This comprehensive investigation examines integer sequences that have significantly impacted the sector in domains such as key generation, hash function design, and encryption protocol development, including their specific implementations. We conduct an unprecedented systematic review of existing literature, analysing fundamental properties of these sequences and detailing their contributions to well-established cryptographic areas. In addition, the research emphasises the various strengths and limitations associated with these sequences, as well as their practical applications in the realm of digital information security. This is accomplished by developing a categorisation framework that facilitates mapping of their contributions. Furthermore, this framework can be used as a reference point for future analyses in this field. In conclusion, this research underscores the potential for further discovery and innovative applications of integer sequences in the cryptographic field.

MSC 2020: 94A60; 68P25; 11K31; 11Y55

1 Introduction

1.1 Motivation

Throughout the history of cryptography, there have been instances of encountering specific sequences of numbers with distinctive characteristics. The most well-known sequence is undoubtedly the set of prime numbers, but other sequences have also been significant in various applications.

As mathematicians investigate integer sequences further, they discover new patterns and connections that are relevant in fields like cryptography. These unique sequences serve as the foundation for cryptographic algorithms and data encryption, presenting opportunities to develop secure communication systems and protect sensitive information based on their intricate relationships. Therefore, the study of integer sequences is not only a fascinating pursuit in pure mathematics but also a driving force behind innovative advancements in technology and science. Its impact, from providing fundamental insights into number theory to enabling secure communications and efficient data processing, underscores the far-reaching significance of integer sequences in our modern world.

1.2 Related work

To conduct our research, we performed a thorough search-string inspection in multiple academic databases and search engines, with a primary focus on all available journals and conference proceedings. Our search strategy used a two-stage approach, with the first stage involving manual inspection using several search strings and their combinations using booleans. The databases and digital libraries we inspected within included ScienceDirect, Scopus, ACM Digital Library, Springer, IEEE Xplore, and Web of Science. In particular, all digital resources for publications from the International Association for Cryptologic Research (IACR) [1] and the Journal of Integer Sequences [2] were carefully searched. Moreover, we also used several web search engines, such as Google Scholar and Microsoft Academics, to access related literature across all publishing formats and disciplines.

During the first stage of our inspection, we conducted combinatorial searches using the search strings made up of various strings and terms within the combination of the above-mentioned booleans. We also tested the search strings on an iterative basis to fine-tune our search results, which enabled us to tackle the challenge of aligning our searches with completeness and consistency. The search strings were distinctively implemented in the title, abstract and corresponding keywords. In addition to this, we manually obtained several reputed journals and veteran conferences related to the domain of our research. These selected journals and conferences include previously held research in the field of cryptography. We also performed a second stage procedure to obtain a more significant sample of our research at the previous stage. During this stage, we scanned all reference lists and examined all of the main research to find additional articles. Our search strategy yielded a total of approximately 500 papers from all databases considered during the initial phase. After implementing our search strategy, we finally found a total of around 100 articles related to our relevant survey study. This fine-tuning of our search results and the use of multiple databases and search engines enabled us to conduct a comprehensive and rigorous analysis of the literature in our field of study.

1.3 Our contributions

Based on a thorough exploration of the bibliographic references outlined in the preceding paragraph, it becomes apparent that there is a significant lack a systematic review within the existing literature that thoroughly describes the use of integer sequences in cryptography. Therefore, our research aims to rectify this gap within the targeted scientific domain. In doing so, we intend to establish a foundational framework that will facilitate the systematic examination of the use of integer sequences in cryptographic practices.

The contributions presented within the context of this comprehensive systematic literature review are as follows:

  1. By synthesising the findings, we aim to provide a comprehensive analysis of existing research. This seeks to offer a clear, detailed and organised overview of current trends, research gaps, and emerging directions within the field. The comprehensive analysis helps identify areas that require further exploration and emerging topics that are gaining attention.

  2. We offer critical insights and form recommendations for practitioners and researchers based on the current state of the field. This review serves as a valuable resource for both researchers and practitioners, guiding their future efforts. In addition, it fosters a deeper understanding of the cryptographic landscape and its complexities, helping to advance both theoretical and applied research.

  3. We propose a conceptual framework for future research. This framework outlines potential methodologies and theoretical perspectives that could be employed to address the limitations and gaps identified in previous studies. By suggesting new approaches and theoretical underpinnings, we aim to stimulate innovative research directions and contribute to the advancement of the field.

1.4 Paper organisation

This paper is organised as follows. In Section 2, we first recall some basic notions about sequences of integers and the main tools for analysing their behaviour. Section 3 outlines the primary sequences that have been employed in the field of cryptography throughout history. In particular, the classification of the uses of each sequence will be thoroughly and systematically carried out, with consideration given to the macro-areas below, which will provide the overarching framework for this process of categorisation and arrangement:

  1. Foundations. The paradigms, approaches, and techniques used to conceptualise, define, and provide solutions to natural cryptographic problems.

  2. Cryptographic hash functions. Algorithm that computes a numerical value (called a hash value) on a data file or electronic message that is used to represent that file or message and depends on the entire contents of the file or message. A hash function can be considered to be a fingerprint of the file or message.

  3. Secret-key cryptography. Also referred to as symmetric key cryptography, is a cryptographic algorithm that uses the same secret key for its operation and, if applicable, for reversing the effects of the operation (e.g., an AES key for encryption and decryption).

  4. Public-key cryptography. Alternatively, named asymmetric cryptography is a set of three cryptographic algorithms (KeyGen, Encrypt, and Decrypt) that can be used by two parties to send secret data over a public channel. Also known as an asymmetric encryption scheme.

  5. Cryptographic protocols. These protocols consist of a collection of rules and processes in which cryptographic algorithms are used to guarantee secure communication and data exchange.

  6. Implementation. Application that performs a cryptographic function.

  7. Attacks and cryptanalysis. The study of techniques to attempt to defeat cryptographic techniques and information system security. This includes the process of looking for errors or weaknesses in the implementation of an algorithm or of the algorithm itself.

  8. Steganography. The art, science and practice of communicating in a way that hides the existence of the communication, embedding data within other data to conceal it.

In addition, in the corresponding subsections titled ”Further details”, for each sequence, one of the applications in cryptography described synthetically is chosen and analysed in depth. In the concluding segment of our paper, in Section 4 we provide a summary analysis highlighting the macro-areas of cryptography in which the sequences have provided a significant contribution.

2 Preliminaries and notation

2.1 Integer sequences

Integer sequences are found in various areas of mathematics and have practical uses in fields such as computer science, physics, and engineering. They are frequently used to represent real-world problems and phenomena, and understanding their characteristics can provide valuable insights and solutions.

An essential part of comprehending integer sequences is to identify patterns and links between the terms. This includes examining how the sequence behaves, recognising recurring relationships, and investigating any fundamental mathematical principles that govern its development. Furthermore, researching integer sequences often involves discovering connections to other branches of mathematics such as number theory, combinatorics, and algebra. By exploring these connections, mathematicians can gain a deeper understanding of the nature of the sequences’ broader significance.

2.2 On-line Encyclopedia of Integer Sequences (OEIS)

The On-line Encyclopedia of Integer Sequences [3] (OEIS) is an extensive and extensively utilized reference database that systematically catalogs integer sequences. In 1964, Neil Sloan commenced the collection of integer sequences as a graduate student to facilitate his research in the field of combinatorics. The database was originally preserved using punch card technology. Subsequently, he published two collections of the database in book form:

  1. A Handbook of Integer Sequences (1973) [4], which contains 2,372 sequences in lexical order and assigns numbers from 1 to 2372.

  2. The Encyclopedia of Integer Sequences (1995) [5], which contains 5,488 sequences and assigns numbers M from M0000 to M5487. The encyclopedia includes references to the corresponding sequence in the A Handbook of Integer Sequences (in the few initial terms that may vary), i.e., N of N0001 to N2372 (instead of 1–2372). The encyclopedia contains the A numbers used in OEIS, while the manual does not.

The books garnered significant acclaim, and following the second edition, mathematicians consistently contributed new sequences to Sloane. With over 16,000 entries, the book format became impractical, prompting Sloane to launch an online database in August 1994, first as an e-mail service, then a website in 1996. In 1998, he established the Journal of Integer Sequences as an offshoot of this work. The database expands by approximately 10,000 entries each year. Sloane managed the sequences alone for nearly 40 years; however, since 2002, a group of associate editors and volunteers has assisted in its upkeep.

In 2004, Sloane marked the inclusion of the 100,000th sequence into the database. By 2006, the interface was revamped, and advanced search capabilities were added. In 2009, the OEIS’s intellectual property and hosting shifted to the OEIS Foundation, where Sloane acts as chairman. A wiki was established in 2010 on OEIS.org to facilitate collaboration among editors and contributors. The OEIS archives integer sequences essential to both professional and amateur mathematicians and is extensively referenced. As of April 2023, it housed over 360,000 sequences, making it the largest repository of its kind. Each sequence is given a unique AXXXXXX ID for new entries, featuring terms such as sequences, keywords, mathematical themes, and links to relevant literature, with options for graphical and musical sequence representations. The database’s search functions include keywords, subsequences, or one of 16 available fields. This resource aids mathematicians, researchers, and enthusiasts in analysing sequence patterns and properties, offering insights into mathematical phenomena and serving as a comprehensive reference.

The OEIS fosters a robust collaborative spirit in mathematics by providing a medium for experts to contribute their insights, enabling continual growth and development through the global collective wisdom of mathematicians, researchers, educators, and students.

Participation in the encyclopedia extends beyond the mere submission of new sequences and corrections. Users engage in discussions, share ideas, and offer feedback for enhancing existing sequences. Such collaboration enhances both the accuracy and comprehensiveness of the database while fostering a dynamic community where individuals collectively deepen their understanding of integer sequences.

Moreover, the encyclopedia promotes collaboration by elucidating connections among sequences and motivating exploration of these relationships. By identifying patterns, similarities, and dependencies among sequences, users aid in broadening mathematical understanding and discovering novel links that advance integer sequence research. The interactive aspect of OEIS emphasizes its role as an evolving resource driven by active member participation. User-generated content persists as a crucial element in sustaining a leading role in research, offering valuable insights and encouraging collaboration among mathematics specialists and enthusiasts.

2.3 Notation and mathematical preliminaries

The chapter serves a vital role in establishing a strong foundation for the mathematical context of the work. Its objective is to create a shared and precise language, necessary for an accurate comprehension of the material presented throughout the text. By introducing specific notation and mathematical fundamentals, we aim to establish a solid basis for developing subsequent arguments and proofs, enabling clear communication of complex concepts that will be explored in this chapter as well as throughout the entire work. Consistent notation and precise terminology demonstrate our dedication to accurately treating the material, ultimately contributing to a deeper understanding of the mathematical aspects covered in this work.

2.3.1 Sequence

Definition 2.1.

An integer sequence is a sequence (i.e., an ordered list) of integers.

Remark.

A sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called elements or terms). The sequence length is determined by the number of elements (possibly infinite).

Symbolically a n n N denotes a sequence whose nth element is given by the variable a n . For example:

(1) a 0 = 1  st element of  a n n N a 1 = 2  nd element  a 2 = 3  rd element  a n 2 = ( n 1 )  th element  a n = n + 1 th element  a n + 1 = ( n + 2 )  th element 

For the above, we can define a sequence of integers as:

  1. Explicit formula for its nth term. For example, the sequence 0, 3, 8, 15, … is formed according to the formula n 2 − 1 for the nth term.

  2. Relationship between its terms. For example, the sequence 0, 1, 1, 2, 3, 5, 8, 13, … (Fibonacci sequence – OEIS: A000045) is formed by starting with 0 and 1 and then adding any two consecutive terms to obtain the next one.

  3. Alternatively, an integer sequence may be defined by a property that members of the sequence possess and that other integers do not possess. For example, we can determine whether a given integer is a perfect number, even though we do not have a formula for the nth perfect number.

Subsequences. Subsequences are sequences formed from the given sequence by deleting some of the elements without disturbing the relative positions of the remaining elements. For example, the sequence of even positive integers (2, 4, 6, …) is a subsequence of positive integers (1, 2, 3, …). In the case of deletion of some elements, the positions of those elements change. However, the relative positions are preserved.

In formal terms, a subsequence of the sequence a n n N is any sequence of the form a n k k N , where n k k N is a strictly increasing sequence of positive integers.

2.3.2 Recurrence relation

Definition 2.2.

A recurrence relation of order k has the form:

(2) a n = f ( n , a n 1 , a n 2 , , a n k )  for  n k

where f : N × X k X is a function that involves k consecutive elements of the sequence. In this case, the initial values k are needed to define a sequence.

Example 1.

Some examples to explain the order of a relation:

  1. The Fibonacci sequence (OEIS: A000045) is defined by the recurrence relation F n  = F n−2 + F n−1, n ≥ 2, with the initial conditions F 0 = 1 and F 1 = 1. The recurrence relation is called a second-order relation because F n depends on the two previous terms of F.

  2. The relation T n = 2 T n 1 2 k T n 3 is a third-order recurrence relation. If the values of T 0, T 1 and T 2 are specified, then T n is fully defined.

  3. The recurrence relation S n = S n/2⌋ + 5, n > 0, with S 0 = 0 is infinitely ordered. To determine S n when n is even, you must go back to the terms of n/2. Since n/2 grows unbounded with n, no finite order can be given to S.

Recurrence relations appear in a natural way when studying several different kinds of problem, like computing increments or decrements of populations with given reproduction rules, colouring pictures with just two colours, computing the number of moves in different games, computing compounded interests, solving geometrical problems, etc.

2.3.3 Linear recurrence

Definition 2.3.

Integer sequences that can be described as homogeneous linear recurrence relations with constant rational coefficients.

Suppose that we have a function ϕ : N R . Setting a n  = ϕ(n) for all n N , we term the set a n n N a sequence. Assuming that we know a 1, …, a k and for n > k, we define a n = f a n 1 , , a n k for some function f : R k R . We say that a n n N is a recursively defined sequence given by the recurrence relation a n = f a n 1 , , a n k .

We say a recurrence relation is linear if f is a linear function or in other words:

(3) a n = f a n 1 , , a n k = s 1 a n 1 + + s k a n k + g ( n )

where s i R and g ( n ) R for all n [6]. Moreover, a linear recurrence relation is said to be homogeneous if g(n) = 0, and non-homogeneous if g(n) ≠ 0.

Definition 2.4.

Homogeneous linear recurrence relations with constant coefficients.

An order k homogeneous linear recurrence relation with constant coefficients is an equation of the form:

(4) i = 0 k c i a ( n i ) = c 0 a ( n ) + c 1 a ( n 1 ) + c 2 a ( n 2 ) + + c k a ( n k ) = 0

where the k coefficients c i (∀i) are constants.

Definition 2.5.

Non-homogeneous linear recurrence relations with constant coefficients.

An order k nonhomogeneous linear recurrence relation with constant coefficients is an equation of the form

(5) i = 0 k c i a ( n i ) + f ( n ) = c 0 a ( n ) + c 1 a ( n 1 ) + c 2 a ( n 2 ) + + c k a ( n k ) + f ( n ) = 0

where f(n) ≠ 0 and the k coefficients c i (∀i) are constants.

Example 2.

Non-homogeneous linear recurrences (of order 1) with constant coefficients:

(6) a 0 = 1 a n = 2 a n 1 + 1 , n 1

(7) a 0 = 1 a n = 2 a n 1 + n , n 1

(8) a 0 = 1 a n = 2 a n 1 + 2 n , n 1

Example 3.

Non-homogeneous linear recurrences (of order 2) with constant coefficients:

(9) a 0 = 1 a n = 3 a n 1 + 2 a n 2 + n , n 1

2.3.4 Recurrence equation

When formulated as an equation to be solved, recurrence relations are known as recurrence equations or sometimes difference equations (i.e. a recurrence equation is the discrete analogue of a differential equation).

Definition 2.6.

Let ( x n ) n N Z be a sequence of integers. A recurrence equation of order k is an equation of the form:

(10) x n + k = s 1 x n + k 1 + s 2 x n + k 2 + + s k x n + g ( n ) ,

where s 1 , , s k Q are fixed (rational) coefficients and g : N Z is a given integer-valued function.

If g(n) = 0 for all n, the recurrence equation is called homogeneous; otherwise, it is called non-homogeneous.

The sequence (x n ) is said to satisfy the recurrence equation if the equality above holds for all n ≥ 0, given initial conditions x 0 , x 1 , , x k 1 Z .

A sequence that satisfies a linear recurrence equation with constant coefficients and integer initial values is called a linear recurrence sequence.

If the recurrence relation is associated with a characteristic polynomial of the form:

(11) s ( X ) = 1 s 1 X s k X k = i = 1 m ( 1 α i X ) n i ,

where α i C \ { 0 } are distinct nonzero roots, then the general term x n can be expressed as:

(12) x n = i = 1 m A i ( n ) α i n ,

where each A i (n) is a polynomial of degree n i  − 1 with coefficients in C .

Such a sequence is called a recurrence sequence of order k.

Theorem 2.1

(Binet’s Formula for the Fibonacci Sequence). Let ( F n ) n N be the Fibonacci sequence defined recursively by:

F 0 = 0 , F 1 = 1 , and F n = F n 1 + F n 2  for all  n 2 .

Then F n is given explicitly by the formula:

F n = 1 5 φ n ψ n ,

where

φ = 1 + 5 2 , ψ = 1 5 2

are the roots of the characteristic polynomial X 2X − 1.

Here, φ and ψ are the two distinct real roots of the characteristic polynomial associated with the recurrence. The formula expresses F n as a linear combination of powers of these roots, and despite the irrationality of the roots, the result is always an integer for each n N .

2.3.5 Generating function

When working with sequences and recurrence relations, it is often advantageous to represent the entire sequence in a compact algebraic form. This is achieved through what is known as a generating function, which encodes the terms of a sequence as coefficients in a formal power series. Unlike traditional analytic series, generating functions are treated purely as formal expressions, without regard to issues of convergence. The variable used in the series does not take on a numerical value but instead serves as a placeholder that allows algebraic manipulation of the sequence’s structure.

Definition 2.7.

The ordinary generating function (OGF) of a sequence a n is:

(13) G a n ; x = n = 0 a n x n .

When the term generating function is used without qualification, it is usually taken to mean an ordinary generating function.

Definition 2.8.

The exponential generating function (EGF) of a sequence a n is:

(14) E G a n ; x = n = 0 a n x n n ! .

Exponential generating functions are generally more convenient than ordinary generating functions for combinatorial enumeration problems that involve labelled objects.

Example. The sequence 1, 3, 6, 10, 15, … (OEIS: A000217) of triangular numbers are given by the following explicit formulas:

(15) T n = k = 1 n k = 1 + 2 + 3 + + n = n ( n + 1 ) 2 = n 2 + n 2 , n + 1 2

The generating functions of the sequence are:

(16) G ( x ) = 1 ( 1 x ) 3 , E ( x ) = 1 + 2 x + x 2 2 e x .

Generating functions provide a very efficient way to represent sequences.

With the definition of generating functions now established, it becomes feasible to present examples that elucidate homogeneous linear recurrences.

Example 4.

Homogeneous linear recurrences (of order 1) with constant coefficients:

(17) a 0 = 1 a n = 2 a n 1 , n 1

(OEIS: A000079) Powers of 2 : a(n) = 2 n :

(18) { 1,2,4,8,16,32,64,128,256,512,1024 , } .

From the generating function of powers of 2 (where in the second version the denominator has the form of the recurrence):

(19) G 2 n , n 0 ( x ) = 1 1 2 x = x 1 1 x 1 1 2 x 1 0 ,

and setting x −1 to 10 k , we get the form:

(20) 1 0 k 1 1 0 k 1 2 1 0 k 0 = 1 0 k 1 0 k 2 = n = 0 2 n 1 0 k n , k 1 .

For example, for the first few values of k, we have (note that overlapping would occur if powers of 1 had more than k digits):

(21) k = 1 : 10 / 8 = 1.25  here  n = 3 2 n 1 0 n n = 0.01 ,  and  1 + 2 / 10 + 4 / 100 = ( 100 + 20 + 4 ) / 100 k = 2 : 100 / 98 = 1.0204081632653061224489795918 k = 3 : 1000 / 998 = 1.002004008016032064128256513 k = 4 : 10000 / 9998 = 1.00020004000800160032006401

A variant of the above is:

(22) 1 1 0 k 1 2 1 0 k 0 = 1 1 0 k 2 = n = 0 2 n 1 0 k n + 1 , k 1 .

For example, for the first few values of k, we have (note that overlapping occurs when powers of 2 have more than k digits):

(23) k = 1 : 1 / 8 = 0.125  here  n = 3 2 n 1 0 k n + 1 = 0.001 ,  and  1 / 10 + 2 / 100 + 4 / 1000 = ( 100 + 20 + 4 ) / 1000 k = 2 : 1 / 98 = 0.010204081632653061224489795918 ( A 021102 ) k = 3 : 1 / 998 = 0.001002004008016032064128256513 ( A 022002 ) k = 4 : 1 / 9998 = 0.000100020004000800160032006401

Example 5.

Homogeneous linear recurrences (of order 2) with constant coefficients:

(24) F 0 = 0 F 1 = 1 F n = F n 1 + F n 2 for n 1

(OEIS: A000045) Fibonacci numbers:

(25) { 0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765 , } .

The generating function of the Fibonacci numbers is:

(26) G F n , n 0 ( x ) = x 1 x x 2 = n = 0 F n x n .

Rewriting the generating function as (which shows the form of the recurrence in the denominator):

(27) G F n , n 0 ( x ) = x 1 1 x 1 2 x 1 1 x 1 0 ,

and setting x −1 to 10 k , we get the form:

(28) 1 0 k 1 1 0 k 2 1 0 k 1 1 0 k 0 = 1 0 k 1 0 2 k 1 0 k 1 = n = 0 F n 1 0 k n , k 1 .

For example, for the first few values of k, we have (note that overlapping occurs when Fibonacci numbers have more than k digits):

(29) k = 1 : 10 / 89 = 0.11235955056179775280898876404 k = 2 : 100 / 9899 = 0.010102030508132134559046368320 k = 3 : 1000 / 998999 = 0.0010010020030050080130210340550 k = 4 : 10000 / 99989999 = 0.00010001000200030005000800130021

A variant of the above is:

(30) 1 1 0 k 2 1 0 k 1 1 0 k 0 = 1 1 0 2 k 1 0 k 1 = n = 0 F n 1 0 k n + 1 , k 1 .

For example, for the first few values of k, we have (note that overlapping occurs when Fibonacci numbers have more than k digits):

(31) k = 1 : 1 / 89 = 0.011235955056179775280898876404 ( A 021093 ) k = 2 : 1 / 9899 = 0.00010102030508132134559046368320 k = 3 : 1 / 998999 = 0.0000010010020030050080130210340550 k = 4 : 1 / 99989999 = 0.000000010001000200030005000800130021

2.3.6 Autocorrelation

Autocorrelation is a measure of the similarity between a sequence and a time-shifted replica of the sequence. Ideally, the autocorrelation function (ACF) should be impulsive, i.e. peak value at zero time shift and zero values at all other time shifts.

Autocorrelation is a mathematical tool used to measure the similarity between a sequence and a shifted version of itself. It plays a fundamental role in the analysis of discrete-time signals, combinatorial sequences, and in the evaluation of pseudorandomness and periodicity.

Let ( a n ) n = 0 N 1 be a finite sequence of real or complex numbers. The aperiodic autocorrelation function (ACF) of the sequence is defined as:

(32) A C F ( k ) = n = 0 N k 1 a n a n + k ̄ , for  k = 0,1 , , N 1 ,

where a n + k ̄ denotes the complex conjugate of a n+k . In the real-valued case, the conjugate is simply a n+k . This quantity represents the degree of similarity between the sequence and a version shifted by k units.

In many contexts, particularly in coding theory and signal design, one seeks sequences with impulsive autocorrelation, meaning:

(33) A C F ( 0 )  is maximal , A C F ( k ) = 0 for all  k 0 .

Such sequences are orthogonal to their shifted versions, which makes them ideal for applications like radar, spread-spectrum communication, and synchronization.

For periodic sequences of length N, the periodic autocorrelation function is given by:

(34) P A C F ( k ) = n = 0 N 1 a n a ( n + k ) mod N ̄ .

Autocorrelation analysis is also a powerful diagnostic tool for studying structural regularity. For example, low autocorrelation values at non-zero shifts indicate the absence of strong internal patterns or repetitions, a property desirable in pseudorandom and noise-like sequences.

2.3.7 Crosscorrelation

Crosscorrelation is a fundamental operation used to quantify the similarity between two distinct sequences. It extends the concept of autocorrelation to the case where the sequences are not necessarily identical. In applications such as digital communications, radar, and coding theory, crosscorrelation provides a measure of how distinguishable two signals or sequences are when compared under all possible relative shifts.

Let ( a n ) n = 0 N 1 and ( b n ) n = 0 N 1 be two sequences of real or complex numbers of the same length N. The aperiodic crosscorrelation function is defined as:

(35) C C F a , b ( k ) = n = 0 N k 1 a n b n + k ̄ , for  k = 0,1 , , N 1 ,

where b n + k ̄ denotes the complex conjugate of b n+k . This expression represents the inner product of the first sequence with a right-shifted version of the second sequence.

The value CCF a,b (k) captures the level of alignment between a n and b n+k . High absolute values indicate similarity at a given shift, while values near zero suggest orthogonality or lack of correlation at that shift.

For periodic sequences, the periodic crosscorrelation function is defined as:

(36) P C C F a , b ( k ) = n = 0 N 1 a n b ( n + k ) mod N ̄ .

Ideally, one seeks families of sequences such that the crosscorrelation values are zero (or very small) for all nonzero shifts:

(37) C C F a , b ( k ) 0 for all  k 0 .

This property is crucial in contexts where multiple signals coexist (such as CDMA systems), since low crosscorrelation minimizes mutual interference and allows for reliable separation of signals.

Sequences with near-zero crosscorrelation are also essential in the design of orthogonal codes, spread-spectrum systems, and pseudorandom number generation, where they contribute to noise resilience and improved signal detectability.

2.3.8 Analysis

Various methodologies can be used to analyse integer sequences [4], 5]. These include using a data compression algorithm, computing the discrete Fourier transform, or seeking a linear recurrence equation that links the terms or a generating function that produces them. Moreover, there exist a substantial number of transformations that establish a connection between different integer sequences. Such transformations include the Euler transform, the exponential transform, the Möbius transform, and others.

3 Cryptography applications

3.1 Prime numbers

The history of prime numbers dates back to ancient times. Greek mathematicians, who were the first to study them extensively. The mathematicians of Pythagorean school (500 BC to 300 BC) were interested in numbers for their mystical and numerological properties, and they understood the idea of primality. The Rhind Mathematical Papyrus, from around 1550 BC, has Egyptian fraction expansions of different forms for prime and composite numbers. Euclid’s Elements (c. 300 BC) proves the infinitude of primes and the fundamental theorem of arithmetic and shows how to construct a perfect number from a Mersenne prime. Eratosthenes, another Greek mathematician, created a screening method known as the Sieve of Eratosthenes, which allows all the prime numbers of a limited list to be identified by crossing multiples.

Interest in prime numbers was revived at the end of the Middle Ages. In the 17th century, the French monk Marin Mersenne defined the prime numbers that bear his name, obtained as M p  = 2 p − 1. Italian mathematician Pietro Cataldi had already shown in 1588 that 219 − 1 = 524287 is prime, setting a record for his time. In the 19th century, mathematicians such as Gauss and Riemann made further advances in the study of prime numbers, including the Prime Number Theorem. In the 20th century, computers gradually became important in calculating data for theorists to ponder. Since 1951, all the largest known primes have been found using tests on computers, such as the Lucas-Lehmer primality test. The search for ever-larger primes has generated interest and spurred the development of various branches of number theory, focussing on analytic or algebraic aspects of numbers.

Today, prime numbers are used in a variety of fields, including computer science, cryptography, and number theory.

3.1.1 Proprieties

Definition 3.1.

A number p is prime if (and only if) it is greater than 1 and has no positive divisors except for 1 and p.

As is well known since primary school, by multiplying prime numbers, we can obtain in an essentially unique way each positive integer number. This is the gist of the Fundamental Theorem of Arithmetic, which Euclid already knew and expounded in Book VII of his Elements. Before discussing the Fundamental Theorem of Arithmetic, it is necessary to state the following simple but crucial characterisation of prime numbers.

OEIS. Table 1 lists the first terms of the sequence, which are also available in the OEIS database.

Table 1:

Number primes in OEIS database.

A-number A000040
Name The prime numbers.
Data 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, …
Offset 1, 1
Link https://oeis.org/A000040

Proposition 3.1.

A positive integer number p > 1 is irreducible if and only if the following property holds: (P) whenever p divides a product ab, p divides a or b.

We are now in a position to prove the following.

Theorem 3.1.

(Fundamental Theorem of Arithmetic). Let n be an integer greater than 1. Then:

(38) n = p 1 h 1 p 2 h 2 p 3 h 3 p s h s ,

where p 1, p 2, …, p s are distinct prime numbers and the exponents h j are positive, for all j = 1, …, s. Furthermore, the representation (38) for n, called prime decomposition or factorisation of n, is unique up to the order of the factors.

(The distribution of prime numbers). How many prime numbers are there? Euclid already knew the following theorem, which can be proved in several ways. We give here a completely elementary proof dating back to Euclid himself.

Corollary 3.1.

There are infinitely many prime numbers.

Recurrence relation. A possible formula using a recurrence relation is defined by:

(39) a n = a n 1 + gcd n , a n 1 , a 1 = 7

where gcd(x, y) denotes the greatest common divisor of x and y. The sequence of differences a n+1 − a n starts with 1, 1, 1, 5, 3, 1, 1, 1, 1, 11, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 3, 1, … (sequence OEIS: A132199). It is proven that this sequence contains only ones and prime numbers [7]. However, it does not contain all the prime numbers, since the terms gcd  n + 1 , a n are always odd and thus never equal to 2. 587 is the smallest prime (other than 2) not appearing in the first 10,000 results that are different from 1.

Nevertheless, it was conjectured that it contains all odd primes, even though it is rather inefficient. It is important to note that there is not a trivial programme that enumerates all and only prime numbers, as well as more efficient ones, so these recurrence relations are more curious than useful.

Functions. The distribution of prime numbers among the natural numbers has been the subject of mathematical inquiry since antiquity. While many aspects of this distribution have been explored, it remains largely unknown and exhibits irregularities that resist simple characterization. Although primes follow a deterministic pattern, their apparent irregular spacing has often been described as resembling randomness, even though the underlying structure is not fully understood. For this reason, functions that generate primes with some regularity have been regarded as heuristically significant in the study of prime numbers.

In order to obtain prime numbers, it is natural to ask for functions f defined for all natural numbers n ≥ 1, which can be calculated in practice and produce some or all prime numbers. Several prime-generating functions can be classified into three classes for this purpose [8]:

  1. f(n) = p n ; (the nth prime) for all n ≥ 1.

  2. f(n) is always a prime number, and if nm, then f(n) ≠ f(m).

  3. The set of prime numbers is equal to the set of positive values assumed by the function.

In practice, these functions are generally impossible to compute. For example, both Gandhi’s formula [9]:

(40) p n = 1 log 2 1 2 + d P n 1 μ ( d ) 2 d 1

where P n  = p 1 p 2p n , and Willans’ formula [10]:

(41) p n = 1 + i = 1 2 n n j = 1 i cos ( j 1 ) ! + 1 x π 2 1 / n

satisfy condition (a) but are essentially versions of the sieve of Eratosthenes [11], 12]. Gandhi’s formula depends on properties of the Möbius function μ(d), while Willans’ formula is based on Wilson’s Theorem.

From a theoretical perspective, the functions satisfying (b) are interesting, even though all known members of this class are not practical prime generators. The first example proved the existence of a real number A such that A 3 n is the prime for n ≥ 1 (Mills’ function). The only known way to find an approximation to a suitable A is by working backward from known large primes. Several relatives can be constructed similarly [13].

The peculiar condition (c) is tailored to a class of multivariate polynomials constructed with this property [14], 15]. These results are implementations of primality tests in the language of polynomials, and thus they also cannot be used to generate primes in practise.

3.1.2 Applications to cryptography

Prime numbers play a crucial role in various cryptographic applications due to their unique mathematical properties. Here are some different uses of prime numbers in cryptography:

  1. Cryptographic hash functions

    1. Prime numbers contribute to cryptographic hashing algorithms. They are used to create strong and unique hash values that are resistant to collision attacks. For example, SHA-2 is a family of cryptographic hash functions that produce a fixed length output from a variable length input [16]. In particular, SHA-2 uses prime numbers in several ways, to generate the initial values of the internal state, to generate the round constants, to generate the initial values of the truncated variants, to ensure the security of the message padding, which requires that the message length be a multiple of 512 bits.

  2. Public-key cryptography

    1. RSA stands as a significant cryptographic algorithm in the realm of securing sensitive information across potentially insecure channels. Introduced by Ron Rivest, Adi Shamir, and Leonard Adleman in 1977, RSA relies on the intricate properties of prime numbers to perform its encryption tasks [17]. At its core, the fundamental premise of RSA is based on the complexity of factoring composite numbers into their prime components. This property sets the stage for its operation.

      RSA’s security hinges on the formidable challenge of factoring the modulus, a semiprime resulting from the product of two prime numbers. This factorisation obstacle, especially with the inclusion of large prime numbers, renders the decryption process computationally formidable. In the contemporary landscape, RSA finds extensive use, acting as a linchpin for secure digital communication in various domains, including online transactions, digital signatures, and more. However, as computational capabilities grow, the need for longer key lengths arises to maintain a robust level of security.

    2. Elliptic Curve Cryptography (ECC) is a public-key cryptographic system that uses the algebraic structure of elliptic curves over finite fields defined by prime numbers [18], 19]. ECC typically operates over a prime field F p , where p is a large prime, ensuring a finite and well-structured environment for secure arithmetic operations. Prime numbers are fundamental in defining the field and determining its size, directly influencing the cryptographic strength. Key generation involves selecting a generator point on the elliptic curve and computing scalar multiples: the private key is a random integer, and the public key results from multiplying this scalar with the generator. ECC achieves high security with smaller key sizes than RSA, making it efficient and widely used in modern cryptographic protocols.

  3. Cryptographic protocols

    1. The Diffie–Hellman Key Exchange is a foundational cryptographic protocol that enables two parties to establish a shared secret key over an insecure channel [20]. Its security relies on the difficulty of the discrete logarithm problem in finite fields. The protocol begins with the public selection of a large prime number p and a generator g modulo p, both of which are known to all participants. Each party then chooses a private key (a random integer) and computes a public key by raising g to the private key modulo p. After exchanging public keys, both parties compute the shared secret by exponentiating the received public key with their own private key, again modulo p. The use of prime numbers is fundamental: the prime modulus p defines the finite field in which all operations occur and ensures the cryptographic strength of the exchange.

  4. Implementation

    1. Implementation of the previous cryptographic primitives plays crucial roles in ensuring the security and integrity of Internet communication, authentication, email encryption, secure shell connections, VPNs, blockchain transactions, and the establishment of trust through certificate authorities.

3.1.3 Further details

Remark on Cryptography protocols. One of the primary objectives of cryptography is to establish secure communication channels between different parties. Security in this context encompasses various aspects such as data confidentiality, message integrity, and participant authentication. An approach to constructing secure channels is for the parties to share suitable cryptographic keys, which they maintain in strict confidence and use as inputs to encryption and message authentication algorithms. Typically, keys deemed appropriate for such cryptographic applications are required to possess the properties of length and randomness. This essentially ensures that they cannot be anticipated or thoroughly searched within a reasonable timeframe. We are now faced with the challenge of establishing these keys over an insecure network. Key-Exchange protocols are designed to address this issue. More formally, a Key-Exchange protocol is a cryptographic procedure in which two or more entities exchange messages to jointly determine a strong cryptographic key that cannot be computed by external parties.

In-depth analysis of sequence application. As we mentioned in the previous paragraph, Diffie-Hellman Key-Exchange is a fundamental cryptographic protocol that allows two parties to securely share a secret key over an insecure communication channel. This protocol relies heavily on the mathematical properties of prime numbers and generators within a finite cyclic group, typically involving modular arithmetic. The prime number p and the generator g play a critical role in ensuring the security and functionality of this cryptographic method, as it makes it difficult for attackers to deduce the secret key even if they know the public keys.

  1. Prime number p . The prime number p is a cornerstone of the Diffie-Hellman Key-Exchange. Its primary role is to define the finite field Z p , which is the set of integers modulo p. This field has several important properties that are leveraged in the protocol:

    1. Finite field definition. The prime p ensures that the set Z p forms a finite field, which is a set of numbers with well-defined addition, subtraction, multiplication, and division operations (excluding division by zero). The finiteness of the field is important because it limits the number of possible values, making exhaustive search attacks computationally infeasible.

    2. Modular arithmetic. Operations in the Diffie–Hellman Key-Exchange are performed modulo p. This modular arithmetic ensures that the results of these operations remain within the set Z p , preventing overflow and maintaining the integrity of the computations.

    3. Security foundation. The security of the Diffie-Hellman protocol is based on the difficulty of solving the discrete logarithm problem within the finite field Z p . Specifically, given g a  mod p and g b  mod p, it is computationally challenging to determine a or b without knowing the other value. The choice of a large prime p makes this problem even more difficult, improving the security of Key-Exchange.

    4. Public parameter. The prime p is a public parameter that is shared between the communicating parties. Both parties agree on this value before initiating the Key-Exchange process. The public nature of p does not compromise security, as the difficulty of the discrete logarithm problem remains regardless of the knowledge of p.

  2. Generator g . The generator g is another critical component of the Diffie–Hellman Key-Exchange. It is an element of the finite field Z p that has the specific properties necessary for the protocol:

    1. Primitive root. Ideally, the generator g is chosen to be a primitive root modulo p. A primitive root is an element whose powers generate all the non-zero elements of the field Z p . In other words, g is a generator of the multiplicative group of integers modulo p, meaning that the set g 1 , g 2 , , g p 1 mod p contains all the elements from 1 to p − 1. This property ensures that the key space is maximized, making it more difficult for an attacker to guess the secret key.

    2. Public parameter. Like the prime p, the generator g is also a public parameter. Both parties agree on g before the Key-Exchange begins. The public nature of g does not reduce the security of the protocol because the security relies on the difficulty of the discrete logarithm problem.

    3. Exponential operations. During the Key-Exchange, each party selects a private key (a random integer) and computes an exponential value using g. For example, if Alice chooses a private key a and Bob chooses a private key b, they compute g a  mod p and g b  mod p, respectively. These values are then exchanged over the insecure channel. The use of g in these exponential operations is important because it ensures that the resulting values are uniformly distributed over the field Z p , making it difficult for an attacker to predict the private keys.

    4. Shared secret computation. After exchanging the exponential values, each party uses their private key to compute the shared secret. Alice computes g b mod p a mod p , and Bob computes g a mod p b mod p . Due to the properties of modular arithmetic, both computations yield the same result: g ab  mod p. This shared secret can then be used as a key for symmetric encryption algorithms to secure further communications.

3.2 Mersenne prime

The storey of Mersenne numbers begins in the 17th century with the French mathematician Marin Mersenne. Mersenne was a polymath who corresponded with many of the leading scientists and thinkers of his time, including René Descartes and Galileo Galilei. He was particularly interested in prime numbers, which are whole numbers divisible only by 1 and themselves.

Marin Mersenne introduced a special class of numbers that would later bear his name. These numbers took the form 2 n − 1, where n is a positive integer. Mersenne’s interest in these numbers was not merely theoretical; he believed that they had unique properties that made them suitable candidates for prime numbers.

Mersenne’s contributions to the study of prime numbers extended beyond just naming these numbers. He developed what is now known as ”Mersenne’s test” to determine if a Mersenne number is prime. His test stated that if 2 n − 1 is prime, then n must also be prime. This observation was a significant step forward in understanding prime numbers.

While Mersenne made strides in prime number theory, it was not until the 19th century that mathematicians like Édouard Lucas and Édouard Barbier began to explore the divisibility properties of Mersenne numbers in more detail. Their work laid the foundation for later research into these numbers.

The quest to find large prime numbers of the form 2 n − 1 continued into the 20th century and beyond. With the advent of computers, it became possible to search and verify the primality of Mersenne numbers with exceptionally large values of n. The efforts of mathematicians and computer enthusiasts converged in projects like the Great Internet Mersenne Prime Search (GIMPS), founded by George Woltman in 1996.

GIMPS harnessed the power of distributed computing to systematically search for Mersenne primes. This collaborative effort led to the discovery of many record-breaking prime numbers, including some of the largest known primes.

In conclusion, the history of Mersenne numbers is a testament to the enduring fascination with prime numbers and the collaborative efforts of mathematicians and technology enthusiasts. These numbers, initially introduced by Marin Mersenne in the 17th century, continue to be a rich source of mathematical exploration and discovery in the modern era.

3.2.1 Proprieties

Definition 3.2.

A Mersenne prime is any prime number defined as M n  = 2 n − 1 where n is an integer.

OEIS. Table 2 lists the first terms of the sequence, which are also available in the OEIS database.

Table 2:

Mersenne primes in OEIS database.

A-number A000668
Name Mersenne primes (primes of the form 2 n  − 1).
Data 3, 7, 31, 127, 8191, 131071, 524287, 2147483647, 2305843009213693951, …
Offset 1, 1
Link https://oeis.org/A000668

Numbers of the form M n  = 2 n − 1 without the primality requirement may be called simply Mersenne numbers (OEIS: A000225).

Although the expression 2 n  − 1 can be prime only for certain values of n, called Mersenne exponents, there is no simple condition on how large n must be. In practice, primes of this form are rare and require computational verification even for relatively small n. The following result characterizes all even perfect numbers, regardless of how large n is.

Connections to Perfect numbers. A positive integer n is called a perfect number if it is equal to the sum of all its positive divisors, excluding n itself. More than 2,300 years ago, Euclid proved that if 2 k − 1 is a prime number (it would be a Mersenne prime), then 2 k 1 2 k 1 is a perfect number. A few hundred years ago Euler proved the converse (that every even perfect number has this form). It is still unknown whether there are any odd perfect numbers (but if there are, they are large and have many prime factors).

Theorem 3.2.

If 2 k − 1 is a prime number, then 2 k 1 2 k 1 is a perfect number and every even perfect number has this form.

Proof.

Suppose first that p = 2 k − 1 is a prime number and set n = 2 k 1 2 k 1 . To show n is perfect, we need only show σ(n) = 2n. Since σ is multiplicative and σ(p) = p + 1 = 2 k , we know:

(42) σ ( n ) = σ 2 k 1 σ ( p ) = 2 k 1 2 k = 2 n .

This shows that n is a perfect number.

On the other hand, suppose n is any even perfect number and write n as 2 k−1 m where m is an odd integer and k ≥ 2. Again σ is multiplicative so:

(43) σ 2 k 1 m = σ 2 k 1 σ ( m ) = 2 k 1 σ ( m ) .

Since n is perfect we also know that:

(44) σ ( n ) = 2 n = 2 k m .

Together these two criteria give:

(45) 2 k m = 2 k 1 σ ( m )

so 2 k  − 1 divides 2 k m hence 2 k  − 1 divides m, say m = 2 k 1 M . Now substitute this into the equation above and divide by 2 k − 1 to get 2 k M = σ(m). Since m and M are both divisors of m we know that:

(46) 2 k M = σ ( m ) m + M = 2 k M ,

so σ(m) = m + M. This means that m is prime and its only two divisors are itself (m) and one (M). Thus, m = 2 k − 1 is a prime and we have proved that the number n has the prescribed form. □

Theorem 3.3.

If for some positive integer n, 2 n − 1 is prime, then so is n.

Proof.

Let r and s be positive integers, then the polynomial x rs−1 is x s−1 times x s(r−1) + x s(r−2) + ⋯ + x s  + 1. So if n is composite (say rs with 1 < s < n), then 2 n  − 1 is also composite (because it is divisible by 2 s−1). □

Notice that we can say more: suppose that n > 1. Since x − 1 divides x n − 1, for the latter to be prime the former must be one. This gives the following.

Corollary 3.2.

Let a and n be integers greater than one. If a n − 1 is prime, then a is 2 and n is prime

Usually the first step in factoring numbers of the forms a n − 1 (where a and n are positive integers) is to factor the polynomial x n  − 1. In this proof, we just used the most basic of such factorisation rules.

Lucas-Lehmer test. Let M p  = 2 p − 1 be a Mersenne number, where p is an odd prime. The Lucas–Lehmer test provides an efficient algorithm to determine whether M p is prime. This test is based on a special recursive sequence and relies on earlier results from Lucas’s primality criterion, later formalized and extended by Morrison.

Define a sequence (s i ) for i ≥ 0 by:

(47) s 0 = 4 , s i = s i 1 2 2 for  i 1 .

The first few terms of this sequence are 4, 14, 194, 37634, … (OEIS: A003010).

Then M p is prime if and only if:

(48) s p 2 0 ( mod M p ) .

This condition is both necessary and sufficient, and it provides a deterministic test for the primality of Mersenne numbers. The value s p−2 mod M p is called the ”Lucas–Lehmer residue” of p.

The Lucas–Lehmer test is an adaptation of a more general primality criterion due to Édouard Lucas, who developed methods to test the primality of numbers of special algebraic forms. In particular, Lucas showed that for certain sequences satisfying specific recurrence relations, divisibility properties could certify primality. The current form of the test emerged in the 20th century through the contributions of Derrick Henry Lehmer and the formal justifications provided by Morrison, who connected the sequence to quadratic residues and the properties of the multiplicative group modulo M p .

Theoretical justification. Let us sketch a proof of the correctness of the Lucas–Lehmer test. Suppose p is an odd prime, and define M p  = 2 p − 1. Consider the field F M p , assuming M p is prime. One can construct an element ω F M p 2 such that ω + ω −1 = 4, which implies ω = 2 + 3 in some algebraic extension. Then, the recurrence s n = s n 1 2 2 can be expressed as:

(49) s n = ω 2 n + ω 2 n .

In particular, this expression simplifies modulo M p , and it can be shown that:

(50) s p 2 = ω 2 p 2 + ω 2 p 2 0 ( mod M p ) M p  is prime .

This result relies on the fact that the order of ω in the multiplicative group modulo M p is maximal when M p is prime, and the sequence hits zero only in that case.

Remarks. The Lucas–Lehmer test is deterministic and runs in polynomial time in p, making it one of the most efficient known methods for testing the primality of Mersenne numbers. It is the foundation of the ”Great Internet Mersenne Prime Search” (GIMPS) project, which has discovered all currently known Mersenne primes.

Example. The Mersenne number M3 = 23 − 1 = 7 is prime. The Lucas–Lehmer test verifies this as follows. Initially s is set to 4 and then updated 3 − 2 = 1 time:

(51) s ( ( 4 × 4 ) 2 ) mod 7 = 0 .

Since the final value of s is 0 , the conclusion is that M 3 is prime.

On October 21, 2024, GIMPS discovered the largest known prime number, 2 136,279,841  − 1, having 41,024,320 decimal digits. The new prime number, also known as M136279841, has been calculated using the Lucas–Lehmer primality test.

Open problems. It is not known whether the set of Mersenne primes is finite or infinite.

3.2.2 Applications to cryptography

The principal applications of Mersenne Prime numbers in cryptography are as follows:

  1. Foundations

    1. A general-purpose pseudorandom number generator (PRNG), called Mersenne Twister, provides a 623-dimensional equidistribution up to 32-bit accuracy [21]. In this algorithm, a Mersenne prime period is used, which is achieved by modifying the previously proposed generators. For a n-bit word length, the Mersenne Twister generates integers in the range 0 , 2 n 1 . The algorithm is based on a matrix linear recurrence over a finite binary field F 2 . It is a twisted generalised feedback shift register of rational normal form, with state bit reflection and tempering. The basic idea is to define a series x i through a simple recurrence relation, and then output numbers of the form x i T , where T is an invertible F 2 -matrix called a tempering matrix. The most commonly used version of the Mersenne Twister algorithm is based on the Mersenne prime 219937 − 1. The standard implementation of that, MT19937, uses a 32-bit word length. There is another implementation (with five variants) that uses a 64-bit word length, MT19937-64 and generates a different sequence. Furthermore, the generator has an algorithm that is provided to check its primitivity and the computational complexity of this primitivity test is O ( p 2 ) , where p is the degree of the polynomial. However, it is not cryptographically secure, i.e. Cryptographically Secure Pseudorandom Number Generator (CSPRNG), unless the CryptMT variant is used. The reason is that observing a sufficient number of iterations (624 in the case of MT19937, since this is the size of the state vector from which future iterations are produced) allows one to predict all future iterations.

      Specifically, CryptMT is a stream cipher which is a combination of Linear Feedback Shift Register (LFSR) like Mersenne Twister and non-linear filter based on multiplication [22]. The period and high dimension of equidistribution as a stream cipher are theoretically assured. Moreover, it uses a booter to generate shorter sequence efficiently.

  2. Cryptographic hash functions

    1. An hash function scheme called Hash Mersenne Number Transform (HMNT) based on a New Mersenne Number Transform (NMNT) [23]. The HMNT is defined as the modulo of the Mersenne numbers, where arithmetic operations are simple equivalents to ones’ complement. It takes an arbitrary length as input and generates a hash value with variable lengths (128, 256, and 512-bits or longer).

  3. Public-key cryptography

    1. A public-key cryptosystem whose security is based on arithmetic modulo of Mersenne numbers [24]. These numbers have an extremely useful property. For any number x modulo p, and y = 2 z , where z is a positive integer, xy is a cyclic shift of x by z positions and thus the Hamming weight of x is unchanged under multiplication by powers of 2. The encryption scheme is based on the simple observation that, given a uniformly random n-bit string R, when we consider T = FR + G(mod p), where the binary representation of F and G modulo p has low Hamming weight, then T looks pseudorandom, i.e., it is hard to obtain any non-trivial information about F, G from R, T. The public-key is chosen to be the pair (R, T), and the secret key is the string F. The encryption scheme also requires an efficient error correcting code with.

3.2.3 Further details

Remark on cryptographic Hash functions. Hash functions are cryptographic algorithms that transform an input of arbitrary length into a fixed-length output, known as a ”digest” or ”hash value”, unique representation of the original input. They must have several key properties to be secure and effective, as their function is fundamental in many security and cryptographic applications due to the hash functions’ ability to ensure:

  1. Data integrity. Hash functions are used to ensure the integrity of the data. If we have the hash of a message or file, we can compare it with the hash of a received message or file to verify that it has not been altered. This is commonly used in checksums and digital signatures.

  2. Digital signatures. A hash function is a crucial component in digital signatures. The hash of a document is calculated and then encrypted with the sender’s private key. The recipient can decrypt the hash using the sender’s public key and compare it to the hash calculated from the received document to verify its authenticity and integrity.

  3. Password hashing. Passwords are usually stored as hashes rather than as plain text. When a user enters a password, its hash is calculated and compared with the stored hash. This ensures that even if a password database is compromised, attackers cannot easily retrieve the original passwords.

  4. Key Derivation Functions (KDFs). Hash functions are used to derive cryptographic keys from passwords or other sensitive information. KDFs transform an input of arbitrary length into fixed-length keys that can be used in encryption algorithms.

  5. Security protocols. Hash functions are used in various security protocols such as TLS, SSL, IPSec, and in technologies like Bitcoin and other cryptocurrencies to ensure the integrity and security of transactions and communications.

In-depth analysis of sequence application. As mentioned previously, from the Mersenne numbers it has been possible to construct a hash function scheme (HMNT) derived from NMNT [25]. The NMNT has proved to be an important Number-Theoretic Transform (NTT), which has been firmly recognised within the field of signal processing. Interesting applications of NTTs are found in the areas of digital filtering, image processing, fast coding and decoding, multiplication of large integers and matrices, deconvolution, and cryptography [26].

The most recognised NTTs are the Fermat (FNT) [27] and Mersenne (MNT) [28] number transforms. However, for standard signal processing applications the main drawback of these transforms is the stringent relationship between word length (the number of bits in the modulus), obtainable transform length, and a limited choice of possible word lengths. In order to retain the advantages of NTTs, the NMNT was consequently introduced, which alleviates this relationship. NMNT is defined modulo the Mersenne numbers, where arithmetic operations are simple equivalent to the complement of 1 and has the cyclic convolution property; therefore, it can be used for fast calculation of error-free convolutions and correlations [29]. The NMNT is a particularly interesting NTT as it has a long powers of two lengths up to 2 p , making it amenable to fast algorithms. However, NMNT can be used in one or several dimensions. Moreover, NMNT has several inherent advantages, such as its sensitivity to slight input variation, the long transform length, and variable block size [30].

These properties can be exploited to design a hash function that is more secure and efficient.

Definition 3.3.

(Transform definition [29]). The NMNT of an integer sequence x(k) of length L is given by:

(52) X ( k ) = l = 0 L 1 x ( l ) β ( l k ) M p , k = 0,1,2 , , L 1

and its inverse has exactly the same form:

(53) x ( n ) = L 1 k = 0 L 1 X ( k ) β ( n k ) M p , n = 0,1,2 , L 1

where:

(54) β ( l k ) = β 1 ( l k ) + β 2 ( l k ) β 1 ( l k ) = Re α 1 + α 2 l k M p β 2 ( l k ) = Im α 1 + j α 2 l k M p

also:

(55) α 1 = ± 2 q M p α 2 = ± 3 q M p q = 2 p 2 M p  represents modulo  M p

The values of α 1 and α 2 are of order L = 2 p+1. For transform length L/d where d is an integer power of two, β 1 and β 2 are given by:

(56) β 1 ( l k ) = Re α 1 + j α 2 d l k M p β 2 ( l k ) = Im α 1 + j α 2 d l k M p

Re() and Im() denote real and imaginary parts of the enclosed term respectively, L 1 exists and is given by (2 pd ), where L = 2 d and d is an integer, 0 ≤ d ≤ p.

Calculating the transform parameters starts with choosing a prime number (p). The value of the prime number depends on the desired transform length and dynamic range. For example, for simplicity, choose a prime number p = 7. The modulus for the chosen prime is M p  = 27 − 1 = 127 and the maximum transform length, L max = 128.

Definition 3.4.

(NMNT cyclic convolution property [29]). The NMNT has the cyclic convolution property; if x(n) and h(n) are two sequences to be convolved and [y(n) = x(n) ⊛ h(n)] is: the convolution result, then:

(57) Y ( k ) = X ( k ) Γ H ( k ) = X ( k ) H e v ( k ) + X ( N k ) H o d ( k )

where ⊛ is the cyclic convolution operator and • is point-by-point multiplication.

X(k), H(k) and Y(k) stand for the NMNT transforms of x(n), h(n) and y(n) respectively. H ev (k) and H od (k) stand for even and odd parts of H(k) respectively, which are given by:

(58) H e v ( k ) = ( H ( k ) + H ( N k ) ) × 2 p 1 M p H o d ( k ) = ( H ( k ) H ( N k ) ) × 2 p 1 M p .

If both x(n) and h(n) are properly padded with zeros, their circular convolution given in (57) will be equivalent to their linear convolution. To avoid overflow, the modulus Mp must be chosen so that y(n) does not exceed Mp, an upper bound is given by [25], 31]:

(59) | y ( n ) | | x ( n ) | max n = 0 N 1 | h ( n ) | M p / 2

(HMNT scheme). An input message M of arbitrary length is required to generate a variable hash value H. Usually, HMNT supports three lengths of hash values, i.e. H = 128, 256 and 512 bits or longer. The HMNT process consists of the following steps:

  1. Step 1. Convert the input message M into the corresponding ASCII code value.

  2. Step 2. The original message M is divided into a number of blocks (m): M = M 0 , M 1 , , M m 1 . The length of each block is denoted as n, where n is the length of the hash value. The shortage in the last block is padded with the equivalent number of space characters in the ASCII code, which is 32.

  3. Step 3. The secret key K is a series of characters that modify the input message M. These characters also convert into the corresponding ASCII code values. If the character length is less than the length of the hash value (n), the block is padded with the equivalent number of space characters in the ASCII code. Then, elements are added one by one to each block of the input message M.

  4. Step 4. Upon modifying the input message using the secret key K, NMNT (a formula that performs mathematical operations to transfer each block of the message to the transform domain) is applied to each block in the input message.

  5. Step 5. The final hash value H of the message M is obtained by summation (element-by-element addition) of transform output NMNT to each block.

3.3 Sophie German prime

Sophie Germain was born in Paris, France, in 1776, during a time when women were largely excluded from formal education and the world of mathematics. Despite these obstacles, her passion for mathematics led her to teach herself from the books in her family library. She adopted the alias ”Monsieur LeBlanc” to correspond with some of the most prominent mathematicians of her era, including Carl Friedrich Gauss and Adrien-Marie Legendre.

One of Germain’s early interests was in the field of number theory, and she focused her efforts on Fermat’s Last Theorem, a famous problem that had puzzled mathematicians for centuries. Although she did not succeed in proving the theorem, her work was groundbreaking. She introduced the concept of ”Fermat’s Last Theorem” for n = p, where p is a prime number. Around 1825, Sophie Germain proved, in fact, that the first case of Fermat’s last theorem is true for such primes, i.e., if p is a Sophie Germain prime, then there do not exist integers x, y, and z different from 0 and none a multiple of p such that x p  + y p  = z p . Her insights into this special case of the theorem laid the groundwork for future mathematicians who would eventually prove it, most notably Andrew Wiles in 1994.

However, Sophie Germain’s most enduring legacy lies in her contributions to prime number theory. She became fascinated with prime numbers and, in particular, the study of primes of the form 2p + 1, where both p and 2p + 1 are prime. These special prime numbers, now known as ”Sophie Germain primes”, played a crucial role in her investigations. She developed theorems and relationships involving these primes, and her work was foundational for the development of modern number theory.

Despite facing significant gender-based discrimination and barriers to her mathematical pursuits, Sophie Germain’s dedication to mathematics and her groundbreaking contributions to number theory continue to inspire mathematicians and serve as a testament to the power of determination and passion in the face of adversity. Her work opened doors for future generations of female mathematicians and remains a source of inspiration in the field.

3.3.1 Proprieties

Definition 3.5.

A prime number p is a Sophie Germain prime if 2p + 1 is also a prime.

Table 3:

Sophie Germain primes in OEIS database.

A-number A005384
Name Sophie Germain primes p : 2p + 1 is also prime.
Data 2, 3, 5, 11, 23, 29, 41, 53, 83, 89, 113, 131, …
Offset 1, 1
Link https://oeis.org/A005384

OEIS. Table 3 lists the first terms of the sequence, which are also available in the OEIS database.

Safe prime. The number 2p + 1 associated with a Sophie Germain prime is called a safe prime. For example, 23 is a Sophie Germain prime and 2 ⋅ 23 + 1 = 47 is its associated safe prime.

Strong prime. A prime number q is a strong prime if q + 1 and q − 1 have a large prime factor (approximately 500 digits). For a safe prime value q = 2 p + 1, the number q − 1 naturally has a large prime value, that is, p, so a safe prime value q meets part of the criteria for a strong prime. The execution time of certain methods of factoring a number with q as the primary factor depends in part on the size of the primary factor q − 1. This is true, for example, with Pollard’s p − 1 algorithm.

Conjecture. It is conjectured that there are infinitely many Sophie Germain primes, although this has never been proven, and that the number of Sophie Germain primes up to x is

(60) S G ( n ) C n ( log n ) 2

where C is Hardy–Littlewood’s twin prime constant.

(61) C : = 2 p > 2 p ( p 2 ) ( p 1 ) 2 1.32032 ,

and the product is over all primes p > 2 [32].

3.3.2 Applications to cryptography

The principal applications of Sophie German prime numbers in cryptography are as follows:

  1. Foundations

    1. Sophie-Germain prime moduli are used in parallel Linear Congruential Generators (LCGs) for Monte Carlo simulations, providing an alternative to the commonly used Mersenne primes [33]. These primes, of the form 2 q  − k, where k can be as large as 2 q , are used as moduli in LCGs, and modular multiplication in an LCG with a Sophie-Germain prime modulus can be written in a specific equation. The choice of Sophie-Germain primes reduces initialisation time and provides competitive generation time when appropriately chosen. The resulting Sophie-Germain prime modulus LCGs have been tested and compared to Mersenne primes.

  2. Secret-key cryptography

    1. Mode called Sophie Germain Counter Mode (SGCM) has been proposed as a variant of the Galois/Counter Mode of operation for block ciphers. Instead of the binary field GF 2 128 , it uses modular arithmetic in GF (p) where p is a safe prime 2128 + 12451 with the corresponding Sophie Germain prime p 1 2 = 2 127 + 6225 [34]. Although SGCM prevents the specific ”weak key” attack, there are other ways to modify the message that will achieve the same forgery probability against SGCM as is possible against GCM: By modifying a valid n-word message, you can create an SGCM forgery with probability circa n 2 128 That is, its authentication bounds are no better than those of Galois/Counter Mode.

  3. Public-key cryptography

    1. Safe and strong primes were useful as the factors of secret keys in the RSA cryptosystem [35], 36], because they prevent the system being broken by some factorization algorithms such as Pollard’s p − 1 algorithm. However, with current factorisation technology, the advantage of using safe and strong primes appears to be negligible today.

  4. Cryptographic protocols

    1. The issues about safe e strong primes apply in other cryptosystems as well, including Diffie-Hellman Key-Exchange and similar systems that depend on the security of the discrete log problem rather than on integer factorization [37]. If 2p + 1 is a safe prime, the multiplicative group of modulo integers 2p + 1 has a subgroup of high prime order. This prime order subgroup is usually desirable and the reason for using safe primes is so that the modulus is as small as possible relative to p. For this reason, the key generation protocols for these methods often depend on efficient algorithms to generate strong primes, which in turn depend on assumptions that these primes have sufficient density [38].

3.3.3 Further details

Remark on Secret-key cryptography. Secret-key cryptography is usually classified as block ciphers or stream ciphers. In a block cipher, the plaintext is divided into fixed-sized chunks called blocks. A block is specified to be a bitstring (i.e. a string of 0’s and 1’s) of some fixed length (e.g., 64 or 128 bits). A block cipher will encrypt (or decrypt) one block at a time. In contrast, a stream cipher first uses the key to construct a keystream, which is a bitstring that has exactly the same length as the plaintext (the plaintext is a bitstring of arbitrary length). The encryption operation constructs the ciphertext as the exclusive-or of the plaintext and the keystream. Decryption is performed by computing the exclusive-or of the ciphertext and the keystream [39].

In this regard, a block cipher mode of operation is an algorithm that uses a block cipher to provide information security such as confidentiality or authenticity [40]. A mode of operation describes how to repeatedly apply a cipher’s single-block operation to securely transform amounts of data larger than a block. Most modes require a unique binary sequence, often called an Initialization Vector (IV), for each encryption operation. The IV must be non-repeating, and for some modes must also be random. The IV is used to ensure that distinct ciphertexts are produced even when the same plaintext is encrypted multiple times independently with the same key. Historically, encryption modes have been extensively studied in regard to their error propagation properties in various scenarios of data modification. Later development regarded integrity protection as an entirely separate cryptographic goal. Some modern modes of operation combine confidentiality and authenticity in an efficient way, and are known as authenticated encryption modes.

One such mode is Galois/Counter Mode (GCM) which is widely adopted for its performance. GCM throughput rates for high-speed state-of-the-art communication channels can be achieved with inexpensive hardware resources [41].

In-depth analysis of sequence application. (Description of GHASH). Let X be a concatenation of authenticated unencrypted data, CTR-encrypted ciphertext, and padding. This data is split into m 128-bit blocks X i :

(62) X = X 1 X 2 X m

AES is used to derive the root authentication key H = E K (0). The same AES key K is also used as the data encryption key. In this case, we assume that H is unknown to the attacker as the scheme would otherwise be trivially breakable.

GHASH is based on operations in the finite field F 2 128 . Horner’s rule is used in this field to evaluate the polynomial Y:

(63) Y m = i = 1 m X i × H m i + 1

The authentication tag is T = Y m + E K I V 0 31 1 , assuming that a 96-bit IV is used. The IV value must never be repeated as that would lead to the “forbidden attack” discussed by Joux in [40].

(SGCM). Mathematically, SGCM differs from GCM only in the underlying field where GHASH’s arithmetic operations are performed. While GCM uses the binary field F 2 128 , SGCM uses traditional modular arithmetic in F p , where:

(64) p = 2 128 + 12451 = 340282366920938463463374607431768223907

Here p 1 2 is also a prime, a Sophie Germain prime.

All other aspects of SGCM are equivalent to GCM, except those described in the ’Multiplication operation on blocks’ and the ’GHASH function’ of NIST Special Publication 800-38D [41].

3.4 Fibonacci numbers

Leonardo of Pisa, who later became known as Fibonacci, was born in Pisa, Italy, around 1170. He travelled extensively with his merchant father, which exposed him to various mathematical ideas from different cultures. During his travels, Fibonacci encountered the Hindu-Arabic numeral system, which was much more efficient for arithmetic calculations than the Roman numerals commonly used in Europe at the time.

Fibonacci was greatly impressed by the Hindu-Arabic numerals and wanted to introduce them to Europe. He realised that to do so, he needed to write a comprehensive book that would demonstrate the superiority of these numerals. This endeavour led him to write ”Liber Abaci” in 1202, where he not only introduced the Hindu-Arabic numeral system but also included various mathematical topics.

In this influential book, Fibonacci discussed a problem that would eventually lead to the discovery of the Fibonacci sequence. The problem was related to the growth of a hypothetical rabbit population. He described a scenario in which a pair of rabbits produces another pair in their first month of life and then each subsequent month, they produce another pair, assuming that they never die.

The sequence of rabbit pairs that resulted from this scenario turned out to be the Fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21, and so on. Each number in the sequence represents the number of pairs of rabbits at the end of each month.

Fibonacci initially used the sequence to solve this rabbit population problem, but he soon realised its broader mathematical significance. He used the sequence to illustrate various mathematical concepts, including algebraic and geometric progressions.

Although Fibonacci did not name the sequence after himself, it became widely known as the ”Fibonacci sequence” in his honour. The sequence gained popularity and importance over the centuries, and mathematicians like Leonardo Euler and Édouard Lucas made significant contributions to its study.

Today, the Fibonacci sequence is not only a mathematical curiosity but also a fundamental concept in mathematics and various fields such as art, architecture, and nature, where its mathematical properties are celebrated and explored.

3.4.1 Proprieties

Definition 3.6.

Fibonacci numbers can be defined by the recurrence relation:

(65) F 0 = 0 F 1 = 1 F n = F n 1 + F n 2 for n 1

In some older definitions, the value F 0 = 0 is omitted, so that the sequence starts with F 1 = F 2 = 1, and the recurrence F n  = F n−1 + F n−2 is valid for n > 2.

OEIS. Table 4 lists the first terms of the sequence, which are also available in the OEIS database.

Table 4:

Fibonacci numbers in OEIS database.

A-number A000045
Name Fibonacci numbers: F(n) = F(n − 1) + F(n − 2) with F(0) = 0 and F(1) = 1.
Data 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, …
Offset 0, 4
Link https://oeis.org/A000045

Recurrence relation. Another recurrence relation for the Fibonacci numbers is:

(66) F n + 1 = F n 1 + 5 + 1 2 = ϕ F n + 1 2 ,

where ⌊x⌋ is the floor function and ϕ is the ”golden ratio” ( ϕ = 1 2 ( 1 + 5 ) = 1.618033988 ) . This expression follows from the more general recurrence relation:

(67) F n + 1 F n + 2 F n + k F n + k + 1 F n + k + 2 F n + 2 k F n + k ( k 1 ) + 1 F n + k ( k 1 ) + 2 F n + k 2 = 0

for k > 2. (The k = 1 case is trivially F n+1, while the k = 2 case is essentially Cassini’s identity and therefore equal to (−1) n ).

See [ [42], pp. 236–240] for a derivation and general discussion of Fibonacci determinant identities.

Generating function. The generating function of the Fibonacci sequence is the power series:

(68) s ( z ) = k = 0 F k z k = k = 1 F k z k = 0 + z + z 2 + 2 z 3 + 3 z 4 +

This series is convergent for any complex number z satisfying |z| < 1/φ, and its sum has a simple closed form:

(69) s ( z ) = z 1 z z 2 .

3.4.2 Applications to cryptography

The main applications of Fibonacci numbers in cryptography are as follows:

  1. Foundations

    1. A Lagged Fibonacci Generator (LFG) is an example of a pseudo-random number generator based on Fibonacci sequence. This class of random number generators is aimed at being an improvement on the ”standard” linear congruential generator. Generalising the sequence (65)

      (70) S n S n r S n s ( mod m ) , 0 < r < s

      the new term is some combination of any two previous terms. m is usually a power of 2 m = 2 M , often 232 or 264. The ⊗ operator denotes a general binary operation. This may be either addition, subtraction, multiplication, or the bitwise exclusive-or operator (XOR). The theory of this type of generator is rather complex, and it may not be sufficient simply to choose random values for j and k. These generators also tend to be very sensitive to initialisation. Generators of this type employ k words of state (they ”remember”’ the last k values). If the operation used is addition, then the generator is described as an Additive Lagged Fibonacci Generator (ALFG) [43], if multiplication is used, it is a Multiplicative Lagged Fibonacci Generator (MLFG) [44], and if the XOR operation is used, it is called a Two-tap generalised feedback shift register (GFSR). The GFSR is also related to the Linear-Feedback Shift Register (LFSR) [45], 46].

    2. A variety of keystream generators have been suggested that are based on Fibonacci sequences, and at least one has been implemented. These generators are appealing because they can take advantage of the security results from the theory of shift register-based keystream generators, while running much faster in software [47].

    3. Although LFSRs are one of the most popular devices for generating pseudo-random sequences, since they are simple, fast, and easy to implement in software and hardware, the main disadvantage is that in an LFSR, the current state is a linear function of the previous state, thus cryptographically insecure. As an alternative, a Non-Linear-Feedback Shift Register (NLFSR), Fibonacci based also, whose current state is a nonlinear function of its previous state can be used. More specifically, for an n-bit shift register r its next state is defined as:

      (71) r i + 1 b 0 , b 1 , b 2 , , b n 1 = r i b 1 , b 2 , , f b 0 , b 1 , b 2 , , b n 1 , 

      where f is the non-linear feedback function. At present, the main application area of NLFSRs is cryptography [48]. The output sequences of NLFSRs are normally very hard to break with existing cryptanalytic methods.

    4. p-Fibonacci error-correcting codes are a type of error-correcting codes that are based on the Fibonacci p-sequence. They are defined as the numerical sequence a p,n given by the recursive relation a p,n  = a p,n−1 + a p,np−1, with initial values a p,1 =…= a p,p+1 = 1. For a given integer p ≥ 1, the p-Fibonacci matrix Q p is a (p + 1) × (p + 1) matrix of the following form:

      (72) Q p = 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 .

      Fibonacci Q p matrices allow us to define a method to encode and decode a message M and also to detect and correct errors that might occur in transmission of the encoding of M. These codes are used in cryptography to design identification protocols and quantum-resistant signature schemes [49].

  2. Cryptographic hash functions

    1. An audio fingerprint is a compact representation of an original signal and is considered as a short summary of an audio object. Therefore, the fingerprint is considered identification in the sense that it almost uniquely represents the signal. Audio fingerprinting can achieve the monitoring of audio content without metadata, which helps to identify an unknown audio clip from a database via the Internet, PC, microphone, mobile phone, etc. Furthermore, people also adopt audio fingerprinting technologies to protect the copyright of music, prohibit copyright infringement of songs, etc. A fast retrieval algorithm based on Fibonacci Hashing for the extension of the Philips’s method to save memory and improve query speed [50].

    2. Protein family classification is crucial for applications such as smart drug therapies, understanding protein functions, and building phylogenetic trees. Although sequencing techniques can reveal biological similarities between protein families, they are time-consuming. To address this challenge, a computer and artificial intelligence-based classification system has been developed. This system converts protein sequences into numerical representations. A novel protein mapping method based on Fibonacci Hashing assigns each amino acid code to Fibonacci numbers based on integer representations. These coded amino acids are then inserted into a hashing table for classification using recurrent neural networks [51].

  3. Cryptographic protocols.

    Fibonacci numbers have found various applications in quantum cryptography, particularly in the design of secure encoding schemes, quantum states, and communication protocols. In this context, Fibonacci – based constructions offer unique mathematical properties such as nonlinearity, recursive structure, and incommensurate ratios – that can enhance the robustness of quantum systems. Notably, they are employed in the following ways:

    1. Fibonacci quantum states in quantum optics. Quantum states with amplitudes proportional to Fibonacci numbers have been explored to define non-classical light fields and structured superpositions. These so-called “Fibonacci states” can exhibit non-trivial phase relationships and may be used in quantum key distribution schemes [52].

    2. Quantum walks based on Fibonacci sequences. Quantum walks governed by Fibonacci step sizes or recursive rules have been proposed as mechanisms for secure key generation. These walks produce structured but non-periodic probability distributions, increasing the difficulty of key inference by adversaries [53].

    3. Fibonacci-based bases in quantum key distribution (QKD). In generalized QKD protocols, Fibonacci numbers are used to define rotation angles or construct measurement bases that are non-orthogonal or non-equidistant. For instance, angular separations can be derived from the golden ratio ϕ = 1 + 5 2 , with:

      (73) θ n = 2 π ϕ n .

      This approach reduces the probability of undetected eavesdropping due to the use of non-uniform basis alignment [54].

  4. Steganography

    1. Steganographic solution in which Fibonacci numbers play a crucial role in improving the capacity and security of data embedding in images [55]. Using image decomposition based on the Fibonacci sequence, the algorithm can create a larger number of bit levels, specifically 12 levels compared to traditional 8. This increase in levels allows for a more efficient distribution of secret data, significantly improving the overall capacity of information embedding. In addition, the combination of Fibonacci numbers with T-order statistics allows the algorithm to embed secret data in less obvious regions of the image. This adaptive approach minimises the visual impact of changes made during the embedding process, thus improving the resistance to detection by various steganalysis tools.

    2. In another approach, the pixel location choice is obtained by resorting to the p-Fibonacci series F p (i), where F p (i) = F p (i − 1) + F p (i − p − 1) and p is a non-negative integer that decides the sequence of values given to a singular series [56]. Pixel positions are taken whose values are multiples of the numbers of F p (i) and embed information in them.

3.4.3 Further details

Remark on Pseudo-Random Number Generators. Pseudo-Random Number Generators (PRNGs) play a crucial role in cryptography for several reasons:

  1. Key Generation. PRNGs are used to generate cryptographic keys, which need to be random and unpredictable to ensure the security of the cryptographic system. A weak PRNG can lead to key predictability, making the system vulnerable to attacks.

  2. Initialization Vectors (IV). In many cryptographic algorithms, Initialization Vectors (IVs) are used to ensure that identical plaintexts produce different ciphertexts on encryption. PRNGs are often used to generate these IVs.

  3. Nonces. PRNGs generate nonces (numbers used once) that are crucial for preventing replay attacks where an attacker tries to reuse a previously captured set of messages.

  4. Salts. In password hashing, salts are random data added to passwords before hashing to ensure that even identical passwords have different hash results. PRNGs are used to generate these salts.

  5. Stream Ciphers. In stream ciphers, PRNGs generate a pseudorandom keystream that is XORed with plaintext to produce ciphertext. The security of stream ciphers is highly dependent on the strength and unpredictability of the PRNG.

In summary, PRNGs are fundamental to ensuring the randomness and security required in various cryptographic processes, and a compromise in PRNG quality can lead to severe vulnerabilities in the entire cryptographic system.

In-depth analysis of sequence application. In this context, LFGs have occupied a special place among such generators and have gained popularity for their ease of implementation and relatively low cost and complexity. For this reason, it has been used successfully in many situations since 1958 and it was a real shock to discover in the 1990s that they actually fail an extremely simple, non-contrived test for randomness. As anticipated in the previous paragraph, these generators are defined by their recurrence relation:

(74) x n = x n r x n s mod m .

The symbol ⊗ represents an operation that could be any of the following: addition (+), subtraction (−), multiplication (×), or exclusive OR (⊕) [57]. To generate R bits random number, m = 2 R ; r and s are called the lags of the generator where r > s > 0 [58]. The output sequence is represented by x n , and the time is denoted by n. See [59] for a more detailed analysis of this generator.

The maximum period that can be achieved by LFG depends on the specific operation employed, as illustrated in Table 5.

Table 5:

Maximum attainable periods p of LFG x n  = x nr x ns  mod 2 m .

Operations Maximum attainable period
Addition, mod p = 2 N 1 2 r 1
Subtraction, mod p = 2 N 1 2 r 1
Multiplication mod p = 2 N 3 2 r 1
Exclusive-or p = 2 r  − 1

The term AFG is used to group generators that use the + or – operator. As shown in the above table, + and operators obtain large periods; therefore, most stringent statistical tests show that AFG produce satisfactory outcomes even if the lags have small values. As such, the equation of an AFG can be expressed as:

(75) x n = x n r ± x n s mod m .

Where m denotes the base, r and s represent the lags of the past samples, and x 0 , , x r 1 , constitute the seeds values [58].

When m = 2 N , N being the length of the word, and the trinomial x r  + x s  + 1 is irreducible and primitive over F ( 2 ) , the maximum period p is reached (subject to the condition that at least one of the seed values must be odd) and its value is p = 2 N 1 2 r 1 .

As already mentioned, despite their advantages, LFG is subject to limitations regarding randomness and security. Therefore, in order to have sufficiently large periods and exhibit ideal random behaviour, large lags are required. However, large lags mean large amounts of memory, since the state of an LFG is proportional to its lags [60]

Recently, various studies have been done to modify LFG, due to its easy implementation and simplicity [61]. To overcome the aforementioned issues, a more sophisticated architecture for generating keys has been introduced in this work.

3.5 Lucas sequences

The storey of the Lucas sequence begins with its namesake, Édouard Lucas, a French mathematician born in 1842. Lucas was a prolific mathematician and number theorist who made significant contributions to various areas of mathematics. His interest in number sequences led him to the discovery and study of what would later be known as the Lucas sequence.

In the mid-19th century, Lucas started investigating sequences that shared similarities with the more famous Fibonacci sequence, which had been introduced to the western world by Leonardo of Pisa (Fibonacci) in his book Liber Abaci in 1202. Like Fibonacci, Lucas noticed that certain sequences of numbers exhibited a pattern in which each number was obtained by adding the two preceding ones.

Lucas decided to explore these sequences further and, in 1877, published a paper titled ”Théorie des Nombres” where he introduced what we now call the Lucas sequence. He defined it as a sequence that starts with the numbers 2 and 1, just like Fibonacci, and then continues with each subsequent number being the sum of the two preceding ones. His goal was to study the properties and relationships of this sequence.

The sequence quickly gained attention in the mathematical community, and it was found to have various intriguing properties. It appeared in the study of number theory, particularly in the analysis of prime numbers. Lucas himself made significant contributions to the study of primes and was a pioneer in what would later be known as ”Lucas sequences.”

Over time, mathematicians and researchers continued to explore the properties of the Lucas sequence, uncovering its connections to many areas of mathematics, including algebra, combinatorics, and geometry. It also found applications in computer science, where it was used in algorithms and cryptography.

The Lucas sequence has even found its way into the natural world and art, with its mathematical patterns resembling some aspects of plant growth and aesthetics. This mathematical curiosity continues to captivate mathematicians and enthusiasts, serving as a testament to the enduring fascination with the beauty and elegance of mathematical patterns in our universe.

3.5.1 Proprieties

Definition 3.7.

The Lucas sequences U n (P, Q) and V n (P, Q) are constant-recursive integer sequences that satisfy the recurrence relation:

(76) L n = P L n 1 Q L n 2

where P and Q are fixed integers [62].

Any sequence satisfying this recurrence relation can be represented as a linear combination of the Lucas sequences U n (P, Q) and V n (P, Q).

Recurrence relations. Given the previous two integer parameters P and Q, the Lucas sequences of the first kind U n = U n ( P , Q ) ( n N ) and of the second kind V n = V n ( P , Q ) ( n N ) are defined by the recurrence relations [63]:

(77) U 0 = 0 , U 1 = 1 ,  and  U n = P U n 1 Q U n 2 ( n 2 ) , V 0 = 2 , V 1 = p ,  and  V n = P V n 1 Q V n 2 ( n 2 ) .

The characteristic equation x 2 − Px + Q = 0 of the sequences U n and V n has two roots α = ( P + D ) / 2 and β = ( P D ) / 2 with the discriminant D = P 2 − 4Q. Note that D 1/2 = α − β. Furthermore, D = 0 means x 2 − Px + Q = 0 has the repeated root α = β = P/2. It is well known that for any n N ([8]),

(78) P U n + V n = 2 U n + 1 , U n = α n β n α β , V n = α n + β n .

More generally, the Lucas sequences U n (P, Q) and V n (P, Q) represent sequences of polynomials in P and Q with integer coefficients. Famous examples U n and V n can be considered as the generalisation of many integer sequences such as Fibonacci numbers, Mersenne numbers, Pell numbers, Lucas numbers, Jacobsthal numbers, and a superset of Fermat numbers (Table 6).

Table 6:

Some Lucas sequences generated for different values of P and Q.

P Q U n (P, Q) V n (P, Q)
1 −1 Fibonacci numbers (OEIS: A000045) Lucas numbers (OEIS: A000032)
1 −2 Jacobsthal numbers (OEIS: A001045) Jacobsthal–Lucas numbers (OEIS: A014551)
2 −1 Pell numbers (OEIS: A000129) Pell–Lucas numbers (OEIS: A002203)
3 2 Mersenne numbers 2 n  − 1 (OEIS: A000225) Numbers of the form 2 n  + 1, which include the Fermat numbers (OEIS: A000051)

Generating functions. Ordinary generating functions are:

(79) n 0 U n ( P , Q ) z n = z 1 P z + Q z 2

(80) n 0 V n ( P , Q ) z n = 2 P z 1 P z + Q z 2

3.5.2 Applications to cryptography

The principal applications of Lucas sequences in cryptography are as follows:

  1. Foundations

    1. Probabilistic Lucas pseudoprime tests, which are part of the commonly used Baillie-PSW primality test [64]. The test defines Lucas pseudoprimes as follows: given integers P and Q, where P > 0 and D = P 2 − 4Q, let U k (P, Q) and V k (P, Q) be the corresponding Lucas sequences. Let n be a positive integer and let D n be the Jacobi symbol. We define δ ( n ) = n D n . If n is a prime that does not divide Q, then the following congruence condition holds: U δ(n) ≡ 0 (mod n). If this congruence does not hold, then n is not prime. If n is composite, then this congruence usually does not hold. These are the key facts that make Lucas sequences useful in primality testing.

    2. Lucas sequences are used in some primality proof methods, including the Lucas-Lehmer-Riesel test, and the N + 1 and hybrid N − 1/N + 1 methods such as those in Brillhart-Lehmer-Selfridge 1975 [65]. The algorithm is very similar to the Lucas-Lehmer test, but with a variable starting point depending on the value of k. Defined a sequence u i for all i > 0 by: u i = u i 1 2 2 . Then N = k ⋅ 2 n − 1, with k < 2 n is prime if and only if it divides u n−2. The starting value u 0 is determined using the Lucas sequence term V k (P, 1) taken mod N.

  2. Public-key cryptography

    1. Lucas sequence V n (P, Q) has been proposed to be used for public key cryptosystem (LUC), in a manner similar to the famous RSA, but using Lucas sequences modulo a composite number instead of exponentiation [66]. It has stipulated to have the same security level as RSA for the same size key, but is about twice as slow. However, many of the supposed security advantages of LUC over cryptosystems based on modular exponentiation are either not present, or not as substantial as claimed [67]. Furthermore, the security of Lucas functions is polynomial-time equivalent to the generalized discrete logarithm problems [68].

    2. Similarly, Lucas sequences have been used in several discrete logarithm-based encryption schemes that have been proposed over time. In particular, a variant of a probabilistic public-key encryption scheme based on LUC [69], another scheme based on quadratic fields quotients [70], a novel algorithm for the computation of Lucas sequences is proposed to improve the efficiency of cryptosystems based on LUC [71], a cryptosystem based on second order linear sequences in which semantic security is ensured [72]. Moreover, as linear sequences are not multiplicative, the main advantage of Lucas cryptosystems is that they are not formulated in terms of exponentiation.

  3. Implementation

    1. An approach for anonymous multi-receiver public key encryption based on Lucas sequences and the Chinese Remainder Theorem, which provides secure transmission of messages to authorized receivers via insecure channels. The scheme is shown to be better against renowned attacks and prevailing anonymous multi-receiver algorithms through computational analysis [73].

    2. A cryptography method based on relationships of hyperbolic balancing and Lucas-balancing functions, as well as through the use of direct and inverse matrices, as well as the balancing matrices. The applying Strassen’s method to improve the time complexity of solving equations involving the balancing matrix. This demonstrates that the use of matrices to represent and protect initial messages in the cryptography method [74].

  4. Attacks and cryptanalysis

    1. Lucas sequences were used for factoring RSA modules through an S-index formation as a comparative tool in the factoring process. The S-index pattern is used to design an algorithm to factor RSA modules by determining the quadratic residual on ciphertexts. Non-positional nature of Residue Number Systems (RNS) is used and compared with the Comparative S-Index, which is equivalent to magnitude comparison in RNS [75].

3.5.3 Further details

Remark on Public-key cryptography. Since the inception of the Internet, it has become customary to make use of public-key (or two-key) cryptography to secure Internet commerce. In such a scheme, each member of a group of individuals wishing to exchange information will have both a private key and a public key unique to that person. If Alice and Bob are members of this group and Alice wishes to communicate with Bob, she looks up his encryption key in a public directory and encrypts her message M to him using this key. On receiving this ciphertext, Bob uses his decryption key to decipher it and produce M. As an example of such a cryptosystem, consider the RSA system seen in Section 3.1.2. Each member of the group, say Bob (or a trusted authority acting on Bob’s behalf), selects two large primes p and q of k digits at random, keeps them secret and computes N = pq. He also selects at random an integer e(<N) such that gcd(e, φ(N)) = 1(φ(N) = (p − 1)(q − 1)) and solves the linear congruence:

(81) e d 1 ( mod φ ( N ) )

by the extended Euclidean algorithm to find d with 0 < d < φ(N). Bob’s public encryption key is the pair (e, N), and his private decryption key is d. If Alice wishes to send a secure numerically encoded message M(0 < M < N, gcd(M, N) = 1) to Bob, she calculates C ≡ M e (mod N)(0 < C < N) and sends C to Bob. Bob can recover M from C by calculating:

(82) C d M e d M 1 + t φ ( N ) M ( mod N ) ,

by Euler’s theorem. Since M < N, it is uniquely determined. This scheme has been the subject of many cryptographic attacks, but with some modifications it has endured them all and is still widely used today. See Boneh [76]. Of course, if an adversary can factor in the RSA modulus N, then he can break the system. However, in spite of the many improvements to integer factoring algorithms since the announcement of the RSA system in 1977, factoring N when k = 1024, say, seems still to lie in the distant future. Of course, this statement could become invalid should some group of clever individuals develop a new and better factoring algorithm or produce a universal quantum computer with a sufficient number of qubits. At this point, the latter scenario seems more likely. For information on quantum computers and computing, see Kaye et al. [77].

One of the problems associated with the RSA cryptosystem is the process of selecting p and q. We note that because of the existence of factoring techniques p − 1 and p + 1, it is essential for the security of the system that each of the four numbers p ± 1 and q ± 1 has at least one large prime factor. The problem of producing such p and q was first examined by Williams and Schmid [78], where the use of the primality tests of [65] was advocated. Since then, there have been further developments by Shawe-Taylor [79] and Maurer [80]. The latter paper is a particularly valuable contribution to this problem.

In-depth analysis of sequence application. In 1993, Smith [81] produced a public-key cryptosystem, called LUC, which was based on Lucas functions, as previously discussed. ”The basic idea behind LUC is that of providing an alternative to RSA by substituting the calculation of Lucas functions for that of exponentiation. Although Lucas functions are somewhat more complex mathematically than exponentiation, they produce superior ciphers”. However, the system has some important weaknesses, as pointed out by Bleichenbacher et al. [67]. Nonetheless, it has since been recommended as a possible authentication system and continues to be the subject of active research (see, e.g., Ibrahimpašić [82].). If we suppose that N is an RSA modulus and gcd(QD, N) = 1, the basic idea behind LUC is the simple result, easily proved from the law of appearance, that U (N)(P, Q) ≡ 0 (mod N) and V (N)(P, Q) ≡ 2(mod N), where m is any positive integer and ψ ( N ) = p 2 1 q 2 1 . In this scheme, Bob computes ψ(N) and finds some positive e < N at random such that gcd(e, ψ(N)) = 1. As in RSA, the pair (e, N) will constitute his public key. He next solves the linear congruence:

(83) e d 1 ( mod ψ ( N ) )

for his private key d. (This is not exactly what is recommended in [81], but as mentioned in [67], it avoids the problem of message dependence).

For Alice to send a message M(<N) to Bob, she first places P = M and Q = 1 and computes C ≡ V e (M, 1)(mod N) and sends C to Bob. Bob can recover M by computing V d (C, 1) ≡ M(mod N). To see why this works, we observe that:

(84) V d ( C , 1 ) V d V e ( M , 1 ) , 1 V e d ( M , 1 ) = V 1 + t ψ ( N ) ( M , 1 ) M ( mod N )

The latter congruence follows from:

(85) 2 V 1 + t ψ ( N ) ( M , 1 ) = V 1 ( M , 1 ) V t ψ ( N ) ( M , 1 ) + D U 1 ( M , 1 ) U t ψ ( N ) ( M , 1 ) 2 M ( mod N ) .

The values of C and V d (C, 1) can be quickly computed with appropriate techniques.

We have mentioned that if an adversary can factor N, then the RSA scheme (and LUC) can be broken. This leaves the question of whether breaking RSA is equivalent in difficulty to factoring N. Boneh and Venkatesan [83] have provided evidence that suggests this is not the case, and Boneh and Durfee [84] have shown that if d < N 0.292, then N can be effectively factored. However, Aggarwal and Maurer [80] have shown that breaking RSA is equivalent in difficulty to factoring the modulus under a generic model of computation, but this is a very restrictive model, as it does not exploit the bit representation of elements except for testing equality. However, there is a scheme somewhat similar to LUC for which it can be proved that breaking it is equivalent in difficulty to factoring N. This system makes use of the solutions of a certain Pell equation [85], which we have seen are essentially given by the Lucas functions. More information on this system can be found in Müller [86].

3.6 Catalan numbers

The history of Catalan numbers is a fascinating journey that spans over 200 years, from their first discovery in the 18th century to modern times. Catalan numbers have a rich history of multiple rediscoveries and have become a fundamental concept in mathematics [87].

  1. History. The storey begins with Ming Antu, a Chinese scientist and mathematician who wrote a book in the 1730s called ”Quick Methods for Accurate Values of Circle Segments”. Although the integrality of Catalan numbers did not play a role in Ming Antu’s work, his book included trigonometric identities and power series that involved Catalan numbers. However, it was not until 1839 that the connection between Ming Antu’s work and Catalan numbers was observed by Luo Jianjin.

    In 1751, Leonhard Euler, one of the most influential mathematicians in history, introduced and found a closed formula for Catalan numbers. Euler defined Catalan numbers as the number of triangulations of an (n + 2) − gon. He provided the values of Catalan numbers for n ≤ 8 and observed a pattern in successive ratios. Euler guessed a formula for Catalan numbers and derived the generating function for them. Christian Goldbach and Johann Segner assisted Euler in his proof of the formula, and by 1759, a complete proof was obtained. Johann Andreas von Segner, another correspondent of Euler, played a significant role in the history of Catalan numbers. In the late 1750s, Euler suggested to Segner the problem of counting the number of triangulations of an n − gon. Segner accepted the challenge and found a recurrence relation for Catalan numbers. However, he made an arithmetic mistake in computing some values of Catalan numbers. Euler corrected the mistake and published Segner’s paper with his own summary. The combination of Euler’s and Segner’s results, along with Goldbach’s observation, provided a complete proof of the product formula for Catalan numbers.

    In 1766, Semen Kirillovich Kotelnikow, a Russian mathematician, wrote a paper elaborating on Catalan numbers. Although he claimed to have another way to verify the product formula for Catalan numbers, his work mainly involved playing around with the formula. Nicolas Fuss, Euler’s assistant, introduced the Fuss-Catalan numbers and a generalisation of Segner’s recurrence relation in 1795.

    In the 19th century, the French school of mathematicians made significant contributions to the study of Catalan numbers. Joseph Liouville, a French mathematician, received a question from Olry Terquem about deriving Euler’s formula for Catalan numbers from Segner’s recurrence. Liouville communicated this problem to various geometers, which led to a series of papers on Catalan numbers. Gabriel Lamé provided an elegant double-counting argument to derive Euler’s formula. Eugene Charles Catalan obtained standard formulas for Catalan numbers and studied the problem of counting bracket sequences. Olinde Rodrigues, another mathematician, also made contributions to the study of Catalan numbers during this period.

  2. Modern interpretations and Applications. As mathematical research progressed, Catalan numbers found applications in numerous areas, including algebraic topology, graph theory, computer science, and more. Researchers and mathematicians discovered new combinatorial interpretations [88], [89], [90], [91] and deeper connections between numbers and various mathematical phenomena. Stanley [92] gave a list of 66 different combinatorial descriptions of Catalan numbers, and added some more to the list [93]. Some of the specific instances are as follows:

    1. The number of movements in xy-plane from (0, 0) to (n, n) with two kinds of moves:

      (86) R : ( x , y ) ( x + 1 , y ) , U : ( x , y ) ( x , y + 1 ) ,

      such that the path never rises above the line y = x.

    2. Triangulations of a convex (n + 2) − gon into n triangles by n − 1 diagonals that do not intersect in their interiors.

    3. Binary parentheses of a string of n + 1 letters.

    4. Binary trees with n vertices.

      The solution to these problems is the nth Catalan number.

3.6.1 Proprieties

Definition 3.8.

The nth Catalan number can be expressed directly in terms of the central binomial coefficients by:

(87) C n = 1 n + 1 2 n n = ( 2 n ) ! ( n + 1 ) ! n ! = k = 2 n n + k k  for  n 0

OEIS. Table 7 lists the first terms of the sequence, which are also available in the OEIS database.

Table 7:

Catalan numbers in OEIS database.

A-number A000108
Name Catalan numbers: C(n) = binomial(2n, n)/(n + 1) = (2n)!/(n!(n + 1)!).
Data 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 208012, …
Offset 0, 3
Link https://oeis.org/A000108

An alternative expression for C n is:

(88) C n = 2 n n 2 n n + 1  for  n 0

which is equivalent to the expression given above because 2 n n + 1 = n n + 1 2 n n . This formulation shows that C n is an integer, which is not immediately obvious from the first formula given. The above expression forms the basis for a proof of the correctness of the formula.

An additional representation expression is:

(89) C n = 1 2 n + 1 2 n + 1 n

which can be directly interpreted in terms of the cycle lemma.

Asymptotically, the Catalan numbers increase as:

(90) C n 4 n n 3 / 2 π ,

in the sense that the quotient of the nth Catalan number and the expression on the right tends towards 1 as n approaches infinity.

Recurrence relation. Catalan numbers satisfy the recurrence relation:

(91) C n + 1 = C 0 C n + C 1 C n 1 + + C n C 0 = k = 0 n C k C n k

and

(92) C 0 = 1  and  C n + 1 = 2 ( 2 n + 1 ) n + 2 C n .

Proof.

There are several ways to prove (91), but perhaps the most elegant is by appealing to Dyck paths of length 2(n + 1), which we saw above that C n+1 counts. Given a Dyck path of length 2(n + 1), let 2(k + 1) be the first non-zero coordinate x where the path hits the x-axis, then 0 ≤ k ≤ n. The path is broken up into two pieces, the part on the left of 2(k + 1) and the part on the right. The part to the right is a Dyck path of length 2(n − k), so it is counted as C nk . The part to the left is a north-east step, then a Dyck path of length 2k, and then a south-east step. (The middle path is a Dyck path ”on stilts”; it never dips below its starting point because it cannot hit the x-axis earlier than 2(k + 1).) There are C k of these. Therefore, there are a total of C k C nk paths that hit the x-axis first at 2(k + 1), and combining these terms gives C n+1, which is the recurrence relation. □

Example. If n + 1 = 3, then C n+1 counts the five Dyck paths pictured above:

  1. Path 1 has k = 2, counted in C 2 C 0.

  2. Path 2 has k = 2, counted in C 2 C 0.

  3. Path 3 has k = 1, counted in C 1 C 1.

  4. Path 4 has k = 0, counted in C 0 C 2.

  5. Path 5 has k = 0, counted in C 0 C 2.

The middle path of length 4 on paths 1 and 2 , and the top half of the left peak of path 3, are the Dyck paths on stilts referred to in the proof above.

Remark. Dyck Path is a lattice path in the coordinate plane that starts at the origin (0, 0) and consists of steps in the positive x and y directions (up and right) with the following conditions:

  1. The path never goes below the x-axis (no steps below y = 0).

  2. The path ends on the line y = 0.

Generating function. The generating function for Catalan numbers is:

(93) C n = n = 0 C n x n = 1 1 4 x 2 x = 2 1 + 1 4 x .

Given the recurrence (91), let us now just mention one aspect of generating functions, namely the binomial theorem for arbitrary exponents. When a is any complex number, or even an indeterminate, and k N , then we define the binomial coefficient:

(94) a k = a ( a 1 ) ( a k + 1 ) k ! .

The “generalized binomial theorem” due to Isaac Newton asserts that:

(95) ( 1 + x ) a = n 0 a n x n .

This formula is just the formula for the Taylor series of (1 + x) a at x = 0. For our purposes, we consider generating function formulas such as equation (95) to be ”formal” identities. Questions of convergence are ignored.

Proof.

Multiply the recurrence (91) by x n and sum on n ≥ 0. On the left-hand side we get:

(96) n 0 C n + 1 x n = C ( x ) 1 x .

Since the coefficient of x n in C(x)2 is k = 0 n C k C n k , on the right-hand side we get C(x)2. Thus:

(97) C ( x ) 1 x = C ( x ) 2 ,

or

(98) x C ( x ) 2 C ( x ) + 1 = 0 .

Solving this quadratic equation for C(x) gives:

(99) C ( x ) = 1 ± 1 4 x 2 x .

We have to determine the correct sign. Now, by the binomial theorem for the exponent 1/2 (or by other methods),

(100) 1 4 x = 1 2 x + . 

If we take the plus sign in (99) we get:

(101) 1 + ( 1 2 x + ) 2 x = 1 x 1 + ,

which is not correct. Hence, we must take the minus sign. As a check,

(102) 1 ( 1 2 x + ) 2 x = 1 + ,

as desired.

From the generating function, it is easy to obtain the formula of C n (93). □

Corollary 3.3.

We can now prove C n in the Definition 3.8:

(103) C n = 1 n + 1 2 n n = ( 2 n ) ! n ! ( n + 1 ) ! .

Proof.

Consider the following:

(104) 1 4 x = ( 1 4 x ) 1 / 2 = n 0 1 / 2 n x n .

hence by (99),

(105) C ( x ) = 1 2 x 1 n 0 1 / 2 n ( 4 x ) n = 1 2 n 0 1 / 2 n + 1 ( 4 ) n + 1 x n .

Equating coefficients of x x on both sides gives:

(106) C n = 1 2 1 / 2 n + 1 ( 4 ) n + 1 .

It is routine to expand the right-hand side of equation (106) and verify that it is equal to 1 n + 1 2 n n .

The expression 1 n + 1 2 n n is the standard way to write C n explicitly. There is an equivalent expression that is sometimes more convenient:

(107) C n = 1 2 n + 1 2 n + 1 n .

Note also that:

(108) C n = 1 n 2 n n 1 .

3.6.2 Applications to cryptography

The principal applications of Catalan numbers in cryptography are as follows:

  1. Secret-key cryptography

    1. Encryption and decryption procedure that involves dividing the message into blocks of m characters each, coding each character to its equivalent 8 − bit binary number using the ASCII code table, and XORing the resulting binary number with the 8421 code of a decimal digit converted to a 4 − bit binary number [94]. The encrypted binary number is then coded back to text characters using the ASCII code table. This procedure is applied to all data blocks. The decryption procedure is the reverse of the encryption procedure.

    2. Encryption and decryption method which aims to establish a secure communication channel between two entities [95]. It involves generating Catalan values that satisfy the Catalan number property, defining the Lattice Path movement space, and defining the key equalisation rules. Both sides generate a random value of an arbitrary length and encrypt it with their chosen Catalan-key. The encrypted values are used as the initial values of the first phase of the Maurer’s protocol. Values A and B (key material) are completely equalised after the second phase and are usable for generating a symmetric cryptographic key through the final phase (privacy amplification) in Maurer’s protocol. This neutralises the mutual information between Eve and the other participants that existed at the beginning of the protocol. Overall, the proposed procedure aims to provide a high level of security for the Key-Exchange process by using the specific properties of Catalan numbers and the Lattice Path combinatorics.

  2. Public-key cryptography

    1. An elliptic curve encryption algorithm is proposed based on integer sequences of Catalan numbers [96]. The proposed approach uses the Catalan sequence to generate secure keys, which are then used to encrypt the data. The set of points follows a secure key based on circular rotation, and the corresponding point that falls below the Catalan number is taken as the secured key noted K i . The sequence and K are used to generate secure keys K i . The addition operation is performed between the selected point and K i to obtain a point Q i , which is then used to form the encrypted block. Therefore, Catalan numbers are used to generate secure keys in the proposed ECC-based encryption algorithm.

  3. Cryptographic protocols

    1. Secret key sharing protocol for establishing secure communication between two entities in smart city applications [97]. The protocol is based on the properties of Fuss-Catalan numbers and Lattice Path combinatorics. The proposed scenario consists of three phases: generating a Fuss-Catalan object based on the grid dimension, defining the movement in the Lattice Path Grid, and defining the key equalisation rules. The authors present the security analysis of the protocol and its test in the experimental part. They also examine the equivalence of the proposed scenario with Maurer’s satellite scenario and suggest a new scenario that implements an information-theoretical protocol for public-key distribution. The paper concludes with proposed research directions on key management in smart city applications.

  4. Implementation

    1. Encryption method based on Catalan objects and combinatorial structures with noncrossing or nonnested matching [98]. The results showed that it is much more difficult to recognize ciphertext generated with the Catalan method than one made with the Data Encryption Standard (DES) algorithm. The paper also evaluated the quality of the generated Catalan key using statistical testing proposed by the National Institute of Standards and Technology. The proposed method has potential applications in e-Health IoT and smart cities data storage and processing.

    2. Encrypting and decrypting files and plaintext using the Lattice Path method for combinatorial encryption [99]. The plaintext is first converted into binary form and then a binary key is generated using the Catalan number formula. The binary key is used to determine which characters from the plaintext are transferred to the ciphertext. The encryption process involves selecting an ordered pair of 1 and 0 for each character in the plaintext, and transferring the character to the ciphertext only when its corresponding bit 1 gets its pair of bit 0. The decryption process is performed in reverse order of reading the binary key record, starting from the last bit and ending at the first bit in the key. The occurrence of bit 0 indicates an open pair and 1 closed pair. The number of possible valid paths in the network is directly determined by the calculating formula for the C n set of Catalan numbers.

    3. Procedure for generating cryptographic keys from a segment of a 3D image using a computational geometry algorithm [100]. The generated keys are then used to encrypt and decrypt text based on the balanced parentheses combinatorial problem. The encryption process involves permuting the bits of the message using the generated key, while the decryption process involves reversing the permutation using the same key. The triangulation of the separated polygon is converted into a record that represents the Catalan key, which is then used in the encryption and decryption of text based on the balanced parentheses combinatorial problem. The authors also discuss the properties of Catalan keys and the number of valid values that satisfy the condition of balance for a given basis.

    4. Encryption method based on Catalan random walks offers new possibilities for multimedia data protection to ensure the rights of participants in the multimedia distribution chain [101]. The proposed encryption and decryption procedure consists of five phases: conversion, division, selection, encryption, and generation. In the conversion phase, the data (text or image) is loaded and converted into binary form. In the division phase, the binary sequence is divided into binary blocks of a specific size, and the basis n is loaded for generating the set C n , representing the set of Catalan objects, i.e., the set of keys. In the selection phase, the valid random walks through the binary block are generated using the Catalan key. In the encryption phase, the binary block is encrypted using the generated random walk. In the generation phase, the encrypted binary blocks are combined to form the encrypted multimedia content. The decryption procedure is the reverse of the encryption procedure, where the encrypted multimedia content is divided into binary blocks, and the valid random walks are generated using the Catalan key. The binary blocks are then decrypted using the generated random walk, and the decrypted binary blocks are combined to form the original multimedia content.

    5. Application of Ballot Problem, Stack Permutations, and Balanced Parentheses in encryption and decryption of files and plaintext [102]. These combinatorial problems are used to generate a secret key based on Catalan numbers, which is then used for encryption and decryption. The Ballot Problem is used to determine the number of combinations to put the 2n votes in such a way that in each adding a new vote, the number of votes that has been won by candidate A is greater than or equal to the number of the votes that candidate B has received. Stack Permutations are used to determine the number of ways to stack n distinct objects in a pile. Balanced Parentheses are used to determine the number of ways to arrange n pairs of parentheses such that they are balanced.

  5. Steganography

    1. Novel data hiding method using Catalan numbers and Dyck words [103]. The data carrier retains its original shape and a GenerateStegoKey class is responsible for generating a complex stego-key that later allows retrieving a hidden message from the data carrier. The proposed encryption and decryption procedure involves selecting bits in the data carrier based on the sets n i that generate the value C n , which serves to generate Dyck Words. The set of additional parameters S, E, R reveals the initial and end position of bits and an additional condition. The initial position and end of the bits give a schedule in which they are taken, and the value D determines which bits are taken in the unchanged form and which are complemented. In the last step, a stego-key consisting of an ordered triple K = n i , S, E, R, D i . The security of the system is proven through state-of-the-art machine learning analysis.

    2. Encryption process based on encoding an image in a binary record, converting a secret message (hidden information) into a binary record, and creating a Delaunay triangulation of a binary record of an image whose vertices are carriers of the secret message bit [104]. After that, by applying the stack permutation method and Catalan objects to the coordinates (x, y) of the Delaunay vertex, a completely new encrypted triangulation is obtained whose vertex coordinates (x, y) are placed in a sequence. The original image, an encrypted string with vertex coordinates (x, y) in the form of Base64 code and an encrypted Delaunay triangulation, are sent to the user via the medium (Internet). Finally, in the process of decryption, by reapplying the Catalan object and the stack permutation method, the original Delaunay triangulation of the binary record of the image is created and the original information is revealed.

    3. An integer sequence named Catalan Transform (CT) has been exploited in the image steganography domain. At the outset, the cover image is decomposed into 2 × 2 non-overlapping blocks in row major order [105]. Then, each such block, that is, 4 − pixel group, is converted into the transform domain using CT. Secret bits are embedded in the transformed components in varying proportions, which facilitates us to achieve a payload in the range of 1–4 bpp (bits per pixel). Inverse Catalan Transform (ICT) is applied over transformed cum embedded quadruples to generate the stego-pixels in spatial domain. Successive embedding operation over an entire image ensures the formation of stego-image.

3.6.3 Further details

Remark on Steganography. A fundamental characteristic of image steganography is the assurance of secure communication during the transmission of stego-images across various networks or communication channels. Various methodologies for image steganography have been proposed, depending on the specific application and stages involved within the embedding process. Consequently, these systems can be categorised according to several criteria, including the type of cover-image used (either 2D or 3D images), the intended application, the retrieval process (whether reversible or irreversible), the nature of the embedding process (whether in the spatial or transform domain) and adaptive steganography.

The process of embedding secret data within the cover-image constitutes the fundamental mechanism of steganography. Given the potential for embedding secret data within both the spatial and transform domains of the cover-image, an intricate classification system predicated on the nature of the cover domain is employed.

Steganography in the transform domain involves embedding within the frequency domain. Before embedding within the spatial domain, the content is converted into the frequency domain. Upon completion of the embedding process, an inverse transform is executed to generate a steganographic image. Similarly, the extraction process requires execution in the frequency domain. Embedding in the frequency domain typically enhances the robustness, imperceptibility, and security of the embedded message. In the incipient phase of the development of steganography, the transform domain was not widely adopted because of significant distortion effects, despite offering greater message robustness in lossy channels. This occurs because the embedded bits are diffused over a broader area of the image, making it more suitable for robust watermarking. However, contemporary steganographic techniques continue to advance within the transform domain due to their inherent complexity and the potential to produce secure and robust steganographic outcomes [106], 107].

In-depth analysis of sequence application. In the transform domain employed in steganography, we find the Catalan Transform (CT). CT is one of the invertible transformations in the sequence of integers associated with Catalan numbers [108]. Catalan transform has been used in image steganography and was only implemented in 2021 in research [105].

Proposition 3.2.

(Riordan matrix). The general term T(n, k) of the Riordan matrix (1, C(x)) is given by

(109) T ( n , k ) = j = 0 k k j j / 2 n ( 1 ) n + j 2 2 n k

where C(x) is defined in (99).

Definition 3.9.

(Catalan transform). Given a sequence a n , its Catalan transform b n is given by:

(110) b n = k = 0 n k 2 n k 2 n k n k a k = k = 0 n k n 2 n k 1 n k a k

or

(111) b n = j = 0 n k = 0 n 2 k + 1 n + k + 1 ( 1 ) k j 2 n n k k j a j .

The inverse transformation is given by:

(112) a n = k = 0 n / 2 n k k ( 1 ) k b n k = k = 0 n k n k ( 1 ) n k b k .

(Catalan transform-based secured image steganography). The application of CT in image steganography is innovative, with its most prominent characteristic being the significant variations in transformed coefficients caused by embedding. This is due to the unique computational process of the coefficients, making the scheme effectively impervious to adversarial attacks. Furthermore, the ingenuity of the approach is further highlighted by the precise manipulation of these transformed coefficients through an adaptive embedding rule, which guarantees a high payload capacity, improved perceptual quality and, critically, the ease of data extraction by the recipient without compromising the embedding capacity [105].

Let us consider p 0, p 1, …, p n be the pixel values in a given pixel group P. Applying CT [10] one can compute the transformed components t 0, t 1, …, t n as follows:

(113) t n = k = 0 n k 2 n k 2 n k n k p k

where, for all n, 0 ≤ n ≤ size (P) − 1. By using (113), CT is applied over 4 − pixel groups (i.e. size (P) = 4) to derive transformed quadruples as follows:

(114) t i = p 0  if  i = 0 p 1  if  i = 1 p 1 + p 2  if  i = 2 2 p 1 + 2 p 2 + p 3  if  i = 3

Again, by applying inverse CT (ICT), one can recalculate pixel values p 0 , p 1 , , p n as:

(115) p n = k = 0 n ( 1 ) ( n k ) k n k t k

where, for all n, 0 ≤ n ≤ size (P) − 1. Using (115), ICT is applied over transformed quadruples to recompute the 4 − pixel groups as follows:

(116) p i = t 0  if  i = 0 t 1  if  i = 1 t 1 + t 2  if  i = 2 2 t 2 + t 3  if  i = 3

In case of no embedding, all recomputed pixel values are found to be exactly the same corresponding to the pixel values used prior to applying CT, i.e., p i = p i .

The advantages of transform domain approaches and the application of CT have been previously mentioned. CT is utilised to convert each 2 × 2 non-overlapping block of the cover image from the spatial domain into the transformed domain. The core principle of CT involves the creation of an integer polynomial sequence in coefficient form through additions and multiplications based on the pixel values. Instead of embedding the secret bits directly into the pixel values, they are inserted into the transformed coefficients, thereby achieving increased robustness against typical signal processing attacks. Additionally, the extraction phase is employed to retrieve the secret image from the stego-image.

Specifically, the method is divided into two distinct phases that yield the following outcomes:

  1. The cover-image of dimension m × n is decomposed into 2 × 2 nonoverlapping blocks where the pixel values p 0, p 1, p 2 and p 3 are arranged as one dimensional sequence named as 4 − pixel group. CT is then applied to each pixel group to convert the same to the transform domain. Secret bit-stream s is obtained from the secret image. To achieve an average payload of n bpp, 4n numbers of bits from secret bit stream s (as obtained from secret image) are embedded in the transformed quadruples t 0 , t 1 , t 2 and t 3 . ICT is applied over the transformed cum embedded quadruples to get back Stego-pixels in the spatial domain. The above steps are repeated until and unless the secret bit-stream gets fully embedded and the stego-image is produced.

  2. The stego-image of dimension m × n is decomposed into 2 × 2 non-overlapping blocks where the stego-pixels p , p 1 , p 2 and p 3 are arranged as a one-dimensional sequence named group 4 − pixel. CT is then applied on each group of pixels to convert the same into the transform domain. For an average payload of n bpp, 4n numbers of secret bits are extracted from the transformed quadruples. ICT is applied to get the 4 − pixel group back in the spatial domain. This process is repeated until and unless the entire secret bit-stream is extracted and the secret image is reproduced.

3.7 Narayana numbers

In 1356, the Indian mathematician Narayana Pandit wrote his famous book titled Ganita Kaumudi where he proposed the following problem of a herd of cows and calves: A cow produces one calf every year. Beginning in its fourth year, each calf produces one calf at the beginning of each year. How many calves are there altogether after 20 years? [109], 110]

We can translate this problem into our modern language of recurrence sequences. In this problem, we observe that the number of cows increased by one after one year, increased by one after two years, increased by one after three years, increased by two after four years, and so on. Hence we obtain the sequence 1, 1, 1, 2, … in the n-th year [111]. This problem appears to be similar to the Fibonacci rabbit problem discussed earlier.

The Narayana sequence has a close connection to some famous numbers or sequences and plays an important role in cryptography and combinatorics [112]. For example, it can be seen as the number of compositions of n in parts 1 and 3. For n ≥ 3, the Narayana sequence can be expressed as the sums of rows of Pascal’s triangle with triplicated diagonals, while the Fibonacci number F n is the row sums of Pascal’s triangle with slope diagonals of 45°. Narayana’s sequence has a beautiful distribution pattern, the ratio of consecutive terms whose consecutive terms approximate the super-golden ratio, which is closely related to the golden ratio [113]. Moreover, the Narayana sequence satisfies good cross-correlation and autocorrelation properties, which provide wide applications in data coding, information theory, and cryptography [114].

3.7.1 Proprieties

Definition 3.10.

Narayana’s cow sequence can be defined by the recurrence relation:

(117) N 0 = 0 N 1 = N 2 = 1 N n = N n 1 + N n 3 for n 3

a natural variation on the Fibonacci sequence.

OEIS. Table 8 lists the first terms of the sequence, which are also available in the OEIS database.

Table 8:

Narayana sequence in OEIS database.

A-number A000930
Name Narayana’s cows sequence: a(0) = a(1) = a(2) = 1; thereafter a(n) = a(n − 1) + a(n − 3).
Data 1, 1, 1, 2, 3, 4, 6, 9, 13, 19, 28, 41, 60, 88, 129, 189, 277, 406, 595, 872, 1278, 1873, …
Offset 0, 4
Link https://oeis.org/A000930

Recurrence relation. Narayana’s cows sequence satisfies a third-order recurrence: relation

(118) N n = N n 1 + N n 3 ,  for  n 3 .

This has the initial values N 0 = 0 and N 1 = N 2 = N 3 = 1. Explicitly, the characteristic equation of N n is:

(119) x 3 x 2 1 = 0

and the characteristic roots are:

(120) α = 1 3 1 2 29 3 93 3 + 1 2 3 93 + 29 3 + 1 β = 1 3 1 6 1 i 3 1 2 29 3 93 3 1 6 1 + i 3 1 2 3 93 + 29 3 γ = 1 3 1 6 1 + i 3 1 2 29 3 93 3 1 6 1 i 3 1 2 3 93 + 29 3

Then, the Narayana sequence can be obtained by Binet’s formula:

(121) N n = A α n + B β n + C γ n .

Generating function. For n Z 0 , the generating function of the Narayana sequence is:

(122) g ( x ) = 1 1 x x 3 = n = 0 N n + 1 x n .

With the Vieta theorem, we have:

(123) α + β + γ = 1 α β + β γ + α γ = 0 α β γ = 1

From (121), we obtain:

(124) N 0 = A + B + C = 0 N 1 = A α + B β + C γ = 1 N 2 = A α 2 + B β 2 + C γ 2 = 1

which implies:

(125) A = 1 β γ ( α β ) ( α γ ) , B = 1 α γ ( β α ) ( β γ ) , C = 1 α β ( γ β ) ( γ α ) .

With formula (123), we can simplify A, B, and C and obtain:

(126) A = α α 2 α β α γ + β γ = α α 2 + 2 β γ = α 2 α 3 + 2

and

(127) B = β 2 β 3 + 2 , C = γ 2 γ 3 + 2 .

The Narayana sequence was originally defined at positive indices. Actually, it can be extended to negative indices by defining:

(128) N n = A α n + B β n + C γ n

The following recurrence relation holds for all integral indices:

(129) N n = N n 1 + N n 3 , n Z .

Through a simple computation, the first few terms of N n at negative indices can be obtained from formulas (127) and (128), so that N −1 = 0, N −2 = 1, N −3 = 0, N −4 = −1, which also satisfies relation (129).

Corollary 3.4.

(Limiting Ratio). Assuming that the ratio of the consecutive terms of the Narayana cow sequence described in (117) and through the recursive relation (118) is constant, we shall try to determine that constant.

Proof.

First we assume that lim N n + 1 N n = λ then as n:

(130) lim N n + k N n = lim N n + k N n + k 1 × N n + k 1 N n + k 2 × × N n + 1 N n = λ × λ × λ = λ k

From Recursive Relation (118), we have as n

(131) lim N n + 3 = lim N n + 2 + N n .

That is:

(132) lim N n + 3 N n = lim N n + 2 N n + 1 .

Now using (130), we have λ 3 = λ 2 + 1 leading to λ 3 − λ 2 − 1 = 0. But this is precisely equation (119), whose positive root we found in to be approximately 1.46557. Thus λ = 1.46557… and this is the ratio of the consecutive terms of the Narayana’s cows sequence. We call the limiting ratio 1.46557… the Supergolden Ratio in view of the extension of the Golden Ratio obtained as the limiting ratio of two consecutive terms of the Fibonacci sequence. □

In addition, the Supergolden Ratio is the fourth smallest Pisot number (OEIS: A092526).

3.7.2 Applications to cryptography

The principal applications of Narayana numbers in cryptography are as follows:

  1. Foundations

    1. The Narayana universal code is generated using the Narayana sequence and constraining rules to ensure unique coding [115]. The number of bits required for the representation of the codeword follows the Narayana sequence. The code can be used to encode any positive integer, and decoding involves assigning the remaining bits with values from the Narayana sequence. A variant of Narayana coding can also be derived using a second-order Narayana sequence [116], with the third-order variant being even more beneficial for cryptographic applications [117].

  2. Implementation

    1. The Narayana sequence modulo p is shown to have good autocorrelation and crosscorrelation properties [118]. It has good randomness properties, so they might be used for cryptographic and key distribution applications.

3.7.3 Further details

Remark on Perfect Secrecy. Perfect ciphers hold significant allure within the field of cryptography, having been widely implemented since C. Shannon’s seminal publication, in which he delineated the characteristics of such ciphers and demonstrated the theoretical perfection of the one-time pad, also known as the Vernam cipher [119].

The studied concept pertains to symmetric-key cryptography involving three entities: Alice, Bob, and Eve. Alice seeks to transmit a confidential message to Bob while ensuring its secrecy from Eve, who possesses the capability to intercept all communications between Alice and Bob. To achieve this, Alice and Bob employ a cipher with a secret key k (i.e., a sequence from a defined alphabet), which is pre-shared between them but remains unknown to Eve. When Alice intends to dispatch a message m, she initially encrypts m using the key k and subsequently transmits the encrypted message to Bob, who then decrypts it with the same key k. Eve intercepts the encrypted message and attempts decryption without knowledge of the key. The cryptosystem is deemed perfectly secure if Eve, even with unbounded computational resources and infinite time, is incapable of extracting any information regarding the original message. C. Shannon not only provided a rigorous definition of perfect (or unconditional) secrecy but also demonstrated that the one-time pad (or Vernam cipher) embodies such a secure system. A salient characteristic of this cryptosystem is that the length of the secret key must match the length of the message (or its entropy). This requirement often constrains practical implementation, as contemporary telecommunication systems routinely process and store vast quantities of data.

A fundamental characteristic of this cryptographic system is the requirement that the secret key be of equivalent length to the message or its entropy. This attribute is frequently impractical for many contemporary telecommunication systems that routinely transmit and store data on the scale of megabytes. Consequently, a logical approach involves the pre-encryption compression of messages using lossless data compression techniques, thus reducing the message length and, correspondingly, the length of the secret key, prior to applying the one-time pad [120], 121]. Furthermore, the expected length of a secret key can be approximated near the theoretical limit (i.e., Shannon entropy), contingent upon whether the probability distribution of the encrypted messages is known or unknown. In scenarios where the probability distribution is known, the well-established Huffman coding algorithm is applicable; conversely, when the distribution is unknown, a universal coding scheme (or standard compression algorithm) is employed.

In-depth analysis of sequence application. Integer number sequences have often been used to designate universal codes useful for compression activities employed in cryptography and described previously.

Universal coding of integers is a variable-length code for discrete memory-less sources with infinite alphabets, and the probability distribution of the sources does not require prior knowledge. The fundamental framework for universal coding of integers considers discrete memoryless sources S = ( P , A ) with a countable alphabet set A = N + = { 1,2,3 , } and a Decreasing Probability Distribution (DPD) P of N + (i.e., n = 1 P ( n ) = 1 , and P(m) ≥ P(m + 1) ≥ 0, for all m N + ) [122]. Let H ( P ) = n = 1 P ( n ) log 2 P ( n ) denote the Shannon entropy of P. Let C be a variable-length code for the source S = P , N + ; it maps the positive integers N + onto the binary codewords {0, 1}*. Let L C ( ) denote the length function such that L C ( m ) = | C ( m ) | , for all m N + , where C ( m ) is the corresponding codeword of m. Furthermore, E P L C = n = 1 P ( n ) L C ( n ) denotes the expected codeword length of C . We say that C is universal if:

(133) E P L C max { 1 , H ( P ) } K C

for all DPDs P with H ( P ) < . K C is called the expansion factor of universal coding of integers C , and K C * inf K C DPD P and H ( P ) < is called the minimum expansion factor of universal coding of integers C . Moreover, C is called asymptotically optimal if C is universal and there exists a function R C ( ) such that:

(134) E P L C max { 1 , H ( P ) } R C ( H ( P ) )

for all DPDs P with H(P) <  and:

(135) lim H ( P ) + R C ( H ( P ) ) = 1

Let L(j) denote the length of the jth codeword c j of the set of codewords C. Then:

  1. if, for all j, L(j) ≥ j t , for some constant t > 0, then the set is not universal;

  2. if, for all j, L(j) ≤ K 1 + K 2 log2 j, for some constants K 1 and K 2, then the set is universal;

  3. if, for all j, L(j) ≥ K 1 + K 2 log2 j, for some constant K 1 and K 2, where K 2 > 1, then the set is not asymptotically optimal.

All universal encoding methods for countable sources are constructive and do roughly the same thing. Two techniques can be distinguished: the message length strategy and the flag strategy [123]. The length strategy focusses on encoding an integer by first encoding the length of the integer (i.e. binary), followed by the encoding of the integer itself. This method allows for a variable-length code that can efficiently represent small integers with shorter bit sequences while using longer sequences for larger integers. Unlike flag strategy, it is more about adding a specific pattern or prefix (flag) to the code to indicate the range or category of the integer and then encoding the integer within that context. This method is often used in schemes where integers are categorised into different ranges and each range has a unique prefix or flag that helps decode.

(Fibonacci codes). The Fibonacci family of codes is probably the most famous flag pattern strategy for universal coding of integers [124]. The Fibonacci code is closely related to the Zeckendorf representation, a positional numeral system that uses Zeckendorf’s theorem and has the property that no number has a representation with consecutive 1’s. The Fibonacci code word for a particular integer is exactly the integer’s Zeckendorf representation with the order of its digits reversed and an additional ”1” appended to the end.

Theorem 3.4.

(Zeckendorf’s theorem). Every positive integer has a unique representation as the sum of non consecutive Fibonacci numbers.

Let n be a positive integer. Then there is a unique increasing sequence c i i = 0 k such that c i  ≥ 2 and c i+1 > c i  + 1 for i ≥ 0, and that:

(136) n = i = 0 k F c i

We will call such a sum the Zeckendorf representation for n.

Proof.

Zeckendorf’s theorem has thus two parts [125]:

  1. (Existence). Every positive integer n has a Zeckendorf representation.

         We see that 1 = F 2, 2 = F 3, 3 = F 4, and 4 = F 2 + F 4 = 1 + 3. Suppose now that we can find such a representation for all positive integers up to k. If k + 1 is a Fibonacci number, then that provides the Zeckendorf representation. If k + 1 is not a Fibonacci number, then j N is such that F j  < k + 1 < F j+1. Define a = k + 1 − F j , so ak, meaning a has a Zeckendorf representation by hypothesis. We also note that:

    (137) F j + a = k + 1 < F j + 1 = F j + F j 1 a < F j 1 .

    Thus, the Zeckendorf representation of a does not contain a F j−1 term, so k + 1 = F j  + a will yield a Zeckendorf representation for k + 1. This proves the existence of the Zeckendorf representation for positive integers by induction.

  2. (Uniqueness). No positive integer n has two different Zeckendorf representations.

    Let n be a positive integer with two non-empty sets of terms S and T that form Zeckendorf representations of n. Let S′ = S\T and T′ = T\S. Since both sets lost the same common elements, we still have:

    (138) x S x a S T a = y T y b S T b x S x = y T y

    Thus, if S′ or T′ is empty, it will produce a sum of 0. Since all terms are non-negative, the other sum, equal to 0, must also be empty, which means that S′ = T′ =, so S = ST = T. Let us now assume that both sets S′ and T′ are non-empty. Let F s  = max S′ and F t  = max T′. Since S′ ≠ T′, we may say without loss of generality that F s  < F t . Thus, we may say that:

    (139) x S x < F s + 1 F t .

    Since the sums over S′ and T′ are non-negative and equal, this is a contradiction, so S′ = T′ =, and S = T.

Definition 3.11.

(Fibonacci codes). For a number N, if d(0), d(1), …, d(k − 1), d(k) represent the digits of the code word representing N then we have:

(140) N = i = 0 k 1 d ( i ) F ( i + 2 ) ,  and  d ( k 1 ) = d ( k ) = 1

where F(i) is the i th Fibonacci number, and so F(i + 2) is the i th distinct Fibonacci number starting with 1, 2, 3, 5, 8, 13, … The last bit d(k) is always an appended bit of 1 and does not carry place value.

To encode an integer N:

  1. Find the largest Fibonacci number equal to or less than N; subtract this number from N, keeping track of the remainder.

  2. If the subtracted number was the ith Fibonacci number F(i), put a 1 in place i − 2 in the code word (counting the leftmost digit as place 0).

  3. Repeat the previous steps, substituting the remainder for N, until a remainder of 0 is reached.

  4. Place an additional 1 after the rightmost digit in the code word.

To decode a code word, remove the final ”1”, assign the remaining the values 1, 2, 3, 5, 8, 13… (Fibonacci sequence – OEIS: A000045) to bits in the code word, and sum the values of ”1” bits.

Fibonacci coding possesses a distinctive attribute that renders it appealing in comparison to other universal codes: it exemplifies a self-synchronizing code, which facilitates the recovery of data from a compromised stream. With most other universal codes, if a single bit is altered, none of the data that follows it will be correctly read.

(Narayana codes). To generate Narayana code as a generalisation of Fibonacci universal code, we need to be able to map any given positive integer representing source code into variable-length code word in a manner used earlier [126].

A more general Narayana sequence N a (k) is given by a, b, c, a + c, a + b + c, a + b + 2c, 2a + b + 2c, 3a + 2b + 4c and so on with a = 1, b = 2 and c = 3.

Definition 3.12.

A variant of the Narayana coding scheme can be obtained by defining the second-order variant Narayana sequence, V N a ( 2 ) ( k ) , such that b = 3 − a and c = 1 − a [115]. This yields:

(141) V N a ( 2 ) ( 0 ) = a ( a Z ) V N a ( 2 ) ( 1 ) = 3 a V N a ( 2 ) ( 2 ) = 1 a V N a ( 2 ) ( k ) = V N a ( 2 ) ( k 1 ) + V N a ( 2 ) ( k 3 ) for k 3

In the light of the above definition, we get a variant of the Narayana series:

(142) V N 2 ( 2 ) ( n ) = { 2,5,3,1,6,9,10,16,25 , }

and

(143) V N 5 ( 2 ) ( n ) = { 5,8,6,1,9,15,16,25,40 , } ,  and so on. 

Moreover, we obtain there is no Zeckendorf representation for integers 3 and 15 using the sequence V N 1 ( 2 ) ( k ) = { 1,4,2,1,5,7,8,13 } , and integers 2 and 13 can’t be represented using sequence V N 3 ( 2 ) ( k ) = { 3,6,4,1,7,11,12,19 } . Upon examination of the second order variant Narayana codes [116] we obtained:

  1. for the only positive integer k = 1, the second order variant Narayana code V N u ( 2 ) ( k ) exactly exists for u = −1, − 2, …, − 20;

  2. for 1 ≤ k ≤ 50, there is at most j consecutive undetectable values (NA) the second order variant of Narayana code in V N j ( 2 ) ( k ) column in which 1 ≤ j ≤ 20;

  3. as long as j raises, the detectable of Narayana code is reduced in V N j ( 2 ) ( k ) column in which 1 ≤ j ≤ 20.

Definition 3.13.

The third order variant Narayana sequences V N a ( 3 ) ( k ) is described with the sequence {a, b, c, a + c, a + b + c, 2a + b + 2c, 3a + 2b + 3c, …} where b = 3 − a and c = 1 − a, that is:

(144) V N a ( 3 ) ( 1 ) = a V N a ( 3 ) ( 2 ) = 3 a V N a ( 3 ) ( 3 ) = 1 a V N a ( 3 ) ( 4 ) = 1 V N a ( 3 ) ( 5 ) = 4 a V N a ( 3 ) ( k ) = V N a ( 3 ) ( k 1 ) + V N a ( 3 ) ( k 3 ) + V N a ( 3 ) ( k 5 ) for k 6

The third order variant Narayana coding scheme can be obtained by defining the third order variant Narayana sequence, V N u ( 3 ) ( k ) , such that b = 3 − a and c = 1 − a [117]. In variant Narayana sequences, some integers have more than one Narayana code, while others have no Narayana code. For example, for the second-order variant Narayana sequence V N 1 ( 2 ) ( k ) = { 1,4,2,1,5,7,8,13 } while there is no Narayana code for integers k = 2 and k = 11 [116], there are two Narayana codes for integer k = 4. These codes are 011 and 100011. Similarly, for the third-order variant Narayana sequence V N 7 ( 3 ) ( k ) = { 7,10,8,1,11,12,23,42 } while there is no Narayana code for integers k = 7 and k = 40, there are two Narayana codes for integer k = 1. These codes are 000111 and 10111. We obtain the third order variant of Narayana codes V N u ( 3 ) ( k ) or undetectable values (NA) of the positive integer k for 1 ≤ k ≤ 50 and for u = −1, − 2, …, − 20. The results for the third order variant Narayana codes are:

  1. for the positive integers k = 1, 2, 3, 4, 5, 6, the third order variant of Narayana code V N u ( 3 ) ( k ) exactly exists for u = −1, − 2, …, − 20.

  2. for 1 ≤ k ≤ 50, there are at most j consecutive undetectable values (NA) the third-order variant of the Narayana code in V N ( 6 + j ) ( 3 ) ( k ) column in which 1 ≤ j ≤ 14.

  3. for 1 ≤ k ≤ 50, as long as j increases, the detectable third-order variant Narayana code is reduced in V N ( 6 + j ) ( 3 ) ( k ) column in which 1 ≤ j ≤ 14.

3.8 Other sequences

Discussion of other sequences that have not had cryptographic applications as widespread in the literature as the previous ones, but which are significant.

3.8.1 Fermat primes

Definition 3.14.

A Fermat prime is a Fermat number 2 2 n + 1 , that is prime.

Fermat conjectured in 1650 that every Fermat number is prime, and Eisenstein in 1844 proposed as a problem the proof that there are an infinite number of Fermat primes [8]. However, currently, the only Fermat numbers F n for n ≥ 5 for which primality or compositeness has been established are all composite.

OEIS. Table 9 lists the first terms of the sequence, which are also available in the OEIS database.

Table 9:

Fermat primes in OEIS database.

A-number A019434
Name Fermat primes: primes of the form 2 2 k + 1 , for some k > = 0.
Data 3, 5, 17, 257, 65537, …
Offset 1, 1
Link https://oeis.org/A019434

Applications to cryptography. Historically, the use of Fermat numbers in cryptography is primarily related to their role in the generation and testing of large prime numbers, which are fundamental to many cryptographic protocols and systems. Recently, Fermat numbers have been proposed as the main module for system computations in Fully Homomorphic Encryption (FHE) cryptosystems [127].

3.8.2 Proth primes

Definition 3.15.

A Proth number is a natural number of the form k ⋅ 2 s  + 1 where k , s N , k is odd and k < 2 s . A Proth prime is a Proth number that is prime in N .

Fermat numbers k = 1 , s = 2 t and Cullen numbers (k = s) are special cases of Proth numbers.

Their name was given in honour of the French mathematician François Proth who introduced these numbers in his 1878 paper [128]. He developed a theorem to determine whether a number of the form k ⋅ 2 n + 1 is prime or composite. This theorem is based on the evaluation of k ⋅ 2 n  (mod  n), where n must be greater than k. If the result satisfies specific criteria, the number is considered a Proth prime.

To date, the largest Proth prime discovered is 10223 ⋅ 231172165 + 1 having 9383761 decimal digits, found by the PrimeGrid distributed computing project in 2016. This is the largest known non-Mersenne prime number.

It is also noted that the theory of Proth numbers and Proth primes is surprisingly limited, and even basic results were not documented in the scientific literature.

OEIS. Table 10 lists the first terms of the sequence, which are also available in the OEIS database.

Table 10:

Proth primes in OEIS database.

A-number A080076
Name Proth primes: primes of the form k ⋅ 2 m  + 1 with odd k < 2 m , m ≥ 1.
Data 3, 5, 13, 17, 41, 97, 113, 193, 241, 257, 353, 449, 577, 641, 673, 769, 929, 1153, …
Offset 1, 1
Link https://oeis.org/A080076

Applications to cryptography. Proth primes have applications in cryptography; for example, they can optimise the Boer reduction between the Diffie–Hellman problem and the Discrete logarithm problem [129]. The prime number 55 ⋅ 2286 + 1 has been used in this way. Furthermore, Proth primes are used to design efficient and flexible Number Theoretic Transform (NTT) architectures for Post-Quantum Cryptography (PQC) and FHE [130].

3.8.3 Gaussian integers

Definition 3.16.

The Gaussian integers are the set Z [ i ] = { x + i y : x , y Z } of complex numbers whose real and imaginary parts are both integers.

Z [ i ] is a ring (really a subring of C ) since it is closed under addition and multiplication:

(145) ( x + i y ) + ( p + i q ) = ( x + p ) + i ( y + q )

(146) ( x + i y ) ( p + i q ) = ( x p y q ) + i ( x q + y p )

The second follows from the fact that i satisfies the quadratic polynomial i 2 + 1 = 0.

The Gaussian integers have many special properties that are similar to those of the integers, and they are named after the German mathematician Carl Friedrich Gauss.

Gaussian primes. As Gaussian integers form a principal ideal domain, they also form a unique factorisation domain. This implies that a Gaussian integer is irreducible (that is, it is not the product of two non-units) if and only if it is prime (that is, it generates a prime ideal).

The prime elements of Z [ i ] are also known as Gaussian primes. An associate of a Gaussian prime is also a Gaussian prime. The conjugate of a Gaussian prime is also a Gaussian prime (this implies that Gaussian primes are symmetric about the real and imaginary axes).

A positive integer is a Gaussian prime if and only if it is a prime number that is congruent to 3 modulo 4 (that is, it may be written 4n + 3, with n a non-negative integer). The other prime numbers are not Gaussian primes, but each is the product of two conjugate Gaussian primes.

OEIS. Table 11 lists the first terms of the sequence, which are also available in the OEIS database.

Table 11:

Gaussian primes in OEIS database.

A-number A002145
Name Primes of the form 4k + 3 (natural primes which are also Gaussian primes).
Data 3, 7, 11, 19, 23, 31, 43, 47, 59, 67, 71, 79, 83, 103, 107, 127, 131, 139, 151, 163, 167, 179, …
Offset 1, 1
Link https://oeis.org/A002145

Applications to cryptography. Gaussian integers are used to extend the traditional RSA algorithm within its domain [131]. The extension also involves adapting existing algorithms, such as the extended Euclidean algorithm, to the domain of Gaussian integers. This allows for the definition of a modified version of Euler’s totient function, necessary for choosing the encryption and decryption exponents in RSA, and for understanding how to encrypt and decrypt messages within this new context. The method is demonstrated to represent messages as Gaussian numbers, and the product of two Gaussian primes is used to form the modulus of the cryptographic system, a key component of the security of RSA. Additionally, a new hybrid public/private key cryptography scheme uses Perfect Gaussian Integer Sequences (PGIS) with a period of N = pq, where p and q are odd primes [132]. This novel scheme is based on circular convolution over PGISs, which is shown to be a trapdoor one-way permutation function, allowing for both cipher encryption and digital signatures. The authors assert that the security level of this new scheme is comparable to that of the RSA system, while potentially offering better performance in terms of system capacity due to the abundance of PGISs available. Additionally, the proposed scheme is especially suitable for use on the Internet of Things (IoT) platforms, where lightweight cryptographic functions are needed due to the limited resources of IoT devices.

4 Conclusions and future work

The comprehensive review of the literature has revealed that integer sequences have exerted a profound influence in diverse domains of cryptography. As mathematicians engage in more rigorous exploration of integer sequences, they discern novel patterns and interconnections that bear significant practical implications within these domains. However, it is crucial to emphasise that certain sequences exhibit a higher degree of relevance with respect to their applicability to specific subdomains of cryptography. Nevertheless, it is evident that all principal areas of cryptography examined in our study have been affected by at least one integer sequence (Table 12).

Table 12:

Using the main sequences of integers in the main macro-areas of the cryptography domain.

Macro-areas Prime Mersenne Sophie German Fibonacci Lucas Catalan Narayana
Foundations
Cryptographic hash functions
Secret-key cryptography
Public-key cryptography
Cryptographic protocols
Implementation
Attacks and cryptanalysis
Steganography

This elucidates the extensive scope and efficacy of employing such sequences over time. Specifically, our review of the literature underscores that integer sequences have been effectively used in public-key cryptography, where they have demonstrated robust security properties. Furthermore, their application in symmetric key cryptography underscores their versatility and appropriateness for various cryptographic algorithms, thereby underpinning the development of resilient and secure cryptographic systems. The diverse applications of integer sequences thus underscore their flexibility and adaptability in different cryptographic contexts. Our analysis suggests that it is imperative to continue investigating and harnessing the potential of integer sequences within the domain of cryptography, given their multifaceted implications and the broad spectrum of contexts in which they can be effectively employed.


Corresponding author: Mario Raso, Computer Science Department, Sapienza University of Rome, Rome, Italy, E-mail: 

Acknowledgments

The authors are grateful for the reviewer’s valuable comments that improved the manuscript.

  1. Funding information: Daniele Venturi is member of the Gruppo Nazionale Calcolo Scientifico Istituto Nazionale di Alta Matematica (GNCS-INdAM). His research was supported by project SERICS (PE00000014) and by project PARTHENON (B53D23013000006), under the MUR National Recovery and Resilience Plan funded by the European Union-NextGenerationEU, and by project BEAT, funded by Sapienza University of Rome.

  2. Author contributions: All authors have accepted responsibility for the entire content of this manuscript and consented to its submission to the journal, reviewed all the results and approved the final version of the manuscript.

  3. Conflict of interest: The authors declare no conflict of interest.

  4. Ethical approval: The conducted research is not related to either human or animals use.

  5. Data availability statement: Data sharing is not applicable to this article as no datasets were generated or analysed during the current study.

References

1. International Association for Cryptologic Research (IACR). Available from: https://www.iacr.org/publications/.Suche in Google Scholar

2. Journal of Integer Sequences. Available from: https://cs.uwaterloo.ca/journals/JIS/.Suche in Google Scholar

3. The On-Line Encyclopedia of Integer Sequences® (OEIS®). Available from: https://oeis.org/.Suche in Google Scholar

4. Sloane, N. A handbook of integer sequences. New York, USA: Academic Press; 1973.Suche in Google Scholar

5. Sloane, N, Plouffe, S. The encyclopedia of integer sequences. San Diego, USA: Academic Press; 1995.Suche in Google Scholar

6. Everest, G, Van Der Poorten, AJ, Shparlinski, I, Ward, T. Recurrence sequences. Vol. 104 of mathematical surveys and monographs. Providence, RI, USA: American Mathematical Society; 2003.10.1090/surv/104Suche in Google Scholar

7. Rowland, ES. A natural prime-generating recurrence. J Integer Seq 2008;11:28.Suche in Google Scholar

8. Ribenboim, P. The new book of prime number records, 3rd ed. Waterloo, Canada: University of Waterloo; 1996.10.1007/978-1-4612-0759-7_2Suche in Google Scholar

9. Formulae for the nth prime, Proc. Washington State University Conference on Number Theory 96–107; 1971.Suche in Google Scholar

10. Willans, CP. On formulae for the nth prime number. Math Gaz 1964;48:413–15. https://doi.org/10.2307/3611701.Suche in Google Scholar

11. Golomb, SW. A direct interpretation of Gandhi’s formula. Am Math Mon 1974;81:752–4. https://doi.org/10.1080/00029890.1974.11993659.Suche in Google Scholar

12. Goodstein, RL, Wormell, CP. Formulae for primes. Math Gaz 1967;51:35–8. https://doi.org/10.2307/3613607.Suche in Google Scholar

13. Dudley, U. History of a formula for primes. Am Math Mon 1969;76:23–8. https://doi.org/10.2307/2316781.Suche in Google Scholar

14. Matiyasevich, Y. Diophantine representation of the set of prime numbers (in Russian). Dokl Akad Nauk SSSR 1971;196:770–3. English translation by R. N. Goss, in Soviet Math. 12 (1971), 249–254.Suche in Google Scholar

15. Jones, JP, Sato, D, Wada, H, Wiens, D. Diophantine representation of the set of prime numbers. Am Math Mon 1976;83:449–64. https://doi.org/10.1080/00029890.1976.11994142.Suche in Google Scholar

16. FIPS publication 180-2: Secure Hash standard. Federal Register (67 FR 54786). USA: National Institute of Standards and Technology (NIST); 2003.Suche in Google Scholar

17. Rivest, RL, Shamir, A, Adleman, LM. A method for obtaining digital signatures and public-key cryptosystems. Commun ACM 1978;21:120–6. https://doi.org/10.1145/359340.359342.Suche in Google Scholar

18. Koblitz, N. Elliptic curve cryptosystems. Math Comput 1987;48:203–9. https://doi.org/10.2307/2007884.Suche in Google Scholar

19. Miller, VS. Use of elliptic curves in cryptography. In: Williams, HC, editor. Advances in cryptology – CRYPTO ’85 proceedings. Berlin, Heidelberg: Springer Berlin Heidelberg; 1986:417–26 pp.10.1007/3-540-39799-X_31Suche in Google Scholar

20. Diffie, W, Hellman, ME. New directions in cryptography. IEEE Trans Inf Theor 1976;22:644–54. https://doi.org/10.1109/TIT.1976.1055638.Suche in Google Scholar

21. Matsumoto, M, Nishimura, T. Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator. ACM Trans Model Comput Simul (TOMACS) 1998;8:3–30. https://doi.org/10.1145/272991.272995.Suche in Google Scholar

22. Matsumoto, M, Nishimura, T, Hagita, M, Saito, M. Cryptographic Mersenne Twister and Fubuki stream/block cipher. Cryptology ePrint Archive; 2005. Available from: https://eprint.iacr.org/2005/165.Suche in Google Scholar

23. Maetouq, A, Daud, SM. HMNT: hash function based on new Mersenne number transform. IEEE Access 2020;8:80395–407. https://doi.org/10.1109/ACCESS.2020.2989820.Suche in Google Scholar

24. Aggarwal, D, Joux, A, Prakash, A, Santha, M. A new public-key cryptosystem via Mersenne numbers. In: Advances in cryptology–CRYPTO 2018: 38th annual international cryptology conference, Santa Barbara, CA, USA, August 19–23, 2018, proceedings, Part III 38. Springer; 2018:459–82 pp.10.1007/978-3-319-96878-0_16Suche in Google Scholar

25. Boussakta, S, Holt, AGJ. New transform using the Mersenne numbers. IEE Proc Vis Image Signal Process 1995;142:381–8. https://doi.org/10.1049/ip-vis:19952323.10.1049/ip-vis:19952323Suche in Google Scholar

26. Shparlinski, I. Number theoretic methods in cryptography: Complexity lower bounds. Basel, Switzerland: Birkhäuser; 2012, 17.Suche in Google Scholar

27. Agarwal, RC, Burrus, C. Fast convolution using Fermat number transforms with applications to digital filtering. IEEE Trans Acoust Speech Signal Process 1974;22:87–97. https://doi.org/10.1109/TASSP.1974.1162555.Suche in Google Scholar

28. Rader, CM. Discrete convolutions via Mersenne transforms. IEEE Trans Comput 1972;100:1269–73. https://doi.org/10.1109/T-C.1972.223497.Suche in Google Scholar

29. Hamood, MT, Boussakta, S. Efficient algorithms for computing the new Mersenne number transform. Digit Signal Process 2014;25:280–8. https://doi.org/10.1016/j.dsp.2013.10.018.Suche in Google Scholar

30. Al-Gailani, MF, Boussakta, S. Evaluation of one-dimensional NMNT for security applications. In: 2010 7th International symposium on communication systems, networks & digital signal processing (CSNDSP 2010). IEEE; 2010:715–20 pp.10.1109/CSNDSP16145.2010.5580331Suche in Google Scholar

31. Agarwal, RC, Burrus, CS. Number theoretic transforms to implement fast digital convolution. Proc IEEE 1975;63:550–60. https://doi.org/10.1109/PROC.1975.9791.Suche in Google Scholar

32. Shoup, V. A computational introduction to number theory and algebra. Cambrige, UK: Cambridge University Press; 2009.10.1017/CBO9780511814549Suche in Google Scholar

33. Mascagni, M, Chi, H. Parallel linear congruential generators with Sophie–Germain moduli. Parallel Comput 2004;30:1217–31. https://doi.org/10.1016/j.parco.2004.08.002.Suche in Google Scholar

34. Saarinen, MJO. Sgcm: the sophie germain counter mode. Cryptology ePrint Archive; 2011. Available from: https://eprint.iacr.org/2011/326.Suche in Google Scholar

35. Rivest, R, Silverman, R. Are ‘strong’ primes needed for RSA. Cryptology ePrint Archive; 2001. Available from: https://eprint.iacr.org/2001/007.Suche in Google Scholar

36. Von Zur Gathen, J, Shparlinski, IE. Generating safe primes. J Math Cryptol 2013;7:333–65. https://doi.org/10.1515/jmc-2013-5011.Suche in Google Scholar

37. Cheon, JH. Security analysis of the strong Diffie-Hellman problem. In: Annual international conference on the theory and applications of cryptographic techniques. Springer; 2006:1–11 pp.10.1007/11761679_1Suche in Google Scholar

38. Gordon, J. Strong primes are easy to find. In: Advances in cryptology: proceedings of EUROCRYPT 84 A workshop on the theory and application of cryptographic techniques Paris, France, April 9–11, 1984 3. Springer; 1985:216–23 pp.Suche in Google Scholar

39. Stinson, DR. Cryptography: theory and practice. New York, USA: Chapman and Hall/CRC; 2005.10.1201/9781420057133Suche in Google Scholar

40. NI of Standards, Center TNCSR. Block Cipher Techniques. Available from: https://csrc.nist.gov/Projects/block-cipher-techniques/bcm.Suche in Google Scholar

41. NI of Standards, Center TNCSR. Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC. https://doi.org/10.6028/NIST.SP.800-38D.Suche in Google Scholar

42. Koshy, T. Fibonacci and lucas numbers with applications. New York: Wiley-Interscience; 2001.10.1002/9781118033067Suche in Google Scholar

43. Mascagni, M, Cuccaro, SA, Pryor, DV, Robinson, ML. A fast, high quality, and reproducible parallel lagged-Fibonacci pseudorandom number generator. J Comput Phys 1995;119:211–9. https://doi.org/10.1006/jcph.1995.1130.Suche in Google Scholar

44. Mascagni, M, Srinivasan, A. Parameterizing parallel multiplicative lagged-Fibonacci generators. Parallel Comput 2004;30:899–916. https://doi.org/10.1016/j.parco.2004.06.001.Suche in Google Scholar

45. Golomb, SW. Shift register sequences. Leguna Hills-USA: Aegean Park Press; 1982.Suche in Google Scholar

46. Goresky, M, Klapper, AM. Fibonacci and Galois representations of feedback-with-carry shift registers. IEEE Trans Inf Theor 2002;48:2826–36. https://doi.org/10.1109/TIT.2002.804048.Suche in Google Scholar

47. Anderson, R. On Fibonacci keystream generators. In: Fast software encryption: second international workshop Leuven, Belgium, December 14-16, 1994 proceedings 2. Springer; 1995:346–52 pp.10.1007/3-540-60590-8_26Suche in Google Scholar

48. Zhiqiang, L. The transformation from the Galois NLFSR to the Fibonacci configuration. In: 2013 Fourth international conference on emerging intelligent data and web technologies. IEEE; 2013:335–9 pp.10.1109/EIDWT.2013.64Suche in Google Scholar

49. Bellini, E, Marcolla, C, Murru, N. An application of p-Fibonacci error-correcting codes to cryptography. Mathematics 2021;9:789. https://doi.org/10.3390/math9070789.Suche in Google Scholar

50. Chen, M, Xiao, Q, Matsumoto, K, Yoshida, M, Luo, X, Kita, K. A fast retrieval algorithm based on fibonacci hashing for audio fingerprinting systems. In: 2013 International conference on advanced information engineering and education science (ICAIEES 2013). Atlantis Press; 2013:219–22 pp.10.2991/icaiees-13.2013.59Suche in Google Scholar

51. Alakuş, TB, Türkoğlu, İ. A novel Fibonacci hash method for protein family identification by usingrecurrent neural networks. Turk J Electr Eng Comput Sci 2021;29:370–86. https://doi.org/10.3906/elk-2003-116.Suche in Google Scholar

52. Planat, M. Quantum state expansions in terms of Fibonacci numbers. Phys Lett 2002;293:306–12. https://doi.org/10.1016/S0375-9601(01)00792-8.Suche in Google Scholar

53. Molfetta, GD, Brachet, M, Debbasch, F. Quantum walks in Fibonacci lattices. Phys RevA 2013;88:042301. https://doi.org/10.1103/PhysRevA.88.042301.Suche in Google Scholar

54. Rifai, ME. Fibonacci coding in quantum communication protocols. Int J Quant Inf 2017;15:1750021. https://doi.org/10.1142/S021974991750021X.Suche in Google Scholar

55. Agaian, SS, Cherukuri, RC, Sifuentes, R. A new secure adaptive steganographic algorithm using Fibonacci numbers. In: 2006 IEEE Region 5 conference; 2006:125–9 pp.10.1109/TPSD.2006.5507446Suche in Google Scholar

56. Gowda, SN. An intelligent fibonacci approach to image steganography. In: 2017 IEEE Region 10 symposium (TENSYMP); 2017:1–4 pp.10.1109/TENCONSpring.2017.8070030Suche in Google Scholar

57. Knuth, DE. The art of computer programming. Boston, USA: Pearson Education; 1997, 2.Suche in Google Scholar

58. Aluru, S. Lagged Fibonacci random number generators for distributed memory parallel computers. J Parallel Distr Comput 1997;45:1–12. https://doi.org/10.1006/jpdc.1997.1363.Suche in Google Scholar

59. López, ABO, Encinas, LH, Muñoz, AM, Vitini, FM. A lightweight pseudorandom number generator for securing the internet of things. IEEE Access 2017;5:27800–6. https://doi.org/10.1109/ACCESS.2017.2774105.Suche in Google Scholar

60. Maksymovych, V, Harasymchuk, O, Karpinski, M, Shabatura, M, Jancarczyk, D, Kajstura, K. A new approach to the development of additive Fibonacci generators based on prime numbers. Electronics 2021;10:2912. https://doi.org/10.3390/electronics10232912.Suche in Google Scholar

61. Maksymovych, V, Shabatura, M, Harasymchuk, O, Karpinski, M, Jancarczyk, D, Sawicki, P. Development of additive Fibonacci generators with improved characteristics for cybersecurity needs. Appl Sci 2022;12:1519. https://doi.org/10.3390/app12031519.Suche in Google Scholar

62. Ballot, CJC, Williams, HC. The Lucas Sequences: Theory and Applications. Berlin, Germany: Springer Nature; 2023, 8.10.1007/978-3-031-37238-4Suche in Google Scholar

63. He, Y, Zhang, W. Sum relations for Lucas sequences. J Integer Seq 2010;13:3.Suche in Google Scholar

64. Baillie, R, Wagstaff, SS. Lucas pseudoprimes. Math Comput 1980;35:1391–417. https://doi.org/10.1090/S0025-5718-1980-0583518-6.Suche in Google Scholar

65. Brillhart, J, Lehmer, DH, Selfridge, JL. New primality criteria and factorizations of 2m ± 1. Math Comput 1975;29:620–47. https://doi.org/10.1090/s0025-5718-1975-0384673-1.Suche in Google Scholar

66. Smith, PJ, Lennon, MJJ. LUC: a new public key system. In: Proceedings of the IFIP TC11, ninth international conference on information security: computer security. IFIP/Sec ’93. North-Holland Publishing Co.; 1993:103–17 pp.Suche in Google Scholar

67. Bleichenbacher, D, Bosma, W, Lenstra, AK. Some remarks on Lucas-based cryptosystems. In: Annual international cryptology conference. Springer; 1995:386–96 pp.10.1007/3-540-44750-4_31Suche in Google Scholar

68. Laih, CS, Tu, FK, Tai, WC. On the security of the Lucas function. Inf Process Lett 1995;53:243–7. https://doi.org/10.1016/0020-0190(94)00209-h.Suche in Google Scholar

69. Jiang, Z, Hao, Y, Wang, Y. A new public-key encryption scheme based on lucas sequence. J Electron (China) 2005;22:490–7. https://doi.org/10.1007/bf03037006.Suche in Google Scholar

70. Castagnos, G. An efficient probabilistic public-key cryptosystem over quadratic fields quotients. Finite Fields Their Appl 2007;13:563–76. https://doi.org/10.1016/j.ffa.2006.05.004.Suche in Google Scholar

71. Li, Z, Lu, B, Xu, H, Li, G, Li, W, Li, X. New algorithm for public key cryptosystems based on Lucas sequences. In: 2012 8th International conference on wireless communications, networking and mobile computing. IEEE; 2012:1–4 pp.10.1109/WiCOM.2012.6478583Suche in Google Scholar

72. El Fadil, L. A public-key cryptosystem based on Lucas sequences. Palestine J Mathe 2012;1:148–52.Suche in Google Scholar

73. Chillali, A, El Fadil, L. Anonymous multi-receiver public key encryption based on third order linear sequences. In: AIP conference proceedings. AIP Publishing; 2019, vol 2074.10.1063/1.5090630Suche in Google Scholar

74. Ray, PK. A cryptography method based on hyperbolicbalancing and Lucas-balancing functions. Proyecciones (Antofagasta) 2020;39:135–52. https://doi.org/10.22199/issn.0717-6279-2020-01-0009.Suche in Google Scholar

75. Abu, NA, Abdul-Latip, SF, Ariffin, MRK. A comparative S-index in factoring RSA modulus via Lucas sequences. Cryptology ePrint Archive; 2016. Available from: https://eprint.iacr.org/2016/937.Suche in Google Scholar

76. Boneh, D. Twenty years of attacks on the RSA cryptosystem. Not AMS 1999;46:203–12. https://www.ams.org/notices/199902/boneh.pdf.Suche in Google Scholar

77. Kaye, P, Laflamme, R, Mosca, M. An introduction to quantum computing. Oxford, UK: OUP Oxford; 2006.10.1093/oso/9780198570004.001.0001Suche in Google Scholar

78. Williams, HC, Schmid, BK. Some remarks concerning the M.I.T. public-key cryptosystem. BIT Numer Math 1979;19:525–38. https://doi.org/10.1007/bf01931269.Suche in Google Scholar

79. Shawe-Taylor, J. Generating strong primes. Electron Lett 1986;22:875–7. https://doi.org/10.1049/el:19860598.10.1049/el:19860598Suche in Google Scholar

80. Maurer, UM. Fast generation of prime numbers and secure public-key cryptographic parameters. J Cryptol 1995;8:123–55. https://doi.org/10.1007/bf00202269.Suche in Google Scholar

81. Smith, P. LUC public key encryption: a secure alternative to RSA. Dr Dobb’s J 1993;18:44–9.Suche in Google Scholar

82. Ibrahimpašić, B. A cryptanalytic attack on the LUC cryptosystem using continued fractions. Math Commun 2009;14:103–18.Suche in Google Scholar

83. Boneh, D, Venkatesan, R. Breaking RSA may not be equivalent to factoring. In: International conference on the theory and applic ation of cryptographic techniques; 1998.10.1007/BFb0054117Suche in Google Scholar

84. Boneh, D, Durfee, G. Cryptanalysis of RSA with private key d less than N/sup 0.292/. IEEE Trans Inf Theor 2000;46:1339–49. https://doi.org/10.1109/18.850673.Suche in Google Scholar

85. Jacobson, MJ, Williams, HC. Solving the Pell equation. New York: Springer; 2009.10.1007/978-0-387-84923-2Suche in Google Scholar

86. Muller, S. Some remarks on Williams’ public-key crypto functions. Fibonacci Q 2006;44:224–34. https://doi.org/10.1080/00150517.2006.12428314.Suche in Google Scholar

87. Stanley, RP. Catalan numbers. Cambrige, UK: Cambridge University Press; 2015.10.1017/CBO9781139871495Suche in Google Scholar

88. Brualdi, RA. Introductory combinatorics. Pearson education. New Jersey, USA: Pearson Prentice Hall; 2012.Suche in Google Scholar

89. Grimaldi, RP. Discrete and combinatorial mathematics, 5th ed. New Delhi, India: Pearson Education India; 2006.Suche in Google Scholar

90. Grimaldi, RP. Fibonacci and Catalan numbers. Hoboken, NJ, USA Wiley; 2012.10.1002/9781118159743Suche in Google Scholar

91. Kahkeshani, R. A generalization of the Catalan numbers. J Integer Seq 2013;16.Suche in Google Scholar

92. Stanley, RP. Enumerative Combinatorics. Cambrige, UK: Cambridge University Press; 1999, 2.10.1017/CBO9780511609589Suche in Google Scholar

93. Stanley, RP. Catalan addendum. preprint; 2013. Available from: http://www-math.mit.edu/rstan/ec/catadd.pdf.Suche in Google Scholar

94. Kumar, DS, Suneetha, C, Chandrasekhar, A. Novel encryption schemes based on Catalan numbers. Int J Eng Res Appl 2012. Available from: https://www.ijera.com/papers/Vol2_issue2/AA22161166.pdf.Suche in Google Scholar

95. Saračević, M, Adamović, S, Macek, N, Selimi, A, Pepic, S. Source and channel models for secret-key agreement based on Catalan numbers and the lattice path combinatorial approach. J Inf Sci Eng 2021;37:469–82. https://doi.org/10.6688/JISE.202103_37(2).0012.Suche in Google Scholar

96. Amounas, F, Kinani, E, Hajar, M. A novel approach for enciphering data based ECC using Catalan numbers. Int J Inf Netw Secur 2013;24. https://doi.org/10.11591/IJINS.V2I4.3447.Suche in Google Scholar

97. Saračević, M, Adamović, S, Macek, N, Elhoseny, M, Sarhan, S. Cryptographic keys exchange model for smart city applications. IET Intell Transp Syst 2020;14:1456–64. https://doi.org/10.1049/IET-ITS.2019.0855.Suche in Google Scholar

98. Saračević, M, Adamović, S, Miskovic, V, Elhoseny, M, Maček, N, Selim, MM, et al.. Data encryption for internet of things applications based on Catalan objects and two combinatorial structures. IEEE Trans Reliab 2021;70:819–30. https://doi.org/10.1109/TR.2020.3010973.Suche in Google Scholar

99. Saračević, M, Adamović, S, Biševac, E. Application of Catalan numbers and the lattice path combinatorial problem in cryptography. Acta Polytechnica Hungarica 2018;15:91–110. https://doi.org/10.12700/APH.15.7.2018.7.5.Suche in Google Scholar

100. Saračević, M, Selimi, A, Selimović, F. Generation of cryptographic keys with algorithm of Polygon triangulation and Catalan numbers. Comput Sci 2018;19:243. https://doi.org/10.7494/CSCI.2018.19.3.2749.Suche in Google Scholar

101. Saračević, M, Sharma, SK, Ahmad, K. A novel block encryption method based on Catalan random walks. Multimed Tool Appl 2021;81:36667–84. https://doi.org/10.1007/s11042-021-11497-5.Suche in Google Scholar

102. Saračević, M, Korićanin, E, Biševac, E. Encryption based on Ballot, Stack permutations and balanced parentheses using Catalan-keys. J Inf Technol Appl 2018;14:69–77.10.7251/JIT1702069SSuche in Google Scholar

103. Saračević, M, Adamović, S, Miškovic, V, Macek, N, Šarac, M. A novel approach to steganography based on the properties of Catalan numbers and Dyck words. Future Gener Comput Syst 2019;100:186–97. https://doi.org/10.1016/J.FUTURE.2019.05.010.Suche in Google Scholar

104. Selimović, F, Stanimirović, P, Saračević, M, Krtolica, P. Application of Delaunay triangulation and Catalan objects in steganography. Mathematics 2021;9:1172. https://doi.org/10.3390/math9111172.Suche in Google Scholar

105. Mukhopadhyay, S, Hossain, S, Ghosal, SK, Sarkar, R. Secured image steganography based on Catalan transform. Multimed Tool Appl 2021;80:14495–520. https://doi.org/10.1007/s11042-020-10424-4.Suche in Google Scholar

106. Kadhim, IJ, Premaratne, P, Vial, PJ, Halloran, B. Comprehensive survey of image steganography: techniques, evaluations, and trends in future research. Neurocomputing 2019;335:299–326. https://doi.org/10.1016/j.neucom.2018.06.075.Suche in Google Scholar

107. Rustad, S, Andono, PN, Shidik, GF, Setiadi, DRIM. Digital image steganography survey and investigation (goal, assessment, method, development, and dataset). Signal Process 2023;206:108908. https://doi.org/10.1016/j.sigpro.2022.108908.Suche in Google Scholar

108. Barry, P. A Catalan transform and related transformations on integer sequences. J Integer Seq 2005;8.Suche in Google Scholar

109. Allouche, JP, Johnson, T. Narayana’s cows and delayed morphisms. In: Journées d’Informatique Musicale. île de Tatihou, France; 1996. Available from: https://hal.science/hal-02986050.Suche in Google Scholar

110. Goy, T. On identities with multinomial coefficients for Fibonacci-Narayana sequence. Annales Mathematicae et Informaticae 2018;49:75–84. https://doi.org/10.33039/ami.2018.09.001.Suche in Google Scholar

111. Bravo, JJ, Das, P, Guzmán, S. Repdigits in narayana’s cows sequence and their consequences. J Integer Seq 2020;23:1–15. https://cs.uwaterloo.ca/journals/JIS/VOL23/Das/bravo17.pdf.Suche in Google Scholar

112. Ramírez, JL, Sirvent, VF. A note on the k-Narayana sequence. Annales Mathematicae et Informaticae 2015;45:91–105.Suche in Google Scholar

113. Sivaraman, R. Knowing Narayana cows sequence. Adv Math Sci J 2020;9:10219–24. https://doi.org/10.37418/amsj.9.12.14.Suche in Google Scholar

114. Lin, X. On the recurrence properties of Narayana’s cows sequence. Symmetry 2021;13:1–12. https://doi.org/10.3390/sym13010149.Suche in Google Scholar

115. Kirthi, K, Kak, S. The Narayana universal code. arXiv: Inf Theor 2016. https://doi.org/10.48550/arXiv.1601.07110.Suche in Google Scholar

116. Das, M, Sinha, S. A variant of the Narayana coding scheme. Control Cybern 2019;48:473–84.Suche in Google Scholar

117. Çelemoğlu. The third order variant Narayana codes and some straight lines corresponding to these. Düzce Üniversitesi Bilim ve Teknoloji Dergisi 2021;10:862–71. https://doi.org/10.29130/DUBITED.1007719.Suche in Google Scholar

118. Kirthi, K. Narayana sequences for cryptographic applications. ArXiv 2015. https://doi.org/10.48550/arXiv.1509.05745.Suche in Google Scholar

119. Shannon, CE. Communication theory of secrecy systems. Bell Syst Tech J 1949;28:656–715. https://doi.org/10.1002/j.1538-7305.1949.tb00928.x.Suche in Google Scholar

120. Shkel, YY, Poor, HV. A compression perspective on secrecy measures. IEEE J Sel Areas Inf Theor 2021;2:163–76. https://doi.org/10.1109/JSAIT.2021.3055692.Suche in Google Scholar

121. Ryabko, B. Reduction of the secret key length in the perfect cipher by data compression and randomisation; 2023. Available from: https://eprint.iacr.org/2023/1036.Suche in Google Scholar

122. Elias, P. Universal codeword sets and representations of the integers. IEEE Trans Inf Theor 1975;21:194–203. https://doi.org/10.1109/TIT.1975.1055349.Suche in Google Scholar

123. Capocelli, RM. Flag encodings related to the zeckendorf representation of integers. In: Sequences: combinatorics, compression, security, and transmission. Berlin, Germany: Springer; 1990:449–66 pp.10.1007/978-1-4612-3352-7_36Suche in Google Scholar

124. Apostolico, A, Fraenkel, AS. Robust transmission of unbounded using Fibonacci representations. IEEE Trans Inf Theor 1987;33:238–45. https://doi.org/10.1109/TIT.1987.1057284.Suche in Google Scholar

125. Zeckendorf, É. Representations des nombres naturels par une somme de nombres de fibonacci on de nombres de lucas. Bulletin de La Society Royale des Sciences de Liege; 1972:179–82 pp. Available from: https://cir.nii.ac.jp/crid/1570009749187075840.Suche in Google Scholar

126. Thomas, JH. Variations on the Fibonacci Universal Code. 2007. https://doi.org/10.48550/arXiv.cs/0701085.Suche in Google Scholar

127. Joux, A. Fully homomorphic encryption modulo Fermat numbers; 2019. Available from: https://eprint.iacr.org/2019/187.Suche in Google Scholar

128. Proth, F. Théoremes sur les nombres premiers. CR Acad Sci Paris 1878;87:926.Suche in Google Scholar

129. Brown, DRL. CM55: special prime-field elliptic curves almost optimizing den Boer’s reduction between Diffie-Hellman and discrete logs; 2014. Available from: https://eprint.iacr.org/2014/877.Suche in Google Scholar

130. Paludo, R, Sousa, L. Number theoretic transform architecture suitable to lattice-based fully-homomorphic encryption. In: 2021 IEEE 32nd international conference on application-specific systems, architectures and processors (ASAP). IEEE; 2021:163–70 pp.10.1109/ASAP52443.2021.00031Suche in Google Scholar

131. Elkamchouchi, H, Elshenawy, K, Shaban, H. Extended RSA cryptosystem and digital signature schemes in the domain of Gaussian integers. In: The 8th international conference on communication systems, 2002. ICCS 2002. IEEE; 2002, vol 1:91–5 pp. https://doi.org/10.1109/iccs.2002.1182444.Suche in Google Scholar

132. Hsia, CH, Lou, SJ, Chang, HH, Xuan, D. Novel hybrid public/private key cryptography based on perfect Gaussian integer sequences. IEEE Access 2021;9:145045–59. https://doi.org/10.1109/ACCESS.2021.3121252.Suche in Google Scholar

Received: 2024-10-07
Accepted: 2025-08-18
Published Online: 2026-03-12

© 2026 the author(s), published by De Gruyter, Berlin/Boston

This work is licensed under the Creative Commons Attribution 4.0 International License.

Heruntergeladen am 10.5.2026 von https://www.degruyterbrill.com/document/doi/10.1515/jmc-2024-0033/html?lang=de
Button zum nach oben scrollen