Skip to content

Commit

Permalink
fix: apply security audit results
Browse files Browse the repository at this point in the history
In particular, this PR consider FPS-14/15/16/17/18/19/20.  Changes are applied for FPS-15/16/20.
  • Loading branch information
cryptonemo committed Jul 7, 2020
1 parent 2609706 commit 91d208d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ There are currently four different crates:


- [**Filecoin Proofs (`filecoin-proofs`)**](./filecoin-proofs)
A wrapper around `storage-proofs`, providing an FFI-exported API callable from C (and in practice called by [go-filecoin](https://github.com/filecoin-project/go-filecoin') via cgo). Filecoin-specific values of setup parameters are included here, and circuit parameters generated by Filecoin’s (future) trusted setup will also live here.
A wrapper around `storage-proofs`, providing an FFI-exported API callable from C (and in practice called by [go-filecoin](https://github.com/filecoin-project/go-filecoin) via cgo). Filecoin-specific values of setup parameters are included here, and circuit parameters generated by Filecoin’s (future) trusted setup will also live here.


![FPS crate dependencies](/img/fps-dependencies.png?raw=true)
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs/core/src/crypto/feistel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ mod tests {
// Since every element in the set is reversibly mapped to another element also in the set,
// this is indeed a permutation.
assert_eq!(i, v, "failed to permute");
assert!(p <= *n, "output number is too big");
assert!(p < *n, "output number is too big");
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions storage-proofs/core/src/sector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ impl fmt::Display for SectorId {
}

impl SectorId {
pub fn as_fr_safe(self) -> [u8; 31] {
let mut buf: [u8; 31] = [0; 31];
pub fn as_fr_safe(self) -> [u8; 32] {
let mut buf: [u8; 32] = [0; 32];
byteorder::LittleEndian::write_u64(&mut buf[0..8], self.0);
buf
}
Expand Down

0 comments on commit 91d208d

Please sign in to comment.