HOME

TheInfoList



OR:

Py is a
stream cipher stream cipher is a symmetric key cipher where plaintext digits are combined with a pseudorandom cipher digit stream ( keystream). In a stream cipher, each plaintext digit is encrypted one at a time with the corresponding digit of the keystream ...
submitted to
eSTREAM eSTREAM is a project to "identify new stream ciphers suitable for widespread adoption", organised by the EU ECRYPT network. It was set up as a result of the failure of all six stream ciphers submitted to the NESSIE project. The call for primi ...
by
Eli Biham Eli Biham ( he, אלי ביהם) is an Israeli cryptographer and cryptanalyst, currently a professor at the Technion - Israel Institute of Technology Computer Science department. Starting from October 2008 and till 2013, Biham was the dean of ...
and
Jennifer Seberry Jennifer Roma Seberry (also published as Jennifer Seberry Wallis, born 13 February 1944 in Sydney) is an Australian cryptographer, mathematician, and computer scientist, currently a professor at the University of Wollongong, Australia. She was f ...
. It is one of the fastest eSTREAM candidates at around 2.6 cycles per byte on some platforms. It has a structure a little like
RC4 In cryptography, RC4 (Rivest Cipher 4, also known as ARC4 or ARCFOUR, meaning Alleged RC4, see below) is a stream cipher. While it is remarkable for its simplicity and speed in software, multiple vulnerabilities have been discovered in RC4, ren ...
, but adds an array of 260 32-bit words which are indexed using a permutation of bytes, and produces 64 bits in each round. The authors assert that the name be pronounced "Roo", a reference to the cipher's Australian origin, by reading the letters "Py" as Cyrillic (Ру) rather than Latin characters. This somewhat perverse pronunciation is understood to be their answer, in jest, to the difficult-to-pronounce name ''Rijndael'' for the cipher which was adopted as the
Advanced Encryption Standard The Advanced Encryption Standard (AES), also known by its original name Rijndael (), is a specification for the encryption of electronic data established by the U.S. National Institute of Standards and Technology (NIST) in 2001. AES is a variant ...
. * The original April 2005 proposal included the cipher Py, and a simplified version Py6. The latter reduces the size of some internal tables, providing greatly reduced key scheduling cost, at the expense of a shorter maximum output length. * In June 2006, the authors described Pypy (even more confusingly, ''half''-Cyrillic Pyру and thus pronounced "Pyroo") as an optional stronger variant. This omits one of the output words from each iteration of Py, and thus operates at slightly over half the speed of Py. (Actually about 0.6×.) * In January 2007, the key schedule algorithm was changed, producing "tweaked" variants TPy, TPypy and TPy6. To be precise, the first (key-dependent) phase is unmodified, but the second (IV setup) phase has an error corrected. The round functions used to produce output are identical. * A
Indocrypt 2007
Gautham Sekar, Souradyuti Paul and
Bart Preneel Bart Preneel (born 15 October 1963 in Leuven, Belgium) is a Flemish cryptographer and cryptanalyst. He is a professor at Katholieke Universiteit Leuven, in the COSIC group. He was the president of the International Association for Cryptologic ...
proposed two new ciphers RCR-32 and RCR-64 based on the design principles of Pypy and Py, respectively. These replace a variable rotate in Py with a fixed rotate, eliminating an attack and speeding up the cipher slightly. The TPy key schedule is used unmodified.


Attacks on the Py-family

, the best cryptanalytic attack on Py (by
Hongjun Wu Hongjun Laozu () Literal translation, lit. "Ancestor of the Great Balance" is a deity in Chinese folk religion and Taoism, teacher of the Three Pure Ones in Taoist mythology. ''Hongjun'' is a Variant Chinese character, graphic variant of ''hung ...
and
Bart Preneel Bart Preneel (born 15 October 1963 in Leuven, Belgium) is a Flemish cryptographer and cryptanalyst. He is a professor at Katholieke Universiteit Leuven, in the COSIC group. He was the president of the International Association for Cryptologic ...
) can under some circumstances (e.g. where the IV is much longer than the key) recover the key given partial
keystream In cryptography, a keystream is a stream of random or pseudorandom characters that are combined with a plaintext message to produce an encrypted message (the ciphertext). The "characters" in the keystream can be bits, bytes, numbers or actual char ...
s for 224 chosen IV

