From 4206fdbf488f3b373f78268642e06067cc2f800f Mon Sep 17 00:00:00 2001 From: Kevin Lewi Date: Mon, 27 Sep 2021 18:53:06 -0700 Subject: [PATCH] Adding dual license (#11) --- CONTRIBUTING.md | 2 +- LICENSE-APACHE | 25 ------------------------- src/ciphersuite.rs | 6 ++++-- src/errors.rs | 6 ++++-- src/group/expand.rs | 6 ++++-- src/group/mod.rs | 6 ++++-- src/group/p256.rs | 6 ++++-- src/group/ristretto.rs | 6 ++++-- src/group/tests.rs | 6 ++++-- src/hash.rs | 6 ++++-- src/lib.rs | 6 ++++-- src/serialization.rs | 6 ++++-- src/tests/mock_rng.rs | 6 ++++-- src/tests/mod.rs | 6 ++++-- src/tests/parser.rs | 6 ++++-- src/tests/voprf_test_vectors.rs | 6 ++++-- src/tests/voprf_vectors.rs | 6 ++++-- src/voprf.rs | 6 ++++-- 18 files changed, 65 insertions(+), 58 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f4043ae..906df5e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,5 +26,5 @@ disclosure of security bugs. In those cases, please go through the process outlined on that page and do not file a public issue. ## License -By contributing to opaque-ke, you agree that your contributions will be +By contributing to voprf, you agree that your contributions will be licensed under the LICENSE file in the root directory of this source tree. diff --git a/LICENSE-APACHE b/LICENSE-APACHE index 16fe87b..1b5ec8b 100644 --- a/LICENSE-APACHE +++ b/LICENSE-APACHE @@ -174,28 +174,3 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/src/ciphersuite.rs b/src/ciphersuite.rs index 0d861a9..7dd2b6e 100644 --- a/src/ciphersuite.rs +++ b/src/ciphersuite.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. //! Defines the CipherSuite trait to specify the underlying primitives for VOPRF diff --git a/src/errors.rs b/src/errors.rs index 4b47d0e..66b0be4 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. //! A list of error types which are produced during an execution of the protocol use core::fmt::Debug; diff --git a/src/group/expand.rs b/src/group/expand.rs index 3100dc7..4a1c0f0 100644 --- a/src/group/expand.rs +++ b/src/group/expand.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. use crate::errors::InternalError; use crate::hash::Hash; diff --git a/src/group/mod.rs b/src/group/mod.rs index b3b58d2..0d78383 100644 --- a/src/group/mod.rs +++ b/src/group/mod.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. //! Defines the Group trait to specify the underlying prime order group used in //! OPAQUE's OPRF diff --git a/src/group/p256.rs b/src/group/p256.rs index 2a700a1..8c1d7ba 100644 --- a/src/group/p256.rs +++ b/src/group/p256.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. #![allow( clippy::borrow_interior_mutable_const, diff --git a/src/group/ristretto.rs b/src/group/ristretto.rs index 247da87..457bb75 100644 --- a/src/group/ristretto.rs +++ b/src/group/ristretto.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. use super::Group; use crate::errors::InternalError; diff --git a/src/group/tests.rs b/src/group/tests.rs index 04c5804..c2ef057 100644 --- a/src/group/tests.rs +++ b/src/group/tests.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. //! Includes a series of tests for the group implementations diff --git a/src/hash.rs b/src/hash.rs index 94b74a3..87161f2 100644 --- a/src/hash.rs +++ b/src/hash.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. //! A convenience trait for digest bounds used throughout the library diff --git a/src/lib.rs b/src/lib.rs index d60fba4..9341829 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. //! An implementation of a verifiable oblivious pseudorandom function (VOPRF) //! diff --git a/src/serialization.rs b/src/serialization.rs index 29848f4..8c4539d 100644 --- a/src/serialization.rs +++ b/src/serialization.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. //! Handles the serialization of each of the components used //! in the VOPRF protocol diff --git a/src/tests/mock_rng.rs b/src/tests/mock_rng.rs index 1d10828..9f58b37 100644 --- a/src/tests/mock_rng.rs +++ b/src/tests/mock_rng.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. use alloc::vec::Vec; use core::cmp::min; diff --git a/src/tests/mod.rs b/src/tests/mod.rs index 4f3087f..2f6d2e0 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. mod mock_rng; mod parser; diff --git a/src/tests/parser.rs b/src/tests/parser.rs index afd6fc0..a53cf56 100644 --- a/src/tests/parser.rs +++ b/src/tests/parser.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. use alloc::string::String; diff --git a/src/tests/voprf_test_vectors.rs b/src/tests/voprf_test_vectors.rs index 581cba4..8d3e658 100644 --- a/src/tests/voprf_test_vectors.rs +++ b/src/tests/voprf_test_vectors.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. use crate::{ ciphersuite::CipherSuite, diff --git a/src/tests/voprf_vectors.rs b/src/tests/voprf_vectors.rs index fb73c5f..6eb214d 100644 --- a/src/tests/voprf_vectors.rs +++ b/src/tests/voprf_vectors.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. //! The VOPRF test vectors taken from: //! https://github.com/cfrg/draft-irtf-cfrg-voprf/blob/master/draft-irtf-cfrg-voprf.md diff --git a/src/voprf.rs b/src/voprf.rs index aa7f281..e42fe82 100644 --- a/src/voprf.rs +++ b/src/voprf.rs @@ -1,7 +1,9 @@ // Copyright (c) Facebook, Inc. and its affiliates. // -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. +// This source code is licensed under both the MIT license found in the +// LICENSE-MIT file in the root directory of this source tree and the Apache +// License, Version 2.0 found in the LICENSE-APACHE file in the root directory +// of this source tree. //! Contains the main VOPRF API