Skip to content

Сalculation of cryptographic characteristics for a cipher based on a generalized feistel network

Notifications You must be signed in to change notification settings

jmpleo/netcip-crypt-char

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1e48684 · Mar 28, 2025
Jun 26, 2023
Mar 28, 2025
Oct 26, 2024
Oct 24, 2024
Nov 21, 2024

Repository files navigation

Calculation of cryptographic characteristics for a cipher based on a generalized Feistel network

Cipher Specification

F : Z 2 n × Z 2 n Z 2 n - bijective in the second variable function. ω i Z 2 n   ( Z 2 n ) - words.

Round transformition R F [ l , s ] : Z 2 m n Z 2 m n :

R F [ l , s ] ( ω 1 , . . . , ω m ) = ( ω 1 , . . . , ω s 1 , F ( ω l , ω s ) , ω s + 1 , . . . , ω m )

round

The composition R F [ l 1 , s 1 ] R F [ l 2 , s 2 ] . . . R F [ l h , s h ] implements substitution on the n m -bit block: Φ N F : Z 2 n m Z 2 n m

Subtitution parameters: n , m , h , where h - number of rounds (or height). Network (sequence of pairs ( l , s )) - also public parameter. The secret parameter is F (tipical size n - byte, so n = 8 ).

Example Network for 7 Rounds: m = 4 ,   h = 7 , and network N = ( 1 , 2 ) , ( 2 , 4 ) , ( 4 , 3 ) , ( 3 , 1 ) , ( 1 , 2 ) , ( 2 , 1 ) , ( 1 , 4 )

example

Experiment

  1. This work considers networks only ( s 0 , s 1 ) , ( s 1 , s 2 ) , . . . , ( s i   m o d ( m ) , s i + 1   m o d ( m ) ) , . . . = ( 1 , 2 ) , ( 2 , 3 ) , ( 3 , 4 ) , . . .
  2. An equally probable choice of F with the return from the set of all matrices whose rows are permutations (the cardinality of such a set is ( 2 n ! ) 2 n 2 n 2 2 n ).
  3. Calculate MDP, AI, NL.

Build

cd ~
git clone https://github.com/jmpleo/netcip-crypt-char.git
cd ~/netcip-crypt-char

Research Build

  1. You need cmake to build this porject.

    cd ~/netcip-crypt-char/netcip-research

    and run

    ./build.sh <N> <M> <H>

    or

    cmake . -D__N=<N> -D__M=<M> -D__H=<H>
    cmake --build build
  2. Build range configuration

    Linux:

    ./brut-build.sh
  3. Run Computing

    For example, NL-computing:

    cd ~/netcip-crypt-char/netcip-research/stat
    ../bin/netcip-nl-<N>-<M>-<H>
    # saving in ./netstat-nl-<N>-<M>-<H>.csv

Application Build

crypto++ required:

sudo apt install libcrypto++-dev
cd ~/netcip-crypt-char/netcip-application
cmake -B build
cd build
make

after this tests and speedtest binaries created - run it:

~/netcip-crypt-char/netcip-application/bin/netcip-test
~/netcip-crypt-char/netcip-application/bin/netcip-speedtest

Speedtest:

  • Linux debian 6.1.0-23-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15) x86_64 GNU/Linux
  • Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
  • crypto++ 8
8  bytes                       | Enc Blocks/min  | Dec Blocks/min  | Enc-Dec Blocks/min
--------------------------------------------------------------------------------
Blowfish                       | 818.841         | 825.038         | 416.373        
CAST-128                       | 741.3           | 745.784         | 362.473        
DES                            | 498.625         | 499.465         | 248.119        
DES-EDE3                       | 184.71          | 184.881         | 92.1633        
GOST                           | 438.543         | 446.962         | 219.253        
RC2                            | 358.133         | 735.364         | 243.359        
RC5                            | 1482.22         | 1794.94         | 856.433        
netcip1_8x8                    | 1495.05         | 1370.41         | 827.033        
netcip2_8x8                    | 1721.72         | 777.488         | 451.4          

16 bytes                       | Enc Blocks/min  | Dec Blocks/min  | Enc-Dec Blocks/min
--------------------------------------------------------------------------------
AES                            | 2554.44         | 2711.69         | 1268.38        
CAST-256                       | 337.406         | 337.879         | 169.483        
Camellia                       | 451.797         | 457.897         | 224.39         
MARS                           | 454.278         | 437.827         | 224.196        
RC6                            | 644.934         | 622.436         | 324.915        
Serpent                        | 267.742         | 293.042         | 138.751        
netcip1_8x16                   | 845.018         | 786.203         | 492.607        
netcip2_8x16                   | 937.803         | 403.071         | 231.096        

crypto++: 870

Founded

Cherednik, I. V. On the use of binary operations for the construction of a multiply transitive class of block transformations / I. V. Cherednik // Discrete Mathematics and Applications. 2021. 31: 2. P. 91–111.) (Scopus, WoS) // https://www.mathnet.ru/rus/dm1597

About

Сalculation of cryptographic characteristics for a cipher based on a generalized feistel network

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published