In a more difficult scenario from the point of view of attacker, given only known plaintext (rather than chosen plaintext), there is also a
distinguishing attack In cryptography, a distinguishing attack is any form of cryptanalysis on data encrypted by a cipher that allows an attacker to distinguish the encrypted data from random data. Modern symmetric-key ciphers are specifically designed to be immune to ...
on the keystream (by Paul Crowley) which requires around 272 bytes of output and comparable time. This is an improvement on an attack presented by Gautham Sekar, Souradyuti Paul and
Bart Preneel Bart Preneel (born 15 October 1963 in Leuven, Belgium) is a Flemish cryptographer and cryptanalyst. He is a professor at Katholieke Universiteit Leuven, in the COSIC group. He was the president of the International Association for Cryptologic ...
which requires 288 bytes. There is a still a debate whether these attacks constitute an academic break of Py. When the attackers claim that the above attacks can be built with workload less than the exhaustive search under the design specifications of Py and therefore, it is clearly a theoretical break of the cipher, the designers rule out the attacks because Py's security bounds limit any attacker to a total of 264 bytes of output across all keystreams everywhere. A recent revision of the
Paul Paul may refer to: *Paul (given name), a given name (includes a list of people with that name) * Paul (surname), a list of people People Christianity * Paul the Apostle (AD c.5–c.64/65), also known as Saul of Tarsus or Saint Paul, early Chr ...
, Preneel, and Sekar paper includes a detailed discussion of this issue in section 9. There are no doubts about the legitimacy of the Wu and Preneel attack. Py was selected as Phase 2 Focus Candidate for Profile 1 (software) by the
eSTREAM eSTREAM is a project to "identify new stream ciphers suitable for widespread adoption", organised by the EU ECRYPT network. It was set up as a result of the failure of all six stream ciphers submitted to the NESSIE project. The call for primi ...
projec

but did not advance to Phase 3 due to the Wu and Preneel chosen IV attack

In January 2007, three new ciphers namely TPy, TPypy and TPy6 have been proposed by the designers of Py to eliminate the above attacks. The TPy is still vulnerable against the above distinguishing attacks by
Paul Paul may refer to: *Paul (given name), a given name (includes a list of people with that name) * Paul (surname), a list of people People Christianity * Paul the Apostle (AD c.5–c.64/65), also known as Saul of Tarsus or Saint Paul, early Chr ...
et al. (complexity 288) and Crowley (complexity 272), which do not depend on the key schedule. The best attack so far on the TPypy, which is conjectured to be the strongest of the Py-family of ciphers, is by Sekar et al. which is a distinguishing attack with data complexity 2281. This attack is only meaningful if the key-size of TPypy is longer than 281 bits. To remove attacks on TPy and TPypy, Gautham Sekar, Sekar,
Paul Paul may refer to: *Paul (given name), a given name (includes a list of people with that name) * Paul (surname), a list of people People Christianity * Paul the Apostle (AD c.5–c.64/65), also known as Saul of Tarsus or Saint Paul, early Chr ...
and Preneel a
Indocrypt 2007
gave proposals for two new ciphers RCR-32 and RCR-64. So far there are no attacks against the RCR-32 and RCR-64.


Round functions

