From fbc397a7225e92ac4b65db291350ca2eeb6d0383 Mon Sep 17 00:00:00 2001 From: 0xisk <0xisk@proton.me> Date: Thu, 8 Aug 2024 12:30:36 +0200 Subject: [PATCH] fix: failed tests --- .vscode/settings.json | 2 +- packages/probabilistic-encryption/Cargo.toml | 2 +- packages/probabilistic-encryption/README.md | 4 ++-- packages/probabilistic-encryption/src/lib.rs | 2 +- packages/probabilistic-encryption/src/number.rs | 8 ++++---- packages/probabilistic-encryption/src/prime.rs | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 0a69886..41d2e22 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,6 +4,6 @@ "ciphertext", "Goldwasser", "Micali", - "probabilisticpubkey" + "probabilistic-encryption" ] } \ No newline at end of file diff --git a/packages/probabilistic-encryption/Cargo.toml b/packages/probabilistic-encryption/Cargo.toml index 0ff297e..89d4f3e 100644 --- a/packages/probabilistic-encryption/Cargo.toml +++ b/packages/probabilistic-encryption/Cargo.toml @@ -3,7 +3,7 @@ name = "probabilistic-encryption" version = "0.1.0" authors = ["Carlos Rodriguez-Vega "] edition = "2018" -src = "https://github.com/crodriguezvega/probabilisticpubkey?tab=readme-ov-file" +src = "https://github.com/crodriguezvega/probabilistic-encryption?tab=readme-ov-file" [dependencies] bitvec = "0.20" diff --git a/packages/probabilistic-encryption/README.md b/packages/probabilistic-encryption/README.md index 04a5bbb..373e606 100644 --- a/packages/probabilistic-encryption/README.md +++ b/packages/probabilistic-encryption/README.md @@ -1,6 +1,6 @@ -# probabilisticpubkey +# probabilistic-encryption -[![Build Status](https://travis-ci.org/crodriguezvega/probabilisticpubkey.svg?branch=master)](https://travis-ci.org/crodriguezvega/probabilisticpubkey) +[![Build Status](https://travis-ci.org/crodriguezvega/probabilistic-encryption.svg?branch=master)](https://travis-ci.org/crodriguezvega/probabilistic-encryption) Probabilistic public-key crypto systems in Rust. Implementations of Goldwasser-Micali and Blum-Goldwasser algorithms as described in [chapter 8](http://cacr.uwaterloo.ca/hac/about/chap8.pdf) of "Handbook of Applied Cryptography" by Alfred J. Menezes et al. diff --git a/packages/probabilistic-encryption/src/lib.rs b/packages/probabilistic-encryption/src/lib.rs index c7151c2..a6d26d2 100644 --- a/packages/probabilistic-encryption/src/lib.rs +++ b/packages/probabilistic-encryption/src/lib.rs @@ -1,6 +1,6 @@ //! # Probabilistic publick-key cryptography //! -//! `probabilisticpubkey` consists of implementations for the Goldwasser-Micali +//! `probabilistic-encryption` consists of implementations for the Goldwasser-Micali //! and Blum-Goldwasser probabilistic public-key systems. extern crate bitvec; diff --git a/packages/probabilistic-encryption/src/number.rs b/packages/probabilistic-encryption/src/number.rs index adaf3fe..ac010bf 100644 --- a/packages/probabilistic-encryption/src/number.rs +++ b/packages/probabilistic-encryption/src/number.rs @@ -10,7 +10,7 @@ use num_traits::{One, Zero}; /// # extern crate num_bigint; /// # fn main() { /// use num_bigint::BigUint; -/// use probabilisticpubkey::number; +/// use probabilistic_encryption::number; /// /// assert_eq!(number::as_power_of_two_and_odd(&BigUint::from(256usize)), (8, BigUint::from(1usize))); /// assert_eq!(number::as_power_of_two_and_odd(&BigUint::from(137usize)), (0, BigUint::from(137usize))); @@ -67,7 +67,7 @@ fn is_power_of_two(n: &BigUint) -> bool { /// # extern crate num_bigint; /// # fn main() { /// use num_bigint::{BigUint, BigInt}; -/// use probabilisticpubkey::number; +/// use probabilistic_encryption::number; /// /// let a = BigUint::from(73usize); /// let b = BigUint::from(56usize); @@ -143,7 +143,7 @@ pub enum JacobiSymbol { /// # extern crate num_bigint; /// # fn main() { /// use num_bigint::BigUint; -/// use probabilisticpubkey::number; +/// use probabilistic_encryption::number; /// /// let a = BigUint::from(256usize); /// let n = BigUint::from(4211usize); @@ -220,7 +220,7 @@ pub fn jacobi_symbol(a: &BigUint, n: &BigUint) -> JacobiSymbol { /// # extern crate num_bigint; /// # fn main() { /// use num_bigint::BigUint; -/// use probabilisticpubkey::number; +/// use probabilistic_encryption::number; /// /// let a1 = BigUint::from(128usize); /// let n1 = BigUint::from(3253usize); diff --git a/packages/probabilistic-encryption/src/prime.rs b/packages/probabilistic-encryption/src/prime.rs index 2236a03..968d494 100644 --- a/packages/probabilistic-encryption/src/prime.rs +++ b/packages/probabilistic-encryption/src/prime.rs @@ -17,7 +17,7 @@ use rand::thread_rng; /// # extern crate num_bigint; /// # fn main() { /// use num_bigint::BigUint; -/// use probabilisticpubkey::prime; +/// use probabilistic_encryption::prime; /// /// assert_eq!(prime::is_probably_prime(&BigUint::from(128usize)), false); /// assert_eq!(prime::is_probably_prime(&BigUint::from(2969usize)), true);