boolfun-package {boolfun}R Documentation

Cryptographic Boolean Functions

Description

This package can be used to assess cryptographic properties of Boolean functions such as nonlinearity, algebraic immunity, resiliency, etc... It also implements functionality to handle Boolean polynomials, namely multiplication and addition of multivariate polynomials with coefficients and exponents in {0,1}.

Details

Package: boolfun
Version: 0.2.6
Date: 2009
Depends: R (>= 2.3.0), R.oo
Suggests: RUnit
License: GPL (>= 3)
Built: R 2.9.1; i686-pc-linux-gnu; 2009-12-10 13:57:37 UTC; unix

Index:

                        Mobius Inversion
                        Fast Walsh Hadamard Transform
boolfun-package         Cryptographic Boolean Functions

Further information is available in the following vignettes:
boolfun Cryptographic Properties of Boolean functions (source, pdf)
polynomial Handling Boolean Polynomials with the boolfun Package (source, pdf)

See the examples below for an overview of how to use the package.

Author(s)

F.Lafitte

Maintainer: Frederic Lafitte <frederic.lafitte@rma.ac.be>

See Also

BooleanFunction, Polynomial, Assignment, R.oo

Examples


    # Functions are defined by their truth tables (string or integer vector).
    f <- BooleanFunction( "00100111" )
    g <- BooleanFunction(c(0,1,1,0,1,0,0,1))
    h <- BooleanFunction( c(tt(f), tt(g)) ) # concatenation

    # You can print information on the function as follows.
    print ( h )     # Prints "Boolean function with 4 variables.".
    print ( tt(h) ) # Prints the truth table.

    # Note that the methods can be called 'object$method()' or 'method(object)': 
    print(paste(  "f has (deg,ai,nl,res) = (", f$deg(),f$ai(),f$nl(),f$res(),")"  ))
    print(paste(  "h has (deg,ai,nl,res) = (", deg(h), ai(h), nl(h), res(h), ")"  ))

    # Random Boolean functions   
    randomBFs <- c()
    data <- c( "degree", "algebraic immunity", "nonlinearity", "resiliency" )
    for( i in 1:500 ) {
        randomTT <- round(runif(2^5, 0,1))
        randomBF <- BooleanFunction(randomTT)
        data <- rbind( data, c(
                deg(randomBF), ai(randomBF),
                nl(randomBF), res(randomBF)))
    }
    print(data)

[Package boolfun version 0.2.6 Index]