feistel

package
v0.0.0-...-a11dea8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cipher

type Cipher[T Unsigned] struct {
	// contains filtered or unexported fields
}

Network, Cipher

func NewCipher

func NewCipher[T Unsigned](ks []T, rf RoundFunc[T]) *Cipher[T]

func (*Cipher[T]) Decrypt

func (p *Cipher[T]) Decrypt(b *RoundBlock[T])

func (*Cipher[T]) Encrypt

func (p *Cipher[T]) Encrypt(b *RoundBlock[T])

type RoundBlock

type RoundBlock[T Unsigned] struct {
	L, R T
}

func (*RoundBlock[T]) Swap

func (p *RoundBlock[T]) Swap()

type RoundFunc

type RoundFunc[T Unsigned] func(k, r T) T

type Unsigned

type Unsigned = constraints.Unsigned

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL