├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── Cargo.toml ├── LICENSE ├── README.md └── src └── lib.rs /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | **/*.rs.bk 3 | Cargo.lock 4 | 5 | *~ 6 | \#* 7 | .\#* 8 | *.swp 9 | *.orig 10 | *.bak 11 | 12 | *.s 13 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: rust 2 | 3 | rust: 4 | - stable 5 | - beta 6 | - nightly 7 | 8 | env: 9 | - TEST_COMMAND=test EXTRA_FLAGS='' FEATURES='' 10 | - TEST_COMMAND=test EXTRA_FLAGS='' FEATURES='nightly' 11 | - TEST_COMMAND=bench EXTRA_FLAGS='' FEATURES='nightly bench' 12 | - TEST_COMMAND=build EXTRA_FLAGS=--no-default-features FEATURES='' 13 | 14 | matrix: 15 | exclude: 16 | # Run benchmarks only on nightly 17 | - rust: stable 18 | env: TEST_COMMAND=bench EXTRA_FLAGS='' FEATURES='nightly bench' 19 | - rust: beta 20 | env: TEST_COMMAND=bench EXTRA_FLAGS='' FEATURES='nightly bench' 21 | # Test nightly features, such as radix_51, only on nightly. 22 | - rust: stable 23 | env: TEST_COMMAND=test EXTRA_FLAGS='' FEATURES='nightly' 24 | - rust: beta 25 | env: TEST_COMMAND=test EXTRA_FLAGS='' FEATURES='nightly' 26 | # Test no_std only on nightly. 27 | - rust: stable 28 | env: TEST_COMMAND=build EXTRA_FLAGS=--no-default-features FEATURES='' 29 | - rust: beta 30 | env: TEST_COMMAND=build EXTRA_FLAGS=--no-default-features FEATURES='' 31 | 32 | script: 33 | - cargo $TEST_COMMAND --features="$FEATURES" $EXTRA_FLAGS 34 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to curve25519-dalek 2 | 3 | If you have questions or comments, please feel free to email the 4 | authors. 5 | 6 | For feature requests, suggestions, and bug reports, please open an issue on 7 | [our Github](https://github.com/isislovecruft/davros). (Or, send us 8 | an email if you're opposed to using Github for whatever reason.) 9 | 10 | Patches are welcomed as pull requests on 11 | [our Github](https://github.com/isislovecruft/davros), as well as by 12 | email (preferably sent to all of the authors listed in `Cargo.toml`). 13 | 14 | All issues on davros are mentored, if you want help with a bug just 15 | ask @isislovecruft or @hdevalence. 16 | 17 | Some issues are easier than others. The `easy` label can be used to find the 18 | easy issues. If you want to work on an issue, please leave a comment so that we 19 | can assign it to you! 20 | 21 | # Code of Conduct 22 | 23 | We follow the [Rust Code of Conduct](http://www.rust-lang.org/conduct.html), 24 | with the following additional clauses: 25 | 26 | * We respect the rights to privacy and anonymity for contributors and people in 27 | the community. If someone wishes to contribute under a pseudonym different to 28 | their primary identity, that wish is to be respected by all contributors. 29 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "davros" 3 | version = "0.0.0" 4 | authors = ["Isis Lovecruft "] 5 | description = "Deterministic And Verifiable Randomness On Schnorr signatures" 6 | readme = "README.md" 7 | license = "BSD-3-Clause" 8 | repository = "https://github.com/isislovecruft/davros" 9 | homepage = "https://docs.rs/davros" 10 | documentation = "https://docs.rs/davros" 11 | categories = ["cryptography", "no-std"] 12 | keywords = ["curve25519", "signatures", "DSA", "schnorr", "VRF"] 13 | exclude = [ 14 | ".gitignore", 15 | ".travis.yml", 16 | ] 17 | 18 | [badges] 19 | travis-ci = { repository = "isislovecruft/davros", branch = "master"} 20 | 21 | [dependencies.curve25519-dalek] 22 | version = "^0.13" 23 | 24 | [features] 25 | nightly = ["curve25519-dalek/radix_51"] 26 | default = ["std"] 27 | std = ["curve25519-dalek/std"] 28 | bench = [] 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 Isis Agora Lovecruft, Henry de Valence. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 19 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 21 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 24 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # DAVROS: Deterministic And Verifiable Randomness On Schnorr signatures [![](https://img.shields.io/crates/v/davros.svg)](https://crates.io/crates/davros) [![](https://docs.rs/davros/badge.svg)](https://docs.rs/davros) [![](https://travis-ci.org/isislovecruft/davros.svg?branch=master)](https://travis-ci.org/isislovecruft/davros) 3 | 4 | **A cryptographic library for creating and verifing extensible Schnorr 5 | signatures using the 6 | [Ristretto](https://docs.rs/curve25519-dalek/0.13.2/curve25519_dalek/ristretto/index.html) 7 | prime-order group.** 8 | 9 | ## SPOILER ALERT 10 | 11 | *Davros was thought to have died during the first year of the Time War, when his 12 | command ship "flew into the jaws of the Nightmare Child" at the Gates of Elysium 13 | despite the Doctor's failed efforts to save him. But Davros was pulled out of 14 | the time lock of the war by Dalek Caan, using his own flesh to create a "new 15 | empire" of Daleks who place him in the Vault as their prisoner to make use of 16 | his knowledge. Under Davros' guidance, the Daleks steal 27 planets, including 17 | Earth, and hide them in the Medusa Cascade, one second out of sync with the rest 18 | of the universe.* 19 | 20 | *In the follow-up episode "Journey's End", it is revealed that the stolen 21 | planets are required as a power source for Davros' ideal final solution: the 22 | reality bomb, which produces a wavelength that would cancel out the electrical 23 | field binding atoms to reduce all life outside the Crucible into nothingness in 24 | both his universe and countless other realities. But Davros learns too late that 25 | Dalek Caan, who came to the realisation of his race's atrocities as a 26 | consequence of saving his creator, used his prophecies and influence to ensure 27 | the Daleks' destruction while manipulating events to bring the Tenth Doctor and 28 | Donna Noble together for the role the latter would play. Though the Doctor 29 | attempts to save him, having earlier taunted the Doctor for turning his 30 | companions into killers and being the cause of the deaths of countless people 31 | during his travels, Davros furiously refuses the Doctor's help and accuses him 32 | of being responsible for the destruction while screaming: "Never forget, Doctor, 33 | you did this! I name you forever: You are the Destroyer of Worlds!" Thus the 34 | Doctor is forced to leave Davros to his fate as the Crucible self-destructs.* 35 | 36 | # Warnings 37 | 38 | davros and 39 | [our elliptic curve library](https://github.com/isislovecruft/curve25519-dalek) 40 | (which this code uses) have received *one* formal cryptographic and security 41 | review. Neither have yet received what we would consider *sufficient* peer 42 | review by other qualified cryptographers to be considered in any way, shape, 43 | or form, safe. 44 | 45 | **USE AT YOUR OWN RISK.** 46 | 47 | ## Documentation 48 | 49 | Extensive documentation is available [here](https://docs.rs/davros). 50 | 51 | # Installation 52 | 53 | To install, add the following to the dependencies section of your project's 54 | `Cargo.toml`: 55 | 56 | davros = "^0.13" 57 | 58 | Then, in your library or executable source, add: 59 | 60 | extern crate davros 61 | 62 | On nightly Rust, using the `nightly` feature enables a radix-51 field 63 | arithmetic implementation using `u128`s, which is approximately twice as 64 | fast. 65 | 66 | ## Contributing 67 | 68 | Please see 69 | [CONTRIBUTING.md](https://github.com/isislovecruft/davros/blob/master/CONTRIBUTING.md). 70 | 71 | Patches and pull requests should be make against the `develop` 72 | branch, **not** `master`. 73 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | #[cfg(test)] 2 | mod tests { 3 | #[test] 4 | fn it_works() { 5 | } 6 | } 7 | --------------------------------------------------------------------------------