util

package
v0.0.0-...-9742f5a Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncryptChunk

func EncryptChunk(chunkIdx uint64, reqSeqNo uint64, sessionKey, in []byte) ([]byte, error)

Also decrypts chunk, since we're using AES in the CTR mode.

func EncryptCipherBlock

func EncryptCipherBlock(plaintext []byte, key []byte, iv []byte, counter uint32) ([]byte, error)

EncryptCipherBlock encrypts a single plaintext block using AES in the CTR mode. Unusually, it lets the caller specify the counter's value; the counter is added to the IV.

func KeyedPRF

func KeyedPRF(prfInput []byte, requestSeqNo uint32, key []byte) ([]byte, error)

XXX: Document me!

func Uint32ToLE

func Uint32ToLE(x uint32) []byte

func Uint64ToLE

func Uint64ToLE(x uint64) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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