Skip to content

Commit

Permalink
Remove old files and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
quackzar committed Apr 18, 2024
1 parent a2395e4 commit bd7d0e8
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 276 deletions.
3 changes: 2 additions & 1 deletion pycare/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ To install the package locally you want to setup a virtual environment and insta
```
Then you should be able to run `maturin develop` and have a version of `pycare` available.

*Built with ❤️ using [PyO3](https://github.com/PyO3/pyo3)*

<div align="center">*Built with ❤️ using [PyO3](https://github.com/PyO3/pyo3)*</div>
7 changes: 4 additions & 3 deletions src/algebra/math.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
// Reconsider most of this, as this is just a more primitive manual implementation of something,
// like `ndarray`.

use ff::Field;
use rayon::prelude::*;

// TODO: Consider smallvec or tinyvec

Check warning on line 16 in src/algebra/math.rs

View workflow job for this annotation

GitHub Actions / cargo fmt

Diff in /runner/_work/caring/caring/src/algebra/math.rs
// TODO: Make parallel version it's own type switch on them using cfg..


use ff::Field;
use rayon::prelude::*;

/// Represention of a mathematical vector of type `F`.
///
/// This provides implementations for addition, subtraction and multiplication
Expand Down
7 changes: 0 additions & 7 deletions src/algebra/note.md

This file was deleted.

19 changes: 0 additions & 19 deletions src/help.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
pub fn run_for_each<A: Clone, B>(
values: &[impl AsRef<[A]>],
mut func: impl FnMut(&[A]) -> B,
) -> Vec<B> {
// This is ugly and a bit inefficient.
let n = values[0].as_ref().len();
let m = values.len();
let mut output = Vec::with_capacity(n);
for i in 0..n {
let mut buf = Vec::with_capacity(m);
for party in values {
buf.push(party.as_ref()[i].clone());
}
let res: B = func(&buf);
output.push(res);
}
output
}

pub fn transpose<T>(original: Vec<Vec<T>>) -> Vec<Vec<T>> {
assert!(!original.is_empty());
let mut transposed = (0..original[0].len()).map(|_| vec![]).collect::<Vec<_>>();
Expand Down
2 changes: 2 additions & 0 deletions src/ot/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! WIP: Only basic traits and a mock version implemented
use futures::Future;

use crate::net::Channel;
Expand Down
1 change: 0 additions & 1 deletion src/schemes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ pub mod pedersen;
pub mod rep3;
pub mod shamir;
pub mod spdz;
pub mod spdz2k;

use std::{
error::Error,
Expand Down
3 changes: 1 addition & 2 deletions src/schemes/rep3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//! For an example see
//! https://medium.com/partisia-blockchain/mpc-techniques-series-part-1-secret-sharing-d8f98324674a
//!
// TODO: Parametrize this over fields instead?
use ff::Field;
use rand::RngCore;
Expand Down Expand Up @@ -142,7 +141,7 @@ mod test {
.unwrap();
}

#[ignore = "Currently fails, I am not sure why"]
#[ignore = "Known bug. The output becomes malformed after the second mult"]
#[tokio::test]
async fn mult_twice() {
type F = Element32;
Expand Down
46 changes: 0 additions & 46 deletions src/schemes/spdz2k.rs

This file was deleted.

2 changes: 2 additions & 0 deletions src/testing/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//! This module documents various tools which can be used to test or benchmark schemes.
pub mod mock;

use crate::net::network::InMemoryNetwork;
use std::future::Future;
use tokio::task::JoinError;
Expand Down
167 changes: 0 additions & 167 deletions src/theater/mod.rs

This file was deleted.

30 changes: 0 additions & 30 deletions src/theater/properties.rs

This file was deleted.

0 comments on commit bd7d0e8

Please sign in to comment.