ige

package
v0.0.0-...-7028a79 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDataTooSmall     = errors.New("AES256IGE: data too small")
	ErrDataNotDivisible = errors.New("AES256IGE: data not divisible by block size")
)

Functions

func Decrypt

func Decrypt(msg, key, checkData []byte) ([]byte, error)

checkData это msgkey в понятиях мтпрото, нужно что бы проверить, успешно ли прошла расшифровка

func DecryptMessageWithTempKeys

func DecryptMessageWithTempKeys(msg []byte, nonceSecond, nonceServer *big.Int) []byte

DecryptMessageWithTempKeys дешифрует сообщение паролем, которые получены в процессе обмена ключами диффи хеллмана

func Encrypt

func Encrypt(msg, key []byte) ([]byte, error)

func EncryptMessageWithTempKeys

func EncryptMessageWithTempKeys(msg []byte, nonceSecond, nonceServer *big.Int) []byte

EncryptMessageWithTempKeys шифрует сообщение паролем, которые получены в процессе обмена ключами диффи хеллмана

func MessageKey

func MessageKey(msg []byte) []byte

Types

type AesBlock

type AesBlock [aes.BlockSize]byte

type AesIgeBlock

type AesIgeBlock [48]byte

type AesKV

type AesKV [32]byte

type Cipher

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

func NewCipher

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

NewCipher

Jump to

Keyboard shortcuts

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