Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lonerapier committed Jul 6, 2024
1 parent bb2481c commit 0fd27eb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/encryption/symmetric/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Contains implementation of symmetric encryption primitives.
#![doc = include_str!("./README.md")]
pub mod aes;
pub mod chacha;
pub mod counter;
Expand Down Expand Up @@ -62,7 +63,7 @@ pub trait BlockCipher {
/// Block size in bytes for cipher oprations
const BLOCK_SIZE: usize;
/// Block acted upon by the cipher
type Block: AsRef<[u8]> + AsMut<[u8]> + From<Vec<u8>> + Copy;
type Block: AsRef<[u8]> + AsMut<[u8]> + From<Vec<u8>> + Copy + PartialEq;
/// Secret key for encryption/decryption
type Key;

Expand Down
5 changes: 5 additions & 0 deletions src/encryption/symmetric/modes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ IV4["IV||2"]-->Fk2[F_k]-->xor2["⨁"]-->c2
m2-->xor2
```

## Next Steps
Implement more modes, and subsequent attacks/vulnerabilities:
- [ ] CFB
- [ ] OFB

## References

- [Understanding Cryptography by Cristof Paar & Jan Pelzl & Tim Güneysu: Chapter 3, 4](https://www.cryptography-textbook.com/)
Expand Down
1 change: 1 addition & 0 deletions src/encryption/symmetric/modes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
//! - [`cbc::CBC`]: Cipher Block Chaining
//! - [`ctr::CTR`]: Counter mode
//! - [`gcm::GCM`]: Galois Counter mode
#![doc = include_str!("./README.md")]
pub mod cbc;
pub mod ctr;
4 changes: 2 additions & 2 deletions src/field/extension/gf_101_2.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! This module contains an implementation of the quadratic extension field GF(101^2).
//! Elements represented as coefficients of a [`Polynomial`] in the [`Monomial`] basis of degree 1
//! in form: `a_0 + a_1*t`` where {a_0, a_1} \in \mathhbb{F}. Uses irreducible poly of the form:
//! (X^2-K).
//! in form: `a_0 + a_1*t` where ${a_0, a_1} \in \mathhbb{F}$. Uses irreducible poly of the form:
//! $(X^2-K)$.
//!
//! The curve used in [`curve::pluto_curve::PlutoBaseCurve`] supports degree two extension field
//! [`curve::pluto_curve::PlutoExtendedCurve`] from GF(101) to have points in GF(101^2). This can be
Expand Down

0 comments on commit 0fd27eb

Please sign in to comment.