fritzcrypt

package
v0.0.0-...-7c6a5d1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package fritzcrypt decrypts fritz secrets.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotCiphertext represents an error where the given ciphertext is not a ciphertext.
	ErrNotCiphertext = errors.New("password must start with $$$$")

	// ErrIVLength represents and error of the initial vector size.
	ErrIVLength = errors.New("crypt iv too short")

	// ErrDataLength represents an error with the encryption data.
	ErrDataLength = errors.New("crypt data too short")

	// ErrInvalidChecksum represents an error with the checksum, most likely a wrong password.
	ErrInvalidChecksum = errors.New("invalid checksum: wrong ciphertext, wrong key, or wrong algorithm")
)

Functions

This section is empty.

Types

type BaseDecodingError

type BaseDecodingError struct {
	Err error
}

BaseDecodingError represents a decoding error.

func (*BaseDecodingError) Error

func (e *BaseDecodingError) Error() string

Error returns the error message.

func (*BaseDecodingError) Unwrap

func (e *BaseDecodingError) Unwrap() error

Unwrap unwraps wrapped errors.

type CBCAlgo

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

CBCAlgo decrypts fritz secrets using CBC, Base32, and MD5.

Seems to be used for: - FRITZ!Box 7530 & FRITZ!OS 7.57.

func New

func New(userPassphrase, masterCipher []byte) (*CBCAlgo, error)

New returns a new decrypting algorithm for the given user passphrase and master cipher.

func NewCBCAlgo

func NewCBCAlgo(key []byte) *CBCAlgo

NewCBCAlgo returns a new CBC algorithm.

func (*CBCAlgo) Decrypt

func (a *CBCAlgo) Decrypt(ciphertext []byte) ([]byte, error)

Decrypt decrypts the given ciphertext.

type CipherError

type CipherError struct {
	Call string
	Err  error
}

CipherError represents a cipher error.

func (*CipherError) Error

func (e *CipherError) Error() string

func (*CipherError) Unwrap

func (e *CipherError) Unwrap() error

Unwrap unwraps wrapped errors.

type DecodeSizeError

type DecodeSizeError struct {
	Err error
}

DecodeSizeError represents a decoding error.

func (*DecodeSizeError) Error

func (e *DecodeSizeError) Error() string

Error returns the error message.

func (*DecodeSizeError) Unwrap

func (e *DecodeSizeError) Unwrap() error

Unwrap unwraps wrapped errors.

Jump to

Keyboard shortcuts

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