• Stars
    star
    601
  • Rank 72,320 (Top 2 %)
  • Language
    Go
  • License
    Other
  • Created over 9 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Advanced crypto library for the Go language

Go test Coverage Status Quality Gate Status Go Reference

DEDIS Advanced Crypto Library for Go

This package provides a toolbox of advanced cryptographic primitives for Go, targeting applications like Cothority that need more than straightforward signing and encryption. Please see the Godoc documentation for this package for details on the library's purpose and API functionality.

This package includes a mix of variable time and constant time implementations. If your application is sensitive to timing-based attacks and you need to constrain Kyber to offering only constant time implementations, you should use the suites.RequireConstantTime() function in the init() function of your main package.

Versioning - Development

We use the following versioning model:

  • crypto.v0 was the first semi-stable version. See migration notes.
  • kyber.v1 never existed, in order to keep kyber, onet and cothorithy versions linked
  • gopkg.in/dedis/kyber.v2 was the last stable version
  • Starting with v3.0.0, kyber is a Go module, and we respect semantic versioning.

So if you depend on the master branch, you can expect breakages from time to time. If you need something that doesn't change in a backward-compatible way you should use have a go.mod file in the directory where your main package is.

Using the module

Kyber supports Go modules, and currently has a major version of 3, which means that the import path is: go.dedis.ch/kyber/v3.

Here is a basic example of getting started using it:

  1. Make a new directory called β€œex". Change directory to β€œex" and put this in main.go:
package main

import (
    "fmt"
    "go.dedis.ch/kyber/v3/suites"
)

func main() {
    s := suites.MustFind("Ed25519")
    x := s.Scalar().Zero()
    fmt.Println(x)
}
  1. Type β€œgo mod init example.com/ex”. The resulting go.mod file will have no dependencies listed yet.
  2. Type β€œgo build”. The go tool will fill in the new dependencies that it find for you, i.e. "require go.dedis.ch/kyber/v3 v3.0.13”.
  3. Running ./ex will print 0000000000000000000000000000000000000000000000000000000000000000.

A note on deriving shared secrets

Traditionally, ECDH (Elliptic curve Diffie-Hellman) derives the shared secret from the x point only. In this framework, you can either manually retrieve the value or use the MarshalBinary method to take the combined (x, y) value as the shared secret. We recommend the latter process for new softare/protocols using this framework as it is cleaner and generalizes across different types of groups (e.g., both integer and elliptic curves), although it will likely be incompatible with other implementations of ECDH. See the Wikipedia page on ECDH.

Reporting security problems

This library is offered as-is, and without a guarantee. It will need an independent security review before it should be considered ready for use in security-critical applications. If you integrate Kyber into your application it is YOUR RESPONSIBILITY to arrange for that audit.

If you notice a possible security problem, please report it to [email protected].

More Repositories

1

cothority

Scalable collective authority
Go
418
star
2

Dissent

Provably Anonymous Overlay
C++
320
star
3

protobuf

Reflection-based Protocol Buffers for Go
Go
76
star
4

prifi

PriFi, a low-latency, local-area anonymous communication network.
Go
47
star
5

onet

Overlay Network for distributed protocols
Go
45
star
6

Determinator

Experimental operating system for deterministic parallel computing
C
36
star
7

popstellar

Proof-of-personhood System
Kotlin
35
star
8

student_18_byzcoin

Omniledger implementation
Go
34
star
9

quepaxa

This is the code repository for QuePaxa project (formerly Raxos or QSCOD)
Go
31
star
10

purb

Implementation and simulations for the "Reducing Metadata Leakage from Encrypted Data and Communication with PURBs" paper
Go
28
star
11

tlc

Threshold Logical Clocks and Que Sera Consensus
Go
26
star
12

paper_chainiac

Implementation and simulations for "CHAINIAC: Proactive Software-Update Transparency via Collectively Signed Skipchains and Verified Builds" paper appearing at Usenix Security'17.
Go
23
star
13

cosi

CoSi command line interface
21
star
14

doc

Public working documents (e.g., Internet drafts)
Makefile
19
star
15

columbus-united

πŸ“¦βžΏπŸ“¦βžΏπŸ“¦ Intuitive and insightful blockchain explorer πŸ”Ž
TypeScript
19
star
16

d-voting

πŸ“§ E-Voting platform based on the Dela blockchain
Go
18
star
17

paper_17_randomness

Randhound and Randherd implementation for IEEE SnP '17 paper
Go
16
star
18

dela

DEDIS Ledger Architecture
Go
16
star
19

prifi_archive

