Documentation ¶
Index ¶
- Constants
- Variables
- func EXP(x uint8) uint8
- func IPHT(x *uint8, y *uint8)
- func LOG(x uint8) uint8
- func NewCipher(key []byte, rounds int32) (cipher.Block, error)
- func NewKCipher(key []byte, rounds int32) (cipher.Block, error)
- func NewSKCipher(key []byte, rounds int32) (cipher.Block, error)
- func PHT(x *uint8, y *uint8)
- func ROL8(x, n uint8) uint8
- func Safer_Expand_Userkey(userkey_1 []uint8, userkey_2 []uint8, nof_rounds uint32, strengthened int32, ...)
- type KeySizeError
Constants ¶
View Source
const ( SAFER_K64_DEFAULT_NOF_ROUNDS = 6 SAFER_K128_DEFAULT_NOF_ROUNDS = 10 SAFER_SK64_DEFAULT_NOF_ROUNDS = 8 SAFER_SK128_DEFAULT_NOF_ROUNDS = 10 SAFER_MAX_NOF_ROUNDS = 13 SAFER_BLOCK_LEN = 8 )
View Source
const BlockSize = 8
Variables ¶
View Source
var SAFER_KEY_LEN = (1 + SAFER_BLOCK_LEN*(1+2*SAFER_MAX_NOF_ROUNDS))
Functions ¶
func NewKCipher ¶
NewKCipher creates and returns a new cipher.Block.
func NewSKCipher ¶
NewSKCipher creates and returns a new cipher.Block.
Types ¶
type KeySizeError ¶
type KeySizeError int
func (KeySizeError) Error ¶
func (k KeySizeError) Error() string
Click to show internal directories.
Click to hide internal directories.