cast5

package
v0.0.0-...-431bd5f Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2019 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package cast5 implements CAST5, as defined in RFC 2144.

CAST5 is a legacy cipher and its short block size makes it vulnerable to birthday bound attacks (see https://sweet32.info). It should only be used where compatibility with legacy systems, not security, is the goal.

Deprecated: any new system should use AES (from crypto/aes, if necessary in an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from github.com/bored-engineer/crypto/chacha20poly1305).

Index

Constants

View Source
const BlockSize = 8
View Source
const KeySize = 16

Variables

This section is empty.

Functions

This section is empty.

Types

type Cipher

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

func NewCipher

func NewCipher(key []byte) (c *Cipher, err error)

func (*Cipher) BlockSize

func (c *Cipher) BlockSize() int

func (*Cipher) Decrypt

func (c *Cipher) Decrypt(dst, src []byte)

func (*Cipher) Encrypt

func (c *Cipher) Encrypt(dst, src []byte)

Jump to

Keyboard shortcuts

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