lib

package
v0.0.0-...-3375ad2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2016 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const BlockSize = 1024 //1KB for testing; 1MB for production
View Source
const HashSize = 32

sizes in bytes

View Source
const MaxRounds = 10
View Source
const SecretSize = 256 / 8

const BlockSize = 160

View Source
const ServerPort = 8000

Variables

This section is empty.

Functions

func AllZero

func AllZero(xs []byte) bool

func ComputeResponse

func ComputeResponse(allBlocks []Block, mask []byte, secret []byte) []byte

func Encrypt

func Encrypt(g abstract.Group, msg []byte, pks []abstract.Point) ([]abstract.Point, []abstract.Point)

func EncryptKey

func EncryptKey(g abstract.Group, msgPt abstract.Point, pks []abstract.Point) (abstract.Point, abstract.Point)

func EncryptPoint

func EncryptPoint(g abstract.Group, msgPt abstract.Point, pk abstract.Point) (abstract.Point, abstract.Point)

func GeneratePI

func GeneratePI(size int) []int

func MarshalPoint

func MarshalPoint(pt abstract.Point) []byte

func Membership

func Membership(res []byte, set [][]byte) int

func NewDesc

func NewDesc(path string) (map[string]int64, error)

func ParseServerList

func ParseServerList(path string) []string

func ReverseMap

func ReverseMap(m map[int]int) map[int][]int

func SetBit

func SetBit(n_int int, b bool, bs []byte)

func SliceEquals

func SliceEquals(X, Y []byte) bool

func TimeTrack

func TimeTrack(start time.Time, name string)

func UnmarshalPoint

func UnmarshalPoint(suite abstract.Suite, ptByte []byte) abstract.Point

func Wait

func Wait()

func Xor

func Xor(a, dst []byte)

func XorWords

func XorWords(dst, a, b []byte)

func Xors

func Xors(as [][]byte) []byte

make sure dst is all 0's when you call this

func XorsDC

func XorsDC(bsss [][][]byte) [][]byte

Types

type AuxKeyProof

type AuxKeyProof struct {
	OrigXss [][][]byte
	OrigYss [][][]byte
	SId     int
}

type Block

type Block struct {
	Block []byte
	Round uint64

	Id int //id is only attached in the first submit
}

NOTE: could be encrypted version of the block

type ClientBlock

type ClientBlock struct {
	CId   int //client id for the block
	SId   int //sending server's id
	Block Block
}

type ClientDH

type ClientDH struct {
	Public []byte
	Id     int
}

type ClientMask

type ClientMask struct {
	Mask  []byte
	Id    int
	Round uint64
}

type ClientRegistration

type ClientRegistration struct {
	ServerId int //the dedicated server
	Id       int
}

type File

type File struct {
	Name   string
	Hashes map[string]int64 //maps hash to offset
}

func NewFile

func NewFile(suite abstract.Suite, path string) (*File, error)

type InternalKey

type InternalKey struct {
	Xss [][][]byte
	Yss [][][]byte
	SId int

	Ybarss [][][]byte
	Proofs [][]byte
	Keys   [][]byte
}

type InternalUpload

type InternalUpload struct {
	Blocks []Block
	SId    int
}

type Request

type Request struct {
	Hash  []byte
	Round uint64

	Id int
}

type RequestArg

type RequestArg struct {
	Id    int
	Round uint64
}

type UpKey

type UpKey struct {
	C1s [][]byte
	C2s [][]byte
	Id  int
}

Jump to

Keyboard shortcuts

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