Work-in-progress Dissent port/rewrite for low-latency anonymous communication
Go
11
star
20

student_17_bftcosi

Consensus omniledger-like
Go
11
star
21

lago

Lattice Cryptography Library in Golang
Go
10
star
22

Coding

Scripts for coding and best practices
Shell
8
star
23

matchertext

Work-in-progress paper and experimental code on matchertext embeddable syntax discipline
Go
8
star
24

epfl-evoting

Evoting at EPFL project
Vue
8
star
25

cothority_template

Implement new cothority protocols, services and (client) applications.
Go
8
star
26

student_19_cruxIPFS

Go
6
star
27

paxos-and-raft

Paxos and Raft implementation in Go-Lang
Go
5
star
28

student_19_libp2p_tlc

TLC implemented on top of libp2p
Go
5
star
29

filesharing

Simple demo of file sharing using calypso and Long-Term Secrets
Go
5
star
30

apir-code

Go
5
star
31

paper_17_dfinity

DKG with pairing based crypto code
Go
5
star
32

personhood.online

The new personhood app
TypeScript
4
star
33

student_22_ipfs_alpha_entanglement_code

Alpha entanglement codes on IPFS and IPFS Cluster
Go
4
star
34

simnet

SimNet is a tool to simulate decentralized applications in the cloud
Go
4
star
35

student_17_byzcoin

Comparison of different blockchains
Go
3
star
36

fixbuf

Fixed length binary encoding of arbitrary structures in Go
Go
3
star
37

columbus-cli

Naive implementation of a Blockchain explorer
TypeScript
3
star
38

calypso_zkp

Example smart contract which verifies a NIZKP
C
3
star
39

student_18_explorer

A Skipchain explorer
Vue
3
star
40

student_17_evoting

Neff-shuffles for e-voting
Go
2
star
41

medchain

Blockchain-based access control system for medical data.
Go
2
star
42

student_18_hugo_verex

Verified execution - OmniContract
Go
2
star
43

pulsar

Demo of the randhound-randomness
Go
2
star
44

calypso_ots

Calypso's One Time Secret implementation
Go
2
star
45

hbt

Kotlin
2
star
46

quepaxa-ePaxos-open-loop

A fork of EPaxos code with an open loop client implementation
Go
2
star
47

student_17_collections

First shot at collections from Matteo
Go
2
star
48

student_20_byzcoin

Semester project : improve Byzcoin
Go
2
star
49

student_18_car

use calypso and byzcoin to store car parts on the blockchain
Go
2
star
50

aries-mediator

A DIDcomm mediator for use between Aries agents
C#
1
star
51

student_22_dissecting_ipfs_swarm

Dissecting IPFS and Swarm to demystify distributed decentralized storage networks
Jupyter Notebook
1
star
52

blockchain_demo

Little demo for high-school students working on blockchains
JavaScript
1
star
53

go-presentation

HTML
1
star
54

student_19_nyleCtrlPlane

Jupyter Notebook
1
star
55

cothority-ui

Go
1
star
56

student_14_WiNoN

Python
1
star
57

determ-checker

A static checker for non-determinism in source files
Go
1
star
58

key-mgmt

Work in progress: key-directory cothority
Go
1
star
59

student_19_tlc

Spring 2019 - Threshold Logical Clocks (TLC) prototype
Go
1
star
60

tufsim

Tuf simulation with Skipchains
Ruby
1
star
61

student_18_decenar

Go
1
star
62

popcoins

A first app to create popcoins
JavaScript
1
star
63

notion-backup

A small utility to perform automatic and encrypted backups of Notion blocks.
Go
1
star
64

student_18_pairingcosi

A cosi implementation using pairing-based cryptography
Go
1
star
65

student_18_evoting

Gaurav Narula's project report
TeX
1
star
66

student_19_ripple-locality

Jupyter Notebook
1
star
67

student_19_gossip_bls

Implementation of gossip protocols in the context of BLSCoSi
Go
1
star
68

student_17_ots

For Ceyhun
Go
1
star
69

demo_17_bcss

Pop-repo for demo at blockchain-summer-school 2017
JavaScript
1
star
70

student_22_determ-fp-sc

C
1
star
71

student_21_dela-wasm

Webassembly execution environment for Dela
Go
1
star
72

student_19_nylechain

Go
1
star
73

student_17_pop_fs

Repo PoP forward secrecy
Go
1
star
74

student_19_julien

KyberJS performance improvement semester project
TypeScript
1
star
75

odyssey

Auditable Sharing and Management of Sensitive Data Across Jurisdictions
Jupyter Notebook
1
star