Py is based on the idea of "sliding arrays": arrays are indexed relative to a start pointer, which is advanced by one word each round. Where modulo indexing is available (hardware, and many digital signal processors), these can be implemented as
circular buffer In computer science, a circular buffer, circular queue, cyclic buffer or ring buffer is a data structure that uses a single, fixed-size buffer as if it were connected end-to-end. This structure lends itself easily to buffering data streams. Ther ...
s. In software, these are most easily implemented as large arrays. When the end of the array is reached, the working portions are copied back to the beginning and operations continue. The 256-byte P array contains a 256-entry permutation (each byte appears exactly once), while the Y array contains 260 32-bit words. #include #define ROTL32(x, s) ((x)<<(s) , (x)>>(32-(s))) uint8_t *P; // P through P 55are active uint32_t *Y; // Y 3through Y 56are active uint32_t s; uint32_t *output; while (output_words--) When byte output is required, Py specifies that the output words are converted little-endian. Line 17 is omitted from Pypy, Tpypy, and RCR-32. RCR-32 and RCR-64 are identical to the above, except that line 15 is changed to a fixed left-rotate of 19 bits. Py6 has the same structure, but the P and Y arrays are shortened to 64 bytes and 68 words, respectively. P entries are only 6 bits long, a savings that could be exploited in dedicated hardware. The various offsets into P[] and Y[] are, of course, modified, making the inner loop: while (output_words--)


External links

*
Eli Biham Eli Biham ( he, אלי ביהם) is an Israeli cryptographer and cryptanalyst, currently a professor at the Technion - Israel Institute of Technology Computer Science department. Starting from October 2008 and till 2013, Biham was the dean of ...
,
Jennifer Seberry Jennifer Roma Seberry (also published as Jennifer Seberry Wallis, born 13 February 1944 in Sydney) is an Australian cryptographer, mathematician, and computer scientist, currently a professor at the University of Wollongong, Australia. She was f ...

Py specification
(
PostScript PostScript (PS) is a page description language in the electronic publishing and desktop publishing realm. It is a dynamically typed, concatenative programming language. It was created at Adobe Systems by John Warnock, Charles Geschke, ...
) *
Eli Biham Eli Biham ( he, אלי ביהם) is an Israeli cryptographer and cryptanalyst, currently a professor at the Technion - Israel Institute of Technology Computer Science department. Starting from October 2008 and till 2013, Biham was the dean of ...
,
Jennifer Seberry Jennifer Roma Seberry (also published as Jennifer Seberry Wallis, born 13 February 1944 in Sydney) is an Australian cryptographer, mathematician, and computer scientist, currently a professor at the University of Wollongong, Australia. She was f ...

Tweaking the IV Setup of the Py Family of Stream Ciphers -- The Ciphers TPy, TPypy, and TPy6


* Paul Crowleybr>Cryptanalysis of Py
* Souradyuti Paul,
Bart Preneel Bart Preneel (born 15 October 1963 in Leuven, Belgium) is a Flemish cryptographer and cryptanalyst. He is a professor at Katholieke Universiteit Leuven, in the COSIC group. He was the president of the International Association for Cryptologic ...
, Gautham Sekar
Distinguishing attacks on the stream cipher Py
FSE 2006. * Gautham Sekar, Souradyuti Paul,
Bart Preneel Bart Preneel (born 15 October 1963 in Leuven, Belgium) is a Flemish cryptographer and cryptanalyst. He is a professor at Katholieke Universiteit Leuven, in the COSIC group. He was the president of the International Association for Cryptologic ...

Weaknesses in the Pseudorandom Bit Generation Algorithms of the Stream Ciphers TPypy and TPy
IACR-ePrint report. * Souradyuti Paul,
Bart Preneel Bart Preneel (born 15 October 1963 in Leuven, Belgium) is a Flemish cryptographer and cryptanalyst. He is a professor at Katholieke Universiteit Leuven, in the COSIC group. He was the president of the International Association for Cryptologic ...

On the (In)security of Stream Ciphers Based on Arrays and Modular Addition (Full Version)
Asicrypt 2006. * Gautham Sekar, Souradyuti Paul,
Bart Preneel Bart Preneel (born 15 October 1963 in Leuven, Belgium) is a Flemish cryptographer and cryptanalyst. He is a professor at Katholieke Universiteit Leuven, in the COSIC group. He was the president of the International Association for Cryptologic ...

Related-key Attacks on the Py-family of Ciphers and an Approach to Repair the Weaknesses
Indocrypt 2007.
The Rijndael page
- the "Rijndael FAQ" is gently parodied in Appendix B of the Py specification. {{Cryptography navbox , stream Stream ciphers