speck

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Unlicense Imports: 3 Imported by: 0

README

SPECK

An implementation of some variants of the SPECK block cipher written in Go.

Supported Variants

Block size Key size
64 128
128 128
128 256

I have decided to not ever implement 96 bit and 192 bit keys as they are pointless in my opinion, and I've never seen anyone use a 192 bit key and I feel wrong using 96 bit keys.

References

Notes

I wouldn't recommend using SPECK unless you really have to. If you need a block cipher I recommend AES-256 (see: cipher/aes).

I also don't know the security of this library, so you should only use it at your own risk.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Speck64 added in v1.1.0

type Speck64 struct {
	// contains filtered or unexported fields
}

64 bit blocks

func New64 added in v1.1.0

func New64(key []byte) (*Speck64, error)

func (Speck64) BlockSize added in v1.1.0

func (s Speck64) BlockSize() int

func (*Speck64) Decrypt added in v1.1.0

func (s *Speck64) Decrypt(dst, src []byte)

func (*Speck64) Encrypt added in v1.1.0

func (s *Speck64) Encrypt(dst, src []byte)

type Speck128

type Speck128 struct {
	// contains filtered or unexported fields
}

128 bit blocks

func New128

func New128(key []byte) (*Speck128, error)

func (Speck128) BlockSize

func (s Speck128) BlockSize() int

func (*Speck128) Decrypt

func (s *Speck128) Decrypt(dst, src []byte)

func (*Speck128) Encrypt

func (s *Speck128) Encrypt(dst, src []byte)

Jump to

Keyboard shortcuts

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