Bent Functions



Hi

I came across the following lines in a crypto paper and I am wondering
if anyone could tell me in some simple words what is meant hereby:

"The bent function chosen is the function:
b(x) = x0x1 + x2x3 + x4x5 + x6x7 + x8x9 +x10x11 + x11x12
This function has nonlinarity 8128."

Can somebody tell me where the number 8128 is coming from and what
to do with this number?

The text continues as follows:

"To increase the resiliency, 5 linear terms are added to the function. This will result in a balanced
function with resiliency 4 and nonlinearity 2^5 * 8128 = 260096"

What is meant here with a "blanced function with resiliency 4"

Many thanks